From 7706ddf611959d5ca58c47b5618f23f9b4be496a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 7 Apr 2010 18:05:59 +0100 Subject: Add video/mp2t (and the corresponding video/mp2p). --- src/demuxers/demux_mpeg_pes.c | 2 +- src/demuxers/demux_ts.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 0fe97fb93..b2d0f2fa9 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1771,7 +1771,7 @@ static const char *get_extensions (demux_class_t *this_gen) { } static const char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "video/mp2p: m2p: MPEG2 program stream;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 1a19340f3..b55877c83 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2489,7 +2489,7 @@ static const char *get_extensions (demux_class_t *this_gen) { } static const char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "video/mp2t: m2t: MPEG2 transport stream;"; } static void class_dispose (demux_class_t *this_gen) { -- cgit v1.2.3 From edc1d619f78897a5ea382c335a1dd9b2818002fe Mon Sep 17 00:00:00 2001 From: Kelvie Wong Date: Fri, 2 Apr 2010 01:42:07 -0700 Subject: demux_tta: fix some dumb truncation errors I don't know why I multiplied by integers _outside_ the parentheses. I blame late nights. Regardless, this fixes the skip every 24 seconds due to the truncation of FRAME_TIME. The input_time is also more accurate for e.g. stopping cue tracks. --- src/demuxers/demux_tta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 03d15045d..10229ed64 100644 --- a/src/demuxers/demux_tta.c +++ b/src/demuxers/demux_tta.c @@ -129,7 +129,7 @@ static int demux_tta_send_chunk(demux_plugin_t *this_gen) { /* Get a buffer */ buf = this->audio_fifo->buffer_pool_alloc(this->audio_fifo); buf->type = BUF_AUDIO_TTA; - buf->pts = (int64_t)(FRAME_TIME * this->currentframe) * 90000; + buf->pts = (int64_t)(FRAME_TIME * this->currentframe * 90000); buf->extra_info->total_time = (int)(le2me_32(this->header.tta.data_length) * 1000.0 / le2me_32(this->header.tta.samplerate)); /* milliseconds */ buf->decoder_flags = 0; @@ -138,7 +138,7 @@ static int demux_tta_send_chunk(demux_plugin_t *this_gen) { (int) ((double) this->currentframe * 65535 / this->totalframes); /* Set time */ - buf->extra_info->input_time = (int)(FRAME_TIME * this->currentframe)*1000; + buf->extra_info->input_time = (int)(FRAME_TIME * this->currentframe * 1000); bytes_read = this->input->read(this->input, buf->content, ( bytes_to_read > buf->max_size ) ? buf->max_size : bytes_to_read); if (bytes_read < 0) { -- cgit v1.2.3 From 818165da93f72b8b32c164bcabb3eae2d4e4dc31 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 8 Apr 2010 16:04:21 +0100 Subject: Add support for Xv gamma adjustment. --- src/video_out/video_out_xcbxv.c | 4 ++++ src/video_out/video_out_xv.c | 4 ++++ src/video_out/video_out_xvmc.c | 4 ++++ src/video_out/video_out_xxmc.c | 5 +++++ src/xine-engine/video_out.c | 5 ++++- src/xine-engine/video_out.h | 1 + src/xine-engine/xine_interface.c | 2 ++ 7 files changed, 24 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index b3a141e61..e8797505b 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1502,6 +1502,10 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis xv_check_capability (this, VO_PROP_CONTRAST, attribute_it.data, adaptor_it.data->base_id, NULL, NULL, NULL); + } else if(!strcmp(name, "XV_GAMMA")) { + xv_check_capability (this, VO_PROP_GAMMA, attribute_it.data, + adaptor_it.data->base_id, + NULL, NULL, NULL); } else if(!strcmp(name, "XV_COLORKEY")) { xv_check_capability (this, VO_PROP_COLORKEY, attribute_it.data, adaptor_it.data->base_id, diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 65cd29aa4..73236ec0d 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1555,6 +1555,10 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * xv_check_capability (this, VO_PROP_CONTRAST, attr[k], adaptor_info[adaptor_num].base_id, NULL, NULL, NULL); + } else if(!strcmp(name, "XV_GAMMA")) { + xv_check_capability (this, VO_PROP_GAMMA, attr[k], + adaptor_info[adaptor_num].base_id, + NULL, NULL, NULL); } else if(!strcmp(name, "XV_COLORKEY")) { xv_check_capability (this, VO_PROP_COLORKEY, attr[k], adaptor_info[adaptor_num].base_id, diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index aeb536fc1..34b925c8f 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -1456,6 +1456,10 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi xvmc_check_capability (this, VO_PROP_CONTRAST, attr[k], adaptor_info[adaptor_num].base_id, NULL, NULL, NULL); + } else if(!strcmp(name, "XV_GAMMA")) { + xvmc_check_capability (this, VO_PROP_GAMMA, attr[k], + adaptor_info[adaptor_num].base_id, + NULL, NULL, NULL); } else if(!strcmp(name, "XV_COLORKEY")) { xvmc_check_capability (this, VO_PROP_COLORKEY, attr[k], adaptor_info[adaptor_num].base_id, diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 256e2f5a8..654cad7d9 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2581,6 +2581,11 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi adaptor_info[adaptor_num].base_id, NULL, NULL, NULL); + } else if(!strcmp(name, "XV_GAMMA")) { + xxmc_check_capability (this, VO_PROP_GAMMA, attr[k], + adaptor_info[adaptor_num].base_id, + NULL, NULL, NULL); + } else if(!strcmp(name, "XV_COLORKEY")) { xxmc_check_capability (this, VO_PROP_COLORKEY, attr[k], adaptor_info[adaptor_num].base_id, diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index d06e82afa..cd73233c3 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -1430,7 +1430,9 @@ static int vo_get_property (xine_video_port_t *this_gen, int property) { case XINE_PARAM_VO_HUE: case XINE_PARAM_VO_SATURATION: case XINE_PARAM_VO_CONTRAST: - case XINE_PARAM_VO_BRIGHTNESS: { + case XINE_PARAM_VO_BRIGHTNESS: + case XINE_PARAM_VO_GAMMA: + { int v, min_v, max_v, range_v; pthread_mutex_lock( &this->driver_lock ); @@ -1523,6 +1525,7 @@ static int vo_set_property (xine_video_port_t *this_gen, int property, int value case XINE_PARAM_VO_SATURATION: case XINE_PARAM_VO_CONTRAST: case XINE_PARAM_VO_BRIGHTNESS: + case XINE_PARAM_VO_GAMMA: if (!this->grab_only) { int v, min_v, max_v, range_v; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index b1a517565..9a4bd56c9 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -235,6 +235,7 @@ struct xine_video_port_s { #define VO_PROP_PAN_SCAN 9 #define VO_PROP_TVMODE 10 #define VO_PROP_MAX_NUM_FRAMES 11 +#define VO_PROP_GAMMA 12 #define VO_PROP_ZOOM_Y 13 #define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */ #define VO_PROP_WINDOW_WIDTH 15 /* read-only */ diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index e39c19817..62de42678 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -478,6 +478,7 @@ void xine_set_param (xine_stream_t *stream, int param, int value) { case XINE_PARAM_VO_SATURATION: case XINE_PARAM_VO_CONTRAST: case XINE_PARAM_VO_BRIGHTNESS: + case XINE_PARAM_VO_GAMMA: case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_ASPECT_RATIO: case XINE_PARAM_VO_ZOOM_X: @@ -642,6 +643,7 @@ int xine_get_param (xine_stream_t *stream, int param) { case XINE_PARAM_VO_SATURATION: case XINE_PARAM_VO_CONTRAST: case XINE_PARAM_VO_BRIGHTNESS: + case XINE_PARAM_VO_GAMMA: case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_ASPECT_RATIO: case XINE_PARAM_VO_ZOOM_X: -- cgit v1.2.3