libmp3splt
src/splt.h
00001 /**********************************************************
00002  *
00003  * libmp3splt -- library based on mp3splt,
00004  *               for mp3/ogg splitting without decoding
00005  *
00006  * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net>
00007  * Copyright (c) 2005-2011 Alexandru Munteanu - io_fx@yahoo.fr
00008  *
00009  * http://mp3splt.sourceforge.net
00010  *
00011  *********************************************************/
00012 
00013 /**********************************************************
00014  *
00015  * This program is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU General Public License
00017  * as published by the Free Software Foundation; either version 2
00018  * of the License, or (at your option) any later version.
00019  *
00020  * This program is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  * GNU General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU General Public License
00026  * along with this program; if not, write to the Free Software
00027  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00028  * 02111-1307,
00029  * USA.
00030  *
00031  *********************************************************/
00032 
00033 #ifndef MP3SPLT_SPLT_H
00034 
00035 #include "mp3splt.h"
00036 #include "pair.h"
00037 #include "types_func.h"
00038 #include "cddb.h"
00039 #include "utils.h"
00040 #include "checks.h"
00041 #include "plugins.h"
00042 #include "cue.h"
00043 #include "cddb.h"
00044 #include "freedb.h"
00045 #include "audacity.h"
00046 #include "splt_array.h"
00047 #include "string_utils.h"
00048 #include "tags_utils.h"
00049 #include "input_output.h"
00050 #include "options.h"
00051 #include "output_format.h"
00052 #include "split_points.h"
00053 #include "errors.h"
00054 #include "freedb_utils.h"
00055 #include "silence_utils.h"
00056 #include "sync_errors.h"
00057 #include "wrap.h"
00058 #include "client.h"
00059 #include "conversions.h"
00060 #include "tags_parser.h"
00061 #include "oformat_parser.h"
00062 #include "debug.h"
00063 #include "filename_regex.h"
00064 #include "win32.h"
00065 
00066 #ifdef HAVE_CONFIG_H
00067 #include "config.h"
00068 #endif
00069 
00070 #include <limits.h>
00071 #include <locale.h>
00072 
00073 #ifdef ENABLE_NLS
00074 #  include <libintl.h>
00075 #endif
00076 
00077 #ifdef __WIN32__
00078 
00079 #define fseeko fseeko64
00080 #define ftello ftello64
00081 
00082 #else
00083 
00084 #if !HAVE_FSEEKO
00085 #define fseeko fseek
00086 #define ftello ftell
00087 #endif
00088 
00089 #endif
00090 
00091 #ifdef ENABLE_NLS
00092 #  define _(STR) dgettext(MP3SPLT_LIB_GETTEXT_DOMAIN, STR)
00093 #else
00094 #  define _(STR) ((const char *)STR)
00095 #endif
00096 
00097 /**********************************/
00098 /* splt normal or syncerror split */
00099 
00100 void splt_s_error_split(splt_state *state, int *error);
00101 void splt_s_multiple_split(splt_state *state, int *error);
00102 void splt_s_normal_split(splt_state *state, int *error);
00103 
00104 /************************************/
00105 /* splt time and equal length split */
00106 
00107 void splt_s_time_split(splt_state *state, int *error);
00108 void splt_s_equal_length_split(splt_state *state, int *error);
00109 
00110 /************************************/
00111 /* splt silence detection and split */
00112 
00113 int splt_s_set_silence_splitpoints(splt_state *state, int *error);
00114 void splt_s_silence_split(splt_state *state, int *error);
00115 
00116 /****************************/
00117 /* splt wrap split */
00118 
00119 void splt_s_wrap_split(splt_state *state, int *error);
00120 
00121 /* other stuff:/ */
00122 
00123 #define SPLT_DEFAULT_PROGRESS_RATE 350
00124 #define SPLT_DEFAULT_PROGRESS_RATE2 50
00125 
00126 #define SPLT_DEFAULTSILLEN 10
00127 #define SPLT_DEFAULTSHOT 25
00128 
00129 #define SPLT_VARCHAR '@'
00130 
00131 //max number of splitpoints 
00132 //for silence detection and for syncerrors
00133 #define SPLT_MAXSYNC INT_MAX
00134 #define SPLT_MAXSILENCE INT_MAX
00135 
00136 /* libmp3splt internals */
00137 #define SPLT_IERROR_INT -1
00138 #define SPLT_IERROR_SET_ORIGINAL_TAGS -2
00139 #define SPLT_IERROR_CHAR -3
00140 
00141 //tags options
00142 #define SPLT_TAGS_TITLE 0
00143 #define SPLT_TAGS_ARTIST 1
00144 #define SPLT_TAGS_ALBUM 2
00145 #define SPLT_TAGS_YEAR 3
00146 #define SPLT_TAGS_COMMENT 4
00147 #define SPLT_TAGS_TRACK 5
00148 #define SPLT_TAGS_GENRE 6
00149 #define SPLT_TAGS_PERFORMER 7
00150 #define SPLT_TAGS_VERSION 8
00151 
00152 #define MP3SPLT_SPLT_H
00153 
00154 #endif
00155