diff options
Diffstat (limited to 'src')
30 files changed, 108 insertions, 141 deletions
diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index cc4df0c85..7ca851718 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -148,7 +148,7 @@ typedef struct { * different decoding deltas */ -static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t x, int8_t *table) { +static int8_t delta_decode_block(const int8_t *source, int32_t n, int8_t *dest, int8_t x, const int8_t *table) { int32_t i; int lim = n * 2; @@ -163,7 +163,7 @@ static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t } /* Decode a complete delta encoded array */ -static void delta_decode(int8_t *dest, int8_t *source, int32_t n, int8_t *table){ +static void delta_decode(int8_t *dest, const int8_t *source, int32_t n, const int8_t *table){ delta_decode_block(&source[2], n-2, dest, source[1], table); } diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 6693637c7..f837a2272 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -832,7 +832,7 @@ static qt_error parse_trak_atom (qt_trak *trak, int color_index; int color_dec; int color_greyscale; - unsigned char *color_table; + const unsigned char *color_table; /* initialize trak structure */ trak->edit_list_count = 0; diff --git a/src/demuxers/iff.h b/src/demuxers/iff.h index 9d4fb5abe..64f44fd94 100644 --- a/src/demuxers/iff.h +++ b/src/demuxers/iff.h @@ -118,7 +118,8 @@ #define HAMBITS_RED 2 /* modify red component */ #define HAMBITS_GREEN 3 /* modify green component */ -int bitplainoffeset[] = { 1, 2, 4, 8, +static const int bitplainoffeset[] = { + 1, 2, 4, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128, @@ -237,9 +238,9 @@ typedef struct { #define max_volume 65536 /* Unity = Fixed 1.0 = maximum volume */ -int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }; +static const int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }; -int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }; +static const int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }; typedef struct { uint32_t oneShotHiSamples; /* # samples in the high octave 1-shot part */ diff --git a/src/demuxers/qtpalette.h b/src/demuxers/qtpalette.h index 18b47c697..a8a44e916 100644 --- a/src/demuxers/qtpalette.h +++ b/src/demuxers/qtpalette.h @@ -7,14 +7,14 @@ #ifndef QTPALETTE_H #define QTPALETTE_H -unsigned char qt_default_palette_4[4 * 4] = { +static const unsigned char qt_default_palette_4[4 * 4] = { 0x93, 0x65, 0x5E, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xDF, 0xD0, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00 }; -unsigned char qt_default_palette_16[16 * 4] = { +static const unsigned char qt_default_palette_16[16 * 4] = { 0xFF, 0xFB, 0xFF, 0x00, 0xEF, 0xD9, 0xBB, 0x00, 0xE8, 0xC9, 0xB1, 0x00, @@ -33,7 +33,7 @@ unsigned char qt_default_palette_16[16 * 4] = { 0x00, 0x00, 0x00, 0x00 }; -unsigned char qt_default_palette_256[256 * 4] = { +static const unsigned char qt_default_palette_256[256 * 4] = { /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, 0x00, /* 1, 0x01 */ 0xFF, 0xFF, 0xCC, 0x00, /* 2, 0x02 */ 0xFF, 0xFF, 0x99, 0x00, diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index b9f516931..540abd0f4 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -304,7 +304,7 @@ gnomevfs_klass_dispose (input_class_t *this_gen) g_free (this); } -static char * ignore_scheme[] = { "cdda", "file", "http" }; +static const char *const ignore_scheme[] = { "cdda", "file", "http" }; static input_plugin_t * gnomevfs_klass_get_instance (input_class_t *klass_gen, xine_stream_t *stream, diff --git a/src/input/pnm.c b/src/input/pnm.c index 432520f6e..cba0aff1f 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -169,13 +169,13 @@ static const uint32_t pnm_available_bandwidths[]={14400,19200,28800,33600,34430, 115200,262200,393216,524300,1544000,10485800}; #define PNM_TWENTYFOUR_SIZE 16 -static unsigned char pnm_twentyfour[]={ +static const unsigned char pnm_twentyfour[]={ 0xd5, 0x42, 0xa3, 0x1b, 0xef, 0x1f, 0x70, 0x24, 0x85, 0x29, 0xb3, 0x8d, 0xba, 0x11, 0xf3, 0xd6 }; /* now other data follows. marked with 0x0000 at the beginning */ -int after_chunks_length=6; -unsigned char after_chunks[]={ +static const int after_chunks_length=6; +static const unsigned char after_chunks[]={ 0x00, 0x00, /* mark */ 0x50, 0x84, /* seems to be fixated */ diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 920b5c1d8..a15899f2d 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -88,7 +88,7 @@ Convert an autoplay enumeration into an vcdinfo itemtype enumeration. See definitions in vcdplayer.h and vcdinfo.h to get the below correct. */ -vcdinfo_item_enum_t autoplay2itemtype[]={ +static const vcdinfo_item_enum_t autoplay2itemtype[]={ VCDINFO_ITEM_TYPE_TRACK, /* VCDPLAYER_AUTOPLAY_TRACK */ VCDINFO_ITEM_TYPE_ENTRY, /* VCDPLAYER_AUTOPLAY_ENTRY */ VCDINFO_ITEM_TYPE_SEGMENT, /* VCDPLAYER_AUTOPLAY_SEGMENT */ diff --git a/src/libmpeg2/slice.c b/src/libmpeg2/slice.c index 8cb5c33b6..91a4c47b1 100644 --- a/src/libmpeg2/slice.c +++ b/src/libmpeg2/slice.c @@ -32,7 +32,7 @@ #include "vlc.h" -static int non_linear_quantizer_scale [] = { +static const int non_linear_quantizer_scale [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 52, diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c index ba688accf..46ea5c02c 100644 --- a/src/libspucc/cc_decoder.c +++ b/src/libspucc/cc_decoder.c @@ -72,7 +72,7 @@ enum { WHITE, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, BLACK }; /* color mapping to OSD text color indices */ -static int text_colormap[NUM_FG_COL] = { +static const int text_colormap[NUM_FG_COL] = { OSD_TEXT1, OSD_TEXT2, OSD_TEXT3, OSD_TEXT4, OSD_TEXT5, OSD_TEXT6, OSD_TEXT7 }; @@ -91,7 +91,7 @@ typedef struct colorinfo_s { } colorinfo_t; -static colorinfo_t cc_text_trans[NUM_FG_COL] = { +static const colorinfo_t cc_text_trans[NUM_FG_COL] = { /* white, black border, translucid */ { CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), @@ -142,7 +142,7 @@ static colorinfo_t cc_text_trans[NUM_FG_COL] = { } }; -static colorinfo_t cc_text_solid[NUM_FG_COL] = { +static const colorinfo_t cc_text_solid[NUM_FG_COL] = { /* white, black border, solid */ { CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), @@ -194,21 +194,21 @@ static colorinfo_t cc_text_solid[NUM_FG_COL] = { }; -static uint8_t cc_text_trans_alpha[TEXT_PALETTE_SIZE] = { +static const uint8_t cc_text_trans_alpha[TEXT_PALETTE_SIZE] = { 0, 8, 9, 10, 11, 12, 15, 15, 15, 15, 15 }; -static uint8_t cc_text_solid_alpha[TEXT_PALETTE_SIZE] = { +static const uint8_t cc_text_solid_alpha[TEXT_PALETTE_SIZE] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }; -static colorinfo_t *cc_text_palettes[NUM_CC_PALETTES] = { +static const colorinfo_t *const cc_text_palettes[NUM_CC_PALETTES] = { cc_text_trans, cc_text_solid }; -static uint8_t *cc_alpha_palettes[NUM_CC_PALETTES] = { +static const uint8_t *const cc_alpha_palettes[NUM_CC_PALETTES] = { cc_text_trans_alpha, cc_text_solid_alpha }; @@ -221,11 +221,11 @@ static uint8_t *cc_alpha_palettes[NUM_CC_PALETTES] = { #define MAX(a, b) ((a) > (b)? (a) : (b)) /* mapping from PAC row code to actual CC row */ -static int rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6, +static const int rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6, 7, 8, 9}; /* FIXME: do real TM */ /* must be mapped as a music note in the captioning font */ -static char specialchar[] = {'®','°','½','¿','T','¢','£','¶','à', +static const char specialchar[] = {'®','°','½','¿','T','¢','£','¶','à', TRANSP_SPACE,'è','â','ê','î','ô','û'}; /* character translation table - EIA 608 codes are not all the same as ASCII */ @@ -798,8 +798,8 @@ static void ccmem_exit(cc_memory_t *this) static void cc_renderer_build_palette(cc_renderer_t *this) { int i, j; - colorinfo_t *cc_text = cc_text_palettes[this->cc_state->cc_cfg->cc_scheme]; - uint8_t *cc_alpha = cc_alpha_palettes[this->cc_state->cc_cfg->cc_scheme]; + const colorinfo_t *cc_text = cc_text_palettes[this->cc_state->cc_cfg->cc_scheme]; + const uint8_t *cc_alpha = cc_alpha_palettes[this->cc_state->cc_cfg->cc_scheme]; memset(this->cc_palette, 0, sizeof (this->cc_palette)); memset(this->cc_trans, 0, sizeof (this->cc_trans)); diff --git a/src/libspudec/xine_spu_decoder.c b/src/libspudec/xine_spu_decoder.c index 30c7f18c9..c98d9e4dd 100644 --- a/src/libspudec/xine_spu_decoder.c +++ b/src/libspudec/xine_spu_decoder.c @@ -49,7 +49,7 @@ #define LOG_BUTTON 1 */ -static clut_t default_clut[] = { +static const clut_t default_clut[] = { CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), CLUT_Y_CR_CB_INIT(0xbf, 0x80, 0x80), CLUT_Y_CR_CB_INIT(0x10, 0x80, 0x80), diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index 76c9afe58..975d8b79e 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -57,7 +57,7 @@ typedef struct{ } biquad_t; /* S-parameters for designing 4th order Butterworth filter */ -static biquad_t s_param[2] = {{{1.0,0.0,0.0},{1.0,0.765367,1.0}}, +static const biquad_t s_param[2] = {{{1.0,0.0,0.0},{1.0,0.765367,1.0}}, {{1.0,0.0,0.0},{1.0,1.847759,1.0}}}; /* Data for specific instances of this filter */ diff --git a/src/post/deinterlace/pulldown.c b/src/post/deinterlace/pulldown.c index 41b31d596..cb263ccfb 100644 --- a/src/post/deinterlace/pulldown.c +++ b/src/post/deinterlace/pulldown.c @@ -85,19 +85,19 @@ * */ -/* Offset 1 2 3 4 5 */ -/* Field Pattern [T B T][B T][B T B] [T B] */ -/* Action Copy Save Merge Copy Copy */ -/* Bot Top */ -int tff_top_pattern[] = { 0, 1, 0, 0, 0 }; -int tff_bot_pattern[] = { 0, 0, 0, 1, 0 }; - -/* Offset 1 2 3 4 5 */ -/* Field Pattern [B T B][T B][T B T] [B T] */ -/* Action Copy Save Merge Copy Copy */ -/* Top Bot */ -int bff_top_pattern[] = { 0, 0, 0, 1, 0 }; -int bff_bot_pattern[] = { 0, 1, 0, 0, 0 }; +/* Offset 1 2 3 4 5 */ +/* Field Pattern [T B T][B T][B T B] [T B] */ +/* Action Copy Save Merge Copy Copy */ +/* Bot Top */ +static const int tff_top_pattern[] = { 0, 1, 0, 0, 0 }; +static const int tff_bot_pattern[] = { 0, 0, 0, 1, 0 }; + +/* Offset 1 2 3 4 5 */ +/* Field Pattern [B T B][T B][T B T] [B T] */ +/* Action Copy Save Merge Copy Copy */ +/* Top Bot */ +static const int bff_top_pattern[] = { 0, 0, 0, 1, 0 }; +static const int bff_bot_pattern[] = { 0, 1, 0, 0, 0 }; /* Timestamp mangling */ /* From the DVD : 0 + 3003+ 6006 + 9009+ 12012 = 15015 */ diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index 154d5f8cc..a5bf03039 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -62,7 +62,7 @@ typedef struct noise_param_t { static int nonTempRandShift[MAX_RES]= {-1}; -static int patt[4] = { +static const int patt[4] = { -1,0,1,0 }; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index b85bd3ccf..a027f2e06 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -966,7 +966,7 @@ static int render_setup_fp_yuv (opengl_driver_t *this) { * List of render backends */ /* name, display, image, setup, needsrgb, defaction, fallback */ -opengl_render_t opengl_rb[] = { +static const opengl_render_t opengl_rb[] = { { "2D_Tex_Fragprog", render_tex2d, render_image_fp_yuv, render_setup_fp_yuv, 0, RENDER_NONE, 1 }, { "2D_Tex", render_tex2d, render_image_tex, @@ -1007,7 +1007,7 @@ static void *render_run (opengl_driver_t *this) { opengl_frame_t *frame; struct timeval curtime; struct timespec timeout; - opengl_render_t *render; + const opengl_render_t *render; lprintf ("* render thread created\n"); while (1) { diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 0abe2f0fc..fd19f391b 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -54,7 +54,7 @@ static void dispose_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, * is more efficient than VLD. */ -static unsigned accel_priority[] = { +static const unsigned int accel_priority[] = { #ifdef HAVE_VLDXVMC XINE_XVMC_ACCEL_VLD, #endif diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 89fbdde1a..d39c99aba 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -174,7 +174,7 @@ typedef struct { }sXYData; -static sIIRCoefficients iir_cf[] = { +static const sIIRCoefficients iir_cf[] = { /* 31 Hz*/ { EQ_REAL(9.9691562441e-01), EQ_REAL(1.5421877947e-03), EQ_REAL(1.9968961468e+00) }, /* 62 Hz*/ diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 64fe52a20..49f1f17fa 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -311,7 +311,6 @@ struct buf_element_s { int32_t size ; /* size of _content_ */ int32_t max_size; /* size of pre-allocated memory pointed to by "mem" */ - uint32_t type; int64_t pts; /* presentation time stamp, used for a/v sync */ int64_t disc_off; /* discontinuity offset */ @@ -329,6 +328,7 @@ struct buf_element_s { void *source; /* pointer to source of this buffer for */ /* free_buffer */ + uint32_t type; } ; /* keyframe should be set whenever possible (that is, when demuxer diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 2d455b67c..619a34c4c 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -59,7 +59,7 @@ typedef struct audio_db_s { } audio_db_t; -static video_db_t video_db[] = { +static const video_db_t video_db[] = { { { meFOURCC('m', 'p', 'e', 'g'), @@ -767,7 +767,7 @@ static video_db_t video_db[] = { }; -static audio_db_t audio_db[] = { +static const audio_db_t audio_db[] = { { { 0x2000, diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 28b44fd51..ec5f5c856 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -51,7 +51,7 @@ typedef struct { const char *new; } config_entry_translation_t; -static config_entry_translation_t config_entry_translation[] = { +static const config_entry_translation_t config_entry_translation[] = { { "audio.a52_pass_through", "" }, { "audio.alsa_a52_device", "audio.device.alsa_passthrough_device" }, { "audio.alsa_default_device", "audio.device.alsa_default_device" }, diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 859214d1c..f7d206c41 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -57,6 +57,9 @@ struct cfg_entry_s { char *key; int type; + /* user experience level */ + int exp_level; + /* type unknown */ char *unknown_value; @@ -80,9 +83,6 @@ struct cfg_entry_s { char *description; char *help; - /* user experience level */ - int exp_level; - /* callback function and data for live changeable values */ xine_config_cb_t callback; void *callback_data; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index d35eba736..c72241487 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -96,7 +96,7 @@ static void remove_segv_handler(void){ #endif /* 0 */ -static int plugin_iface_versions[] = { +static const int plugin_iface_versions[] = { INPUT_PLUGIN_IFACE_VERSION, DEMUXER_PLUGIN_IFACE_VERSION, AUDIO_DECODER_IFACE_VERSION, diff --git a/src/xine-engine/metronom.h b/src/xine-engine/metronom.h index 1628ba9fd..e4115b6ad 100644 --- a/src/xine-engine/metronom.h +++ b/src/xine-engine/metronom.h @@ -336,8 +336,6 @@ metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_PROTECTED; struct scr_plugin_s { - int interface_version; - int (*get_priority) (scr_plugin_t *self); /* @@ -358,6 +356,8 @@ struct scr_plugin_s void (*exit) (scr_plugin_t *self); metronom_clock_t *clock; + + int interface_version; }; #ifdef __cplusplus diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h index 6c7be8f0b..e8212acff 100644 --- a/src/xine-engine/osd.h +++ b/src/xine-engine/osd.h @@ -57,8 +57,6 @@ struct osd_object_s { uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */ uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */ - int32_t handle; - #ifdef HAVE_ICONV iconv_t cd; /* iconv handle of encoding */ char *encoding; /* name of encoding */ @@ -66,6 +64,8 @@ struct osd_object_s { osd_font_t *font; osd_ft2context_t *ft2; + + int32_t handle; }; /* this one is public */ @@ -74,6 +74,8 @@ struct xine_osd_s { }; struct osd_renderer_s { + + xine_stream_t *stream; /* * open a new osd object. this will allocated an empty (all zero) drawing @@ -219,8 +221,6 @@ struct osd_renderer_s { osd_object_t *osds; /* instances of osd */ osd_font_t *fonts; /* loaded fonts */ int textpalette; /* default textpalette */ - - xine_stream_t *stream; }; diff --git a/src/xine-engine/plugin_catalog.h b/src/xine-engine/plugin_catalog.h index 5bd1c4701..547521ce3 100644 --- a/src/xine-engine/plugin_catalog.h +++ b/src/xine-engine/plugin_catalog.h @@ -48,8 +48,8 @@ typedef struct { char *filename; off_t filesize; time_t filemtime; - int ref; /* count number of classes */ void *lib_handle; + int ref; /* count number of classes */ int no_unload; /* set if the file can't be unloaded */ } plugin_file_t ; diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index bcdc3c54b..a3b9786ca 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -92,9 +92,6 @@ struct post_plugin_s { */ void (*dispose) (post_plugin_t *this); - /* has dispose been called */ - int dispose_pending; - /* plugins don't have to init the stuff below */ /* @@ -119,6 +116,9 @@ struct post_plugin_s { /* used by plugin loader */ void *node; + + /* has dispose been called */ + int dispose_pending; }; /* helper function to initialize a post_plugin_t */ @@ -290,15 +290,15 @@ struct post_audio_port_s { /* the original port to call its functions from inside yours */ xine_audio_port_t *original_port; - /* usage counter: how many objects are floating around that need - * these pointers to exist */ - int usage_count; - pthread_mutex_t usage_lock; - /* the stream we are being fed by; NULL means no stream is connected; * this may be an anonymous stream */ xine_stream_t *stream; + pthread_mutex_t usage_lock; + /* usage counter: how many objects are floating around that need + * these pointers to exist */ + int usage_count; + /* some values remembered by port->open() */ uint32_t bits; uint32_t rate; diff --git a/src/xine-engine/refcounter.h b/src/xine-engine/refcounter.h index 640366b1f..739a6ad62 100644 --- a/src/xine-engine/refcounter.h +++ b/src/xine-engine/refcounter.h @@ -31,9 +31,9 @@ typedef struct { pthread_mutex_t lock; - int count; void* object; /* referenced object */ void (*destructor)(void *); /* object destructor */ + int count; } refcounter_t; typedef void (*refcounter_destructor)(void*); diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 7b42c43ed..f0f98354b 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -130,6 +130,9 @@ struct vo_frame_s { /* cropping to be done */ int crop_left, crop_right, crop_top, crop_bottom; + int lock_counter; + pthread_mutex_t mutex; /* protect access to lock_count */ + /* extra info coming from input or demuxers */ extra_info_t *extra_info; @@ -158,8 +161,6 @@ struct vo_frame_s { * obs: changing anything here will require recompiling vo drivers */ struct vo_frame_s *next; - int lock_counter; - pthread_mutex_t mutex; /* protect access to lock_count */ int id; /* debugging - track this frame */ int is_first; diff --git a/src/xine-engine/video_overlay.h b/src/xine-engine/video_overlay.h index 1e7a2bcca..d8711363b 100644 --- a/src/xine-engine/video_overlay.h +++ b/src/xine-engine/video_overlay.h @@ -46,58 +46,23 @@ #define OVERLAY_EVENT_MENU_BUTTON 3 #define OVERLAY_EVENT_FREE_HANDLE 8 /* Frees a handle, previous allocated via get_handle */ -/* number of colors in the overlay palette. Currently limited to 256 - at most, because some alphablend functions use an 8-bit index into - the palette. This should probably be classified as a bug. */ -/* FIXME: Also defines in video_out.h */ -#define OVL_PALETTE_SIZE 256 - -typedef struct vo_buttons_s { - int32_t type; /* 0:Button not valid, - 1:Button Valid, no auto_action, - 2:Button Valid, auto_action. - */ - - /* The following clipping coordinates are relative to the left upper corner - * of the OVERLAY, not of the target FRAME. Please do not mix them up! */ - int32_t hili_top; - int32_t hili_bottom; - int32_t hili_left; - int32_t hili_right; - int32_t up; - int32_t down; - int32_t left; - int32_t right; - uint32_t select_color[OVL_PALETTE_SIZE]; - uint8_t select_trans[OVL_PALETTE_SIZE]; - xine_event_t select_event; - uint32_t active_color[OVL_PALETTE_SIZE]; - uint8_t active_trans[OVL_PALETTE_SIZE]; - xine_event_t active_event; - int32_t hili_rgb_clut; /* true if clut was converted to rgb*/ - /* FIXME: Probably not needed ^^^ */ -} vo_buttons_t; - typedef struct video_overlay_object_s { int32_t handle; /* Used to match Show and Hide events. */ uint32_t object_type; /* 0=Subtitle, 1=Menu */ int64_t pts; /* Needed for Menu button compares */ vo_overlay_t *overlay; /* The image data. */ - uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */ uint32_t *palette; /* If NULL, no palette contained in this event. */ - int32_t buttonN; /* Current highlighed button. 0 means no info on which button to higlight */ - /* -1 means don't use this button info. */ - vo_buttons_t button[32]; /* Info regarding each button on the overlay */ + uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */ } video_overlay_object_t; /* This will hold all details of an event item, needed for event queue to function */ typedef struct video_overlay_event_s { - uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */ int64_t vpts; /* Time when event will action. 0 means action now */ /* Once video_out blend_yuv etc. can take rle_elem_t with Colour, blend and length information. * we can remove clut and blend from this structure. * This will allow for many more colours for OSD. */ + uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */ video_overlay_object_t object; /* The image data. */ } video_overlay_event_t; diff --git a/src/xine-engine/vo_scale.h b/src/xine-engine/vo_scale.h index 917b6c99e..793ab1eb7 100644 --- a/src/xine-engine/vo_scale.h +++ b/src/xine-engine/vo_scale.h @@ -100,6 +100,9 @@ struct vo_scale_s { int gui_width, gui_height; int gui_win_x, gui_win_y; + /* */ + int force_redraw; + /* * video + display pixel aspect * One pixel of height 1 has this width @@ -121,10 +124,6 @@ struct vo_scale_s { int output_yoffset; - /* */ - int force_redraw; - - /* gui callbacks */ void *user_data; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 30899a4b3..cca3108ce 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -103,14 +103,14 @@ struct xine_s { plugin_catalog_t *plugin_catalog; + int verbosity; + int demux_strategy; char *save_path; /* log output that may be presented to the user */ scratch_buffer_t *log_buffers[XINE_LOG_NUM]; - int verbosity; - xine_list_t *streams; pthread_mutex_t streams_lock; @@ -184,9 +184,9 @@ struct xine_event_queue_s { pthread_cond_t events_processed; xine_stream_t *stream; pthread_t *listener_thread; + void *user_data; xine_event_listener_cb_t callback; int callback_running; - void *user_data; }; /* @@ -204,9 +204,6 @@ struct xine_stream_s { /* demuxers use input_plugin to read data */ input_plugin_t *input_plugin; - /* current content detection method, see METHOD_BY_xxx */ - int content_detection_method; - /* used by video decoders */ xine_video_port_t *video_out; @@ -240,6 +237,9 @@ struct xine_stream_s { int spu_channel_letterbox; int spu_channel; + /* current content detection method, see METHOD_BY_xxx */ + int content_detection_method; + #ifdef XINE_ENGINE_INTERNAL /* these are private variables, plugins must not access them */ @@ -247,27 +247,38 @@ struct xine_stream_s { /* lock controlling speed change access */ pthread_mutex_t speed_change_lock; - int ignore_speed_change; /* speed changes during stop can be disastrous */ + uint32_t ignore_speed_change:1; /*< speed changes during stop can be disastrous */ + uint32_t video_thread_created:1; + uint32_t audio_thread_created:1; + uint32_t first_frame_flag:2; + uint32_t demux_action_pending:1; + uint32_t demux_thread_created:1; + uint32_t demux_thread_running:1; + uint32_t slave_is_subtitle:1; /*< ... and will be automaticaly disposed */ + uint32_t emergency_brake:1; /*< something went really wrong and this stream must be + * stopped. usually due some fatal error on output + * layers as they cannot call xine_stop. */ + uint32_t early_finish_event:1; /*< do not wait fifos get empty before sending event */ + uint32_t gapless_switch:1; /*< next stream switch will be gapless */ input_class_t *eject_class; demux_plugin_t *demux_plugin; /* vo_driver_t *video_driver;*/ pthread_t video_thread; - int video_thread_created; video_decoder_t *video_decoder_plugin; - int video_decoder_streamtype; extra_info_t *video_decoder_extra_info; + int video_decoder_streamtype; int video_channel; + uint32_t audio_track_map[50]; + int audio_track_map_entries; + + int audio_decoder_streamtype; pthread_t audio_thread; - int audio_thread_created; audio_decoder_t *audio_decoder_plugin; - int audio_decoder_streamtype; extra_info_t *audio_decoder_extra_info; - uint32_t audio_track_map[50]; - int audio_track_map_entries; uint32_t audio_type; /* *_user: -2 => off -1 => auto (use *_auto value) @@ -299,7 +310,6 @@ struct xine_stream_s { char *meta_info[XINE_STREAM_INFO_MAX]; /* seeking slowdown */ - int first_frame_flag; pthread_mutex_t first_frame_lock; pthread_cond_t first_frame_reached; @@ -317,34 +327,25 @@ struct xine_stream_s { /* demux thread stuff */ pthread_t demux_thread; - int demux_thread_created; - int demux_thread_running; pthread_mutex_t demux_lock; - int demux_action_pending; pthread_mutex_t demux_mutex; /* used in _x_demux_... functions to synchronize order of pairwise A/V buffer operations */ extra_info_t *current_extra_info; pthread_mutex_t current_extra_info_lock; int video_seek_count; - xine_post_out_t video_source; - xine_post_out_t audio_source; - - int slave_is_subtitle; /* ... and will be automaticaly disposed */ + int delay_finish_event; /* delay event in 1/10 sec units. 0=>no delay, -1=>forever */ + int slave_affection; /* what operations need to be propagated down to the slave? */ int err; + xine_post_out_t video_source; + xine_post_out_t audio_source; + broadcaster_t *broadcaster; refcounter_t *refcounter; - - int emergency_brake; /* something went really wrong and this stream must be - * stopped. usually due some fatal error on output - * layers as they cannot call xine_stop. */ - int early_finish_event; /* do not wait fifos get empty before sending event */ - int gapless_switch; /* next stream switch will be gapless */ - int delay_finish_event; /* delay event in 1/10 sec units. 0=>no delay, -1=>forever */ #endif }; |