diff options
Diffstat (limited to 'src/dxr3')
-rw-r--r-- | src/dxr3/Makefile.am | 2 | ||||
-rw-r--r-- | src/dxr3/dxr3.h | 20 | ||||
-rw-r--r-- | src/dxr3/dxr3_decode_spu.c | 20 | ||||
-rw-r--r-- | src/dxr3/dxr3_decode_video.c | 25 | ||||
-rw-r--r-- | src/dxr3/dxr3_spu_encoder.c | 8 | ||||
-rw-r--r-- | src/dxr3/video_out_dxr3.c | 19 |
6 files changed, 38 insertions, 56 deletions
diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index 692e82c84..541306ab9 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -44,4 +44,4 @@ xineplug_vo_out_dxr3_la_SOURCES = \ video_out_dxr3.c xineplug_vo_out_dxr3_la_CFLAGS = $(AM_CFLAGS) $(AVUTIL_CFLAGS) -xineplug_vo_out_dxr3_la_LIBADD = $(link_fame) $(link_rte) $(link_x_libs) $(XINE_LIB) $(LTLIBINTL) $(DYNAMIC_LD_LIBS) $(AVUTIL_LIBS) -lm +xineplug_vo_out_dxr3_la_LIBADD = $(XINE_LIB) $(link_fame) $(link_rte) $(link_x_libs) $(LTLIBINTL) $(DYNAMIC_LD_LIBS) $(AVUTIL_LIBS) -lm diff --git a/src/dxr3/dxr3.h b/src/dxr3/dxr3.h index 0b0961ca0..12dedf07f 100644 --- a/src/dxr3/dxr3.h +++ b/src/dxr3/dxr3.h @@ -25,6 +25,10 @@ #include <xine/xine_internal.h> +#ifndef LOG_VID +#define LOG_VID 0 +#endif + /* data for the device name config entry */ #define CONF_KEY "dxr3.device_number" #define CONF_NAME _("DXR3 device number") @@ -37,5 +41,19 @@ * (used by decoders to check for dxr3 presence) */ #define DXR3_VO_ID "dxr3" -#endif +/* inline helper implementations */ +static inline int dxr3_present(xine_stream_t *stream) +{ + int present = 0; + + if (stream->video_driver && stream->video_driver->node && + stream->video_driver->node->plugin_class ) { + const video_driver_class_t *const vo_class = (video_driver_class_t *)stream->video_driver->node->plugin_class; + if (vo_class->identifier) + present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0); + } + llprintf(LOG_VID, "dxr3 %s\n", present ? "present" : "not present"); + return present; +} +#endif diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c index 8280d4714..01dd20b05 100644 --- a/src/dxr3/dxr3_decode_spu.c +++ b/src/dxr3/dxr3_decode_spu.c @@ -64,7 +64,7 @@ static void *dxr3_spudec_init_plugin(xine_t *xine, void *); /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_DVD, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_DVD, 0 }; static const decoder_info_t dxr3_spudec_info = { supported_types, /* supported types */ @@ -142,24 +142,6 @@ static int dxr3_spudec_copy_nav_to_btn(dxr3_spudec_t *this, int32_t mode static inline void dxr3_swab_clut(int* clut); /* inline helper implementations */ -static inline int dxr3_present(xine_stream_t *stream) -{ - plugin_node_t *node; - video_driver_class_t *vo_class; - int present = 0; - - if (stream->video_driver && stream->video_driver->node) { - node = (plugin_node_t *)stream->video_driver->node; - if (node->plugin_class) { - vo_class = (video_driver_class_t *)node->plugin_class; - if (vo_class->identifier) - present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0); - } - } - llprintf(LOG_SPU, "dxr3 %s\n", present ? "present" : "not present"); - return present; -} - static inline void dxr3_spudec_clear_nav_list(dxr3_spudec_t *this) { while (this->pci_cur.next) { diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c index 39da80249..4347fb808 100644 --- a/src/dxr3/dxr3_decode_video.c +++ b/src/dxr3/dxr3_decode_video.c @@ -65,7 +65,7 @@ static void *dxr3_init_plugin(xine_t *xine, void *); /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; +static const uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; static const decoder_info_t dxr3_video_decoder_info = { supported_types, /* supported types */ @@ -143,7 +143,6 @@ typedef struct dxr3_decoder_s { } dxr3_decoder_t; /* helper functions */ -static inline int dxr3_present(xine_stream_t *stream); static inline int dxr3_mvcommand(int fd_control, int command); static void parse_mpeg_header(dxr3_decoder_t *this, uint8_t *buffer); static int get_duration(dxr3_decoder_t *this); @@ -156,24 +155,6 @@ static void dxr3_update_enhanced_mode(void *this_gen, xine_cfg_entry_t *ent static void dxr3_update_correct_durations(void *this_gen, xine_cfg_entry_t *entry); /* inline helper implementations */ -static inline int dxr3_present(xine_stream_t *stream) -{ - plugin_node_t *node; - video_driver_class_t *vo_class; - int present = 0; - - if (stream->video_driver && stream->video_driver->node) { - node = (plugin_node_t *)stream->video_driver->node; - if (node->plugin_class) { - vo_class = (video_driver_class_t *)node->plugin_class; - if (vo_class->identifier) - present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0); - } - } - llprintf(LOG_VID, "dxr3 %s\n", present ? "present" : "not present"); - return present; -} - static inline int dxr3_mvcommand(int fd_control, int command) { em8300_register_t reg; @@ -208,7 +189,7 @@ static void *dxr3_init_plugin(xine_t *xine, void *data) static video_decoder_t *dxr3_open_plugin(video_decoder_class_t *class_gen, xine_stream_t *stream) { - static char *panscan_types[] = { "only when forced", "use MPEG hint", "use DVB hint", NULL }; + static const char *const panscan_types[] = { "only when forced", "use MPEG hint", "use DVB hint", NULL }; dxr3_decoder_t *this; dxr3_decoder_class_t *class = (dxr3_decoder_class_t *)class_gen; config_values_t *cfg; @@ -625,7 +606,7 @@ static void dxr3_flush(video_decoder_t *this_gen) * (the highlights won't move without), but some dvds have stills * with no sequence end code. Since it is very likely that flush() is called * in still situations, we send one here. */ - static uint8_t end_buffer[4] = { 0x00, 0x00, 0x01, 0xb7 }; + static const uint8_t end_buffer[4] = { 0x00, 0x00, 0x01, 0xb7 }; write(this->fd_video, &end_buffer, 4); this->sequence_open = 0; xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "dxr3_decode_video: WARNING: added missing end sequence\n"); diff --git a/src/dxr3/dxr3_spu_encoder.c b/src/dxr3/dxr3_spu_encoder.c index 1dcc13b77..2517063ac 100644 --- a/src/dxr3/dxr3_spu_encoder.c +++ b/src/dxr3/dxr3_spu_encoder.c @@ -167,11 +167,11 @@ static void create_histogram(spu_encoder_t *this) #ifdef LOG for (i = 0; i < OVL_PALETTE_SIZE; i++) if (this->map[i]) - lprintf("histogram: color #%d 0x%.8x appears %d times\n", + lprintf("histogram: colour #%d 0x%.8x appears %d times\n", i, this->overlay->color[i], this->map[i]); for (i = 0; i < OVL_PALETTE_SIZE; i++) if (this->clip_map[i]) - lprintf("histogram: clip color #%d 0x%.8x appears %d times\n", + lprintf("histogram: clip colour #%d 0x%.8x appears %d times\n", i, this->overlay->hili_color[i], this->clip_map[i]); #endif } @@ -209,7 +209,7 @@ static void generate_clut(spu_encoder_t *this) } #ifdef LOG for (spu_color = 0; spu_color < 4; spu_color++) - lprintf("spu color %d: 0x%.8x, trans: %d\n", spu_color, + lprintf("spu colour %d: 0x%.8x, trans: %d\n", spu_color, this->color[spu_color], this->trans[spu_color]); #endif @@ -243,7 +243,7 @@ static void generate_clut(spu_encoder_t *this) } #ifdef LOG for (spu_color = 0; spu_color < 4; spu_color++) - lprintf("spu clip color %d: 0x%.8x, trans: %d\n", spu_color, + lprintf("spu clip colour %d: 0x%.8x, trans: %d\n", spu_color, this->hili_color[spu_color], this->hili_trans[spu_color]); #endif } diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c index ce1d85918..5559f18ca 100644 --- a/src/dxr3/video_out_dxr3.c +++ b/src/dxr3/video_out_dxr3.c @@ -208,13 +208,14 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v static char *available_encoders[SUPPORTED_ENCODER_COUNT + 2]; plugin_node_t *node; + static const char *const videoout_modes[] = { + "letterboxed tv", "widescreen tv", #ifdef HAVE_X11 - static const char const *videoout_modes[] = { "letterboxed tv", "widescreen tv", - "letterboxed overlay", "widescreen overlay", NULL }; -#else - static const char const *videoout_modes[] = { "letterboxed tv", "widescreen tv", NULL }; + "letterboxed overlay", "widescreen overlay", #endif - static const char const *tv_modes[] = { "ntsc", "pal", "pal60" , "default", NULL }; + NULL + }; + static const char *const tv_modes[] = { "ntsc", "pal", "pal60" , "default", NULL }; int list_id, list_size; xine_sarray_t *plugin_list; @@ -419,13 +420,13 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v this->tv_switchable = 1; this->widescreen_enabled = confnum - 2; confstr = config->register_string(config, "dxr3.output.keycolor", "0x80a040", - _("overlay colorkey value"), _("Hexadecimal RGB value of the key color.\n" + _("overlay colour key value"), _("Hexadecimal RGB value of the key colour.\n" "You can try different values, if you experience windows becoming transparent " "when using DXR3 overlay mode."), 20, NULL, NULL); sscanf(confstr, "%x", &this->overlay.colorkey); confstr = config->register_string(config, "dxr3.output.keycolor_interval", "50.0", - _("overlay colorkey tolerance"), _("A greater value widens the tolerance for " - "the overlay keycolor.\nYou can try lower values, if you experience windows " + _("overlay colour key tolerance"), _("A greater value widens the tolerance for " + "the overlay key colour.\nYou can try lower values, if you experience windows " "becoming transparent when using DXR3 overlay mode, but parts of the image borders may " "disappear when using a too low setting."), 20, NULL, NULL); sscanf(confstr, "%f", &this->overlay.color_interval); @@ -497,7 +498,7 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v if (dxr3_overlay_set_keycolor(&this->overlay) != 0) xprintf(this->class->xine, XINE_VERBOSITY_DEBUG, - "video_out_dxr3: setting the overlay keycolor failed.\n"); + "video_out_dxr3: setting the overlay key colour failed.\n"); if (dxr3_overlay_set_attributes(&this->overlay) != 0) xprintf(this->class->xine, XINE_VERBOSITY_DEBUG, "video_out_dxr3: setting an overlay attribute failed.\n"); |