diff options
| author | phintuka <phintuka> | 2007-01-24 05:57:10 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2007-01-24 05:57:10 +0000 |
| commit | 34788daa0c1b4c74cc5114fbc07b1589fdcecf0c (patch) | |
| tree | 8401f9ff10fe02f7d3e13322b130513c1ac8c79d /xine_input_vdr.c | |
| parent | 935a335e1cc4db2451f7a6fe091fc686ceabd8fe (diff) | |
| download | xineliboutput-34788daa0c1b4c74cc5114fbc07b1589fdcecf0c.tar.gz xineliboutput-34788daa0c1b4c74cc5114fbc07b1589fdcecf0c.tar.bz2 | |
Initialize video size from stream info when playing slave streams, as
at least vidixfb driver does not call properly frontend frame output callback.
(Patch from Antti Seppälä)
Diffstat (limited to 'xine_input_vdr.c')
| -rw-r--r-- | xine_input_vdr.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index b93c5500..20c20aa2 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.72 2007-01-22 23:11:50 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.73 2007-01-24 05:57:10 phintuka Exp $ * */ @@ -2620,6 +2620,18 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) sprintf(tmp, "SLAVE 0x%lx\r\n", (unsigned long int)this->slave_stream); this->funcs.fe_control(this->funcs.fe_handle, tmp); has_video = _x_stream_info_get(this->slave_stream, XINE_STREAM_INFO_HAS_VIDEO); + + if(has_video) { + int stream_width, stream_height; + stream_width = _x_stream_info_get(this->slave_stream, XINE_STREAM_INFO_VIDEO_WIDTH); + stream_height = _x_stream_info_get(this->slave_stream, XINE_STREAM_INFO_VIDEO_HEIGHT); + + if(stream_width != this->video_width || stream_height != this->video_height) { + this->video_width = stream_width; + this->video_height = stream_height; + this->video_changed = 1; + } + } this->funcs.fe_control(this->funcs.fe_handle, has_video ? "NOVIDEO 1\r\n" : "NOVIDEO 0\r\n"); if(!has_video && *av && strcmp(av, "none")) { @@ -2644,7 +2656,7 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) LOGMSG("PLAYFILE <STOP>: Closing slave stream"); this->loop_play = 0; if(this->slave_stream) { - + int stream_width, stream_height; xine_stop(this->slave_stream); if (this->slave_event_queue) { @@ -2663,6 +2675,15 @@ static int handle_control_playfile(vdr_input_plugin_t *this, const char *cmd) if(this->funcs.fe_control) this->funcs.fe_control(this->funcs.fe_handle, "SLAVE CLOSED\r\n"); + stream_width = _x_stream_info_get(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH); + stream_height = _x_stream_info_get(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT); + + if(stream_width != this->video_width || stream_height != this->video_height) { + this->video_width = stream_width; + this->video_height = stream_height; + this->video_changed = 1; + } + _x_demux_control_start(this->stream); } } @@ -3709,7 +3730,7 @@ static void vdr_event_cb (void *user_data, const xine_event_t *event) frame_change->width, frame_change->height, frame_change->aspect); if(!frame_change->aspect) /* from frontend */ - if(this->rescale_osd) + if(this->rescale_osd) vdr_scale_osds(this, frame_change->width, frame_change->height); #if 0 if(frame_change->aspect) |
