diff options
author | phintuka <phintuka> | 2008-06-12 22:14:15 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-06-12 22:14:15 +0000 |
commit | 4af7ec570972eec5bba2635c4f6642976ea03cc4 (patch) | |
tree | 4e60bfe0419b4d8dbd28167841077ec94e5d359d | |
parent | 2cc86aadc69b99f6c99c9a1f43339f676b1e5c6f (diff) | |
download | xineliboutput-4af7ec570972eec5bba2635c4f6642976ea03cc4.tar.gz xineliboutput-4af7ec570972eec5bba2635c4f6642976ea03cc4.tar.bz2 |
Splitting large vdr_plugin_read_block (demux_buf)
-rw-r--r-- | xine_input_vdr.c | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 33d40b1b..ba29fe30 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.149 2008-06-12 22:09:56 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.150 2008-06-12 22:14:15 phintuka Exp $ * */ @@ -5079,6 +5079,36 @@ buf_element_t *post_frame_h264(vdr_input_plugin_t *this, buf_element_t *buf) #endif /* TEST_H264 */ /* + * Demux some buffers not supported by mpeg_block demuxer: + * - H.264 video + * - DVB Subtitles + */ +static buf_element_t *demux_buf(vdr_input_plugin_t *this, buf_element_t *buf) +{ +#ifdef TEST_H264 + /* H.264 */ + if (IS_VIDEO_PACKET(buf->content)) { + if (this->h264) { + if (this->h264 < 0) + this->h264 = detect_h264(this, buf->content, buf->size); + + if (this->h264 > 0) + buf = post_frame_h264(this, buf); + } + return buf; + } +#endif + +#ifdef TEST_DVB_SPU + /* DVB subtitles */ + if (buf->content[3] == PRIVATE_STREAM1) { + } +#endif + + return buf; +} + +/* * Postprocess buffer before passing it to demuxer * - Track audio stream changes * - Detect pts wraps @@ -5342,19 +5372,7 @@ static buf_element_t *vdr_plugin_read_block (input_plugin_t *this_gen, pthread_mutex_unlock(&this->lock); -#ifdef TEST_H264 - /* H.264 */ - if(this->h264 && (buf->content[3] & 0xf0) == 0xe0) { - if(this->h264 < 0) - this->h264 = detect_h264(this, buf->content, buf->size); - - if(this->h264 > 0) { - buf = post_frame_h264(this, buf); - if(!buf) - continue; - } - } -#endif + buf = demux_buf(this, buf); } while(!buf); |