00001 /***************************************************************************** 00002 * vlc_config.h: limits and configuration 00003 * Defines all compilation-time configuration constants and size limits 00004 ***************************************************************************** 00005 * Copyright (C) 1999-2003 the VideoLAN team 00006 * 00007 * Authors: Vincent Seguin <seguin@via.ecp.fr> 00008 * Samuel Hocevar <sam@via.ecp.fr> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00023 *****************************************************************************/ 00024 00025 /** 00026 * \file 00027 * This file defines of values used in interface, vout, aout and vlc core functions. 00028 */ 00029 00030 /* Conventions regarding names of symbols and variables 00031 * ---------------------------------------------------- 00032 * 00033 * - Symbols should begin with a prefix indicating in which module they are 00034 * used, such as INTF_, VOUT_ or AOUT_. 00035 */ 00036 00037 /***************************************************************************** 00038 * General configuration 00039 *****************************************************************************/ 00040 00041 /* All timestamp below or equal to this define are invalid/unset 00042 * XXX the numerical value is 0 because of historical reason and will change.*/ 00043 #define VLC_TS_INVALID (0) 00044 #define VLC_TS_0 (1) 00045 00046 #define CLOCK_FREQ INT64_C(1000000) 00047 00048 /***************************************************************************** 00049 * Interface configuration 00050 *****************************************************************************/ 00051 00052 /* Base delay in micro second for interface sleeps */ 00053 #define INTF_IDLE_SLEEP (CLOCK_FREQ/20) 00054 00055 /* Step for changing gamma, and minimum and maximum values */ 00056 #define INTF_GAMMA_STEP .1 00057 #define INTF_GAMMA_LIMIT 3 00058 00059 /***************************************************************************** 00060 * Input thread configuration 00061 *****************************************************************************/ 00062 00063 #define DEFAULT_INPUT_ACTIVITY 1 00064 #define TRANSCODE_ACTIVITY 10 00065 00066 /* Used in ErrorThread */ 00067 #define INPUT_IDLE_SLEEP (CLOCK_FREQ/10) 00068 00069 /* Number of read() calls needed until we check the file size through 00070 * fstat() */ 00071 #define INPUT_FSTAT_NB_READS 16 00072 00073 /* 00074 * General limitations 00075 */ 00076 00077 /* Duration between the time we receive the data packet, and the time we will 00078 * mark it to be presented */ 00079 #define DEFAULT_PTS_DELAY (3*CLOCK_FREQ/10) 00080 00081 /***************************************************************************** 00082 * Audio configuration 00083 *****************************************************************************/ 00084 00085 /* Volume */ 00086 /* If you are coding an interface, please see src/audio_output/intf.c */ 00087 #define AOUT_VOLUME_DEFAULT 256 00088 #define AOUT_VOLUME_STEP 32 00089 #define AOUT_VOLUME_MAX 1024 00090 #define AOUT_VOLUME_MIN 0 00091 00092 /* Max number of pre-filters per input, and max number of post-filters */ 00093 #define AOUT_MAX_FILTERS 10 00094 00095 /* Max number of inputs */ 00096 #define AOUT_MAX_INPUTS 5 00097 00098 /* Buffers which arrive in advance of more than AOUT_MAX_ADVANCE_TIME 00099 * will be considered as bogus and be trashed */ 00100 #define AOUT_MAX_ADVANCE_TIME (DEFAULT_PTS_DELAY * 5) 00101 00102 /* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME 00103 * will cause the calling thread to sleep */ 00104 #define AOUT_MAX_PREPARE_TIME (CLOCK_FREQ/2) 00105 00106 /* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed 00107 * to avoid too heavy resampling */ 00108 #define AOUT_MIN_PREPARE_TIME (CLOCK_FREQ/25) 00109 00110 /* Max acceptable delay between the coded PTS and the actual presentation 00111 * time, without resampling */ 00112 #define AOUT_PTS_TOLERANCE (CLOCK_FREQ/25) 00113 00114 /* Max acceptable resampling (in %) */ 00115 #define AOUT_MAX_RESAMPLING 10 00116 00117 /***************************************************************************** 00118 * SPU configuration 00119 *****************************************************************************/ 00120 00121 /* Buffer must avoid arriving more than SPU_MAX_PREPARE_TIME in advanced to 00122 * the SPU */ 00123 #define SPU_MAX_PREPARE_TIME (CLOCK_FREQ/2) 00124 00125 /***************************************************************************** 00126 * Video configuration 00127 *****************************************************************************/ 00128 00129 /* 00130 * Default settings for video output threads 00131 */ 00132 00133 /* Multiplier value for aspect ratio calculation (2^7 * 3^3 * 5^3) */ 00134 #define VOUT_ASPECT_FACTOR 432000 00135 00136 /* Maximum width of a scaled source picture - this should be relatively high, 00137 * since higher stream values will result in no display at all. */ 00138 #define VOUT_MAX_WIDTH 4096 00139 00140 /* Number of planes in a picture */ 00141 #define VOUT_MAX_PLANES 5 00142 00143 /* 00144 * Time settings 00145 */ 00146 00147 /* Time to sleep when waiting for a buffer (from vout or the video fifo). 00148 * It should be approximately the time needed to perform a complete picture 00149 * loop. Since it only happens when the video heap is full, it does not need 00150 * to be too low, even if it blocks the decoder. */ 00151 #define VOUT_OUTMEM_SLEEP (CLOCK_FREQ/50) 00152 00153 /* The default video output window title */ 00154 #define VOUT_TITLE "VLC" 00155 00156 /***************************************************************************** 00157 * Messages and console interfaces configuration 00158 *****************************************************************************/ 00159 00160 /* Maximal size of a message to be stored in the mesage queue, 00161 * it is needed when vasprintf is not available */ 00162 #define INTF_MAX_MSG_SIZE 512 00163 00164 /* Maximal size of the message queue - in case of overflow, all messages in the 00165 * queue are printed, but not sent to the threads */ 00166 #define VLC_MSG_QSIZE 256 00167 00168 /* Maximal depth of the object tree output by vlc_dumpstructure */ 00169 #define MAX_DUMPSTRUCTURE_DEPTH 100
1.5.6