diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-31 14:06:03 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-31 14:06:03 +0000 |
commit | 8695f5d8c99952a89f59b314c58a5e0bbd8a6e6e (patch) | |
tree | 47af2fb780645208a11b0e3bcea97e709c050330 /src/demuxers/demux_real.c | |
parent | 112c134d4636786c1b0e22839bd782d9554b961e (diff) | |
download | xine-lib-8695f5d8c99952a89f59b314c58a5e0bbd8a6e6e.tar.gz xine-lib-8695f5d8c99952a89f59b314c58a5e0bbd8a6e6e.tar.bz2 |
- MAX_PREVIEW_SIZE = 4096
- new fb driver with zero copy
CVS patchset: 4058
CVS date: 2003/01/31 14:06:03
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r-- | src/demuxers/demux_real.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index ecdc4d883..fe9863d87 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -28,7 +28,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.39 2003/01/29 18:53:56 miguelfreitas Exp $ + * $Id: demux_real.c,v 1.40 2003/01/31 14:06:10 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -645,8 +645,7 @@ static int demux_real_parse_references( demux_real_t *this) { ; j--; buf[j]='\0'; - printf("demux_real: ref=%s\n", &buf[i]); - + uevent.type = XINE_EVENT_MRL_REFERENCE; uevent.stream = this->stream; uevent.data_length = strlen(&buf[i])+sizeof(xine_mrl_reference_data_t); @@ -1128,13 +1127,13 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str input_plugin_t *input = (input_plugin_t *) input_gen; demux_real_t *this; + uint8_t buf[MAX_PREVIEW_SIZE+1]; + int len; switch (stream->content_detection_method) { case METHOD_BY_CONTENT: { - uint8_t buf[4096], len; - if ((input->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) { input->seek(input, 0, SEEK_SET); @@ -1214,28 +1213,24 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str /* discover stream type */ - { - uint8_t buf[4096], len; - - this->reference_mode = 0; - if ((len = input->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) { - - input->seek(input, 0, SEEK_SET); + this->reference_mode = 0; + if ((len = input->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) { - if ( (len = input->read(input, buf, 1024)) > 0) { - if (real_check_stream_type(buf,len) == 2) - this->reference_mode = 1; - } + input->seek(input, 0, SEEK_SET); - } else if ((len = input->get_optional_data (input, buf, INPUT_OPTIONAL_DATA_PREVIEW))) { - + if ( (len = input->read(input, buf, 1024)) > 0) { if (real_check_stream_type(buf,len) == 2) this->reference_mode = 1; } - - if(this->reference_mode) - printf("demux_real: reference stream detected\n"); + + } else if ((len = input->get_optional_data (input, buf, INPUT_OPTIONAL_DATA_PREVIEW))) { + + if (real_check_stream_type(buf,len) == 2) + this->reference_mode = 1; } + + if(this->reference_mode) + printf("demux_real: reference stream detected\n"); this->demux_plugin.send_headers = demux_real_send_headers; |