diff options
| author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-06-13 21:28:52 +0000 |
|---|---|---|
| committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-06-13 21:28:52 +0000 |
| commit | f85a943fdff3f12db8faf4b84e4f63aafdc60db3 (patch) | |
| tree | e16cc52e6b9a9548714a1ee31a5265ff34127467 /src/demuxers/demux_qt.c | |
| parent | 62f8ce9ec67fb85da1023b5db90a0a5f1609cff7 (diff) | |
| download | xine-lib-f85a943fdff3f12db8faf4b84e4f63aafdc60db3.tar.gz xine-lib-f85a943fdff3f12db8faf4b84e4f63aafdc60db3.tar.bz2 | |
implement steps 1, 2, 3 and 4 of the seeking proposal:
http://article.gmane.org/gmane.comp.video.xine.devel/9532
it is now up to demuxers to decide what the 0..65535 position means.
demuxers tested: ogg, voc, flac, rm, asf, vqa, vob, avi, y4m, au, mov, ts, mp3, mpg, wav, ra, mve
CVS patchset: 6686
CVS date: 2004/06/13 21:28:52
Diffstat (limited to 'src/demuxers/demux_qt.c')
| -rw-r--r-- | src/demuxers/demux_qt.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 78467caee..07db42a6e 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.186 2004/06/07 21:15:04 jstembridge Exp $ + * $Id: demux_qt.c,v 1.187 2004/06/13 21:28:54 miguelfreitas Exp $ * */ @@ -2296,8 +2296,9 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) { while (remaining_sample_bytes) { buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); buf->type = video_trak->properties->video.codec_buftype; - buf->extra_info->input_pos = video_trak->frames[i].offset - this->data_start; - buf->extra_info->input_length = this->data_size; + if( this->data_size ) + buf->extra_info->input_normpos = (int)( (double) (video_trak->frames[i].offset - this->data_start) + * 65535 / this->data_size); buf->extra_info->input_time = video_trak->frames[i].pts / 90; buf->pts = video_trak->frames[i].pts; @@ -2353,8 +2354,9 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) { while (remaining_sample_bytes) { buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); buf->type = audio_trak->properties->audio.codec_buftype; - buf->extra_info->input_pos = audio_trak->frames[i].offset - this->data_start; - buf->extra_info->input_length = this->data_size; + if( this->data_size ) + buf->extra_info->input_normpos = (int)( (double) (audio_trak->frames[i].offset - this->data_start) + * 65535 / this->data_size); /* The audio chunk is often broken up into multiple 8K buffers when * it is sent to the audio decoder. Only attach the proper timestamp * to the first buffer. This is for the linear PCM decoder which @@ -2716,6 +2718,9 @@ static int demux_qt_seek (demux_plugin_t *this_gen, qt_trak *video_trak = NULL; qt_trak *audio_trak = NULL; + start_pos = (off_t) ( (double) start_pos / 65535 * + this->data_size ); + int64_t keyframe_pts; /* short-circuit any attempts to seek in a non-seekable stream, including @@ -2976,6 +2981,6 @@ demuxer_info_t demux_info_qt = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 24, "quicktime", XINE_VERSION_CODE, &demux_info_qt, init_plugin }, + { PLUGIN_DEMUX, 25, "quicktime", XINE_VERSION_CODE, &demux_info_qt, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |
