diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2006-08-08 03:15:02 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2006-08-08 03:15:02 +0000 |
commit | a5761b5c1aeabd451d9358e362507edc69c605f5 (patch) | |
tree | 572b169ec8081a72aed435de706a9155d0aec20f | |
parent | 45e94a4e3640b74ceb28da94d7b867a0cab04fdb (diff) | |
download | xine-lib-a5761b5c1aeabd451d9358e362507edc69c605f5.tar.gz xine-lib-a5761b5c1aeabd451d9358e362507edc69c605f5.tar.bz2 |
patch by Chris Brien
1) Return the stream length correctly. This fixes a FIXME.
2) Set the width and height metadata.
3) Reset the demuxer status to DEMUX_OK on seek.
CVS patchset: 8165
CVS date: 2006/08/08 03:15:02
-rw-r--r-- | src/demuxers/demux_rawdv.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 55b652e18..6c7d672e8 100644 --- a/src/demuxers/demux_rawdv.c +++ b/src/demuxers/demux_rawdv.c @@ -19,7 +19,7 @@ */ /* - * $Id: demux_rawdv.c,v 1.28 2006/07/10 22:08:13 dgp85 Exp $ + * $Id: demux_rawdv.c,v 1.29 2006/08/08 03:15:02 miguelfreitas Exp $ * * demultiplexer for raw dv streams */ @@ -202,6 +202,12 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) { _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE, PAL_FRAME_SIZE * PAL_FRAME_RATE * 8); } + + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, + bih->biWidth); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, + bih->biHeight); + bih->biSize = sizeof(xine_bmiheader); bih->biPlanes = 1; bih->biBitCount = 24; @@ -312,6 +318,7 @@ static int demux_raw_dv_seek (demux_plugin_t *this_gen, _x_demux_control_newpts (this->stream, this->pts, BUF_FLAG_SEEK); + this->status = DEMUX_OK; return this->status; } @@ -322,7 +329,10 @@ static void demux_raw_dv_dispose (demux_plugin_t *this_gen) { } static int demux_raw_dv_get_stream_length(demux_plugin_t *this_gen) { - return 0 ; /*FIXME: implement */ + demux_raw_dv_t *this = (demux_raw_dv_t *) this_gen; + + return (int)((int64_t) this->duration * this->input->get_length (this->input) / + (this->frame_size * 90)); } static uint32_t demux_raw_dv_get_capabilities(demux_plugin_t *this_gen) { |