From 4b7cfbfb7aa9d3af0f483b15b32882aa453f87a7 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 10 Jan 2003 11:57:15 +0000 Subject: internal input_time is miliseconds now CVS patchset: 3851 CVS date: 2003/01/10 11:57:15 --- src/demuxers/demux_aiff.c | 4 ++-- src/demuxers/demux_asf.c | 6 +++--- src/demuxers/demux_aud.c | 4 ++-- src/demuxers/demux_avi.c | 6 +++--- src/demuxers/demux_cda.c | 4 ++-- src/demuxers/demux_cdda.c | 4 ++-- src/demuxers/demux_eawve.c | 4 ++-- src/demuxers/demux_film.c | 8 ++++---- src/demuxers/demux_fli.c | 4 ++-- src/demuxers/demux_idcin.c | 6 +++--- src/demuxers/demux_ipmovie.c | 8 ++++---- src/demuxers/demux_mng.c | 4 ++-- src/demuxers/demux_mpeg.c | 6 +++--- src/demuxers/demux_mpeg_block.c | 6 +++--- src/demuxers/demux_mpgaudio.c | 6 +++--- src/demuxers/demux_nsf.c | 4 ++-- src/demuxers/demux_ogg.c | 5 +++-- src/demuxers/demux_pva.c | 4 ++-- src/demuxers/demux_qt.c | 8 ++++---- src/demuxers/demux_rawdv.c | 4 ++-- src/demuxers/demux_real.c | 8 +++++--- src/demuxers/demux_realaudio.c | 4 ++-- src/demuxers/demux_smjpeg.c | 4 ++-- src/demuxers/demux_snd.c | 4 ++-- src/demuxers/demux_str.c | 4 ++-- src/demuxers/demux_voc.c | 4 ++-- src/demuxers/demux_vox.c | 4 ++-- src/demuxers/demux_vqa.c | 6 +++--- src/demuxers/demux_wav.c | 4 ++-- src/demuxers/demux_wc3movie.c | 6 +++--- src/xine-engine/xine.c | 4 ++-- src/xine-engine/xine_internal.h | 7 +++++-- 32 files changed, 85 insertions(+), 79 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index 57e1c5e4b..948a1a096 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -19,7 +19,7 @@ * * AIFF File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_aiff.c,v 1.22 2003/01/06 06:06:52 tmmm Exp $ + * $Id: demux_aiff.c,v 1.23 2003/01/10 11:57:15 miguelfreitas Exp $ * */ @@ -208,7 +208,7 @@ static int demux_aiff_send_chunk (demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = current_pts / 90000; + buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 0b30b5560..0bf92a2c6 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_asf.c,v 1.95 2003/01/09 02:57:32 miguelfreitas Exp $ + * $Id: demux_asf.c,v 1.96 2003/01/10 11:57:15 miguelfreitas Exp $ * * demultiplexer for asf streams * @@ -805,7 +805,7 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream, buf->extra_info->input_pos = this->input->get_current_pos (this->input); if (this->rate) - buf->extra_info->input_time = buf->extra_info->input_pos / this->rate; + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / this->rate; else buf->extra_info->input_time = 0; @@ -902,7 +902,7 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream, buf->extra_info->input_pos = this->input->get_current_pos (this->input); if (this->rate) - buf->extra_info->input_time = buf->extra_info->input_pos / this->rate; + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / this->rate; else buf->extra_info->input_time = 0; diff --git a/src/demuxers/demux_aud.c b/src/demuxers/demux_aud.c index d2bf415b6..574ac5522 100644 --- a/src/demuxers/demux_aud.c +++ b/src/demuxers/demux_aud.c @@ -32,7 +32,7 @@ * data. This makes seeking conceptually impossible. Upshot: Random * seeking is not supported. * - * $Id: demux_aud.c,v 1.2 2003/01/04 14:48:11 miguelfreitas Exp $ + * $Id: demux_aud.c,v 1.3 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -177,7 +177,7 @@ static int demux_aud_send_chunk(demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->pts = audio_pts; if (chunk_size > buf->max_size) diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 782ec187a..470d565fc 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.145 2003/01/09 13:26:03 miguelfreitas Exp $ + * $Id: demux_avi.c,v 1.146 2003/01/10 11:57:16 miguelfreitas Exp $ * * demultiplexer for avi streams * @@ -1088,7 +1088,7 @@ static int demux_avi_next (demux_avi_t *this, int decoder_flags) { return 0; } - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->extra_info->input_pos = this->input->get_current_pos(this->input); buf->type = audio->audio_type | i; @@ -1112,7 +1112,7 @@ static int demux_avi_next (demux_avi_t *this, int decoder_flags) { buf->size = AVI_read_video (this, this->avi, buf->mem, 2048, &buf->decoder_flags); buf->type = this->avi->video_type; - buf->extra_info->input_time = video_pts / 90000; + buf->extra_info->input_time = video_pts / 90; buf->extra_info->input_pos = this->input->get_current_pos(this->input); /* use video_frames-2 instead of video_frames-1 to fix problems with weird non-interleaved streams */ diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c index fa159ab58..cba798f36 100644 --- a/src/demuxers/demux_cda.c +++ b/src/demuxers/demux_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_cda.c,v 1.38 2003/01/04 14:48:11 miguelfreitas Exp $ + * $Id: demux_cda.c,v 1.39 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -80,7 +80,7 @@ static int demux_cda_next (demux_cda_t *this) { buf->pts = 0; buf->extra_info->input_pos = pos; - buf->extra_info->input_time = buf->extra_info->input_pos / this->blocksize; + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / this->blocksize; buf->type = BUF_CONTROL_NOP; /* Fake */ this->video_fifo->put(this->video_fifo, buf); diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c index f469da5b9..0c276ebee 100644 --- a/src/demuxers/demux_cdda.c +++ b/src/demuxers/demux_cdda.c @@ -22,7 +22,7 @@ * linear PCM "decoder" (which in turn sends them directly to the audio * output target; this is a really fancy CD-playing architecture). * - * $Id: demux_cdda.c,v 1.1 2003/01/05 06:48:16 tmmm Exp $ + * $Id: demux_cdda.c,v 1.2 2003/01/10 11:57:16 miguelfreitas Exp $ * */ @@ -94,7 +94,7 @@ static int demux_cdda_send_chunk (demux_plugin_t *this_gen) { buf->pts = buf->extra_info->input_pos; buf->pts *= 90000; buf->pts /= CD_BYTES_PER_SECOND; - buf->extra_info->input_time = buf->pts / 90000; + buf->extra_info->input_time = buf->pts / 90; buf->decoder_flags |= BUF_FLAG_FRAME_END; if (this->seek_flag) { diff --git a/src/demuxers/demux_eawve.c b/src/demuxers/demux_eawve.c index 01d0e6a55..f9fdb414a 100644 --- a/src/demuxers/demux_eawve.c +++ b/src/demuxers/demux_eawve.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_eawve.c,v 1.13 2003/01/04 14:48:11 miguelfreitas Exp $ + * $Id: demux_eawve.c,v 1.14 2003/01/10 11:57:16 miguelfreitas Exp $ * * demux_eawve.c, Demuxer plugin for Electronic Arts' WVE file format * @@ -233,7 +233,7 @@ static int demux_eawve_send_chunk(demux_eawve_t *this) buf = this->audio_fifo->buffer_pool_alloc(this->audio_fifo); buf->type = BUF_AUDIO_EA_ADPCM; buf->extra_info->input_pos = this->input->get_current_pos(this->input); - buf->extra_info->input_time = this->sample_counter / 22050; + buf->extra_info->input_time = this->sample_counter * 1000 / 22050; buf->pts = this->sample_counter; buf->pts *= 90000; buf->pts /= 22050; diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 48f46803d..aafe45482 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.51 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_film.c,v 1.52 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -344,7 +344,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { buf->extra_info->input_pos = this->sample_table[i].sample_offset - this->data_start; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->sample_table[i].pts / 90000; + buf->extra_info->input_time = this->sample_table[i].pts / 90; buf->pts = this->sample_table[i].pts; /* set the frame duration */ @@ -423,7 +423,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { buf->extra_info->input_pos = this->sample_table[i].sample_offset - this->data_start; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->sample_table[i].pts / 90000; + buf->extra_info->input_time = this->sample_table[i].pts / 90; buf->pts = this->sample_table[i].pts; /* set the frame duration */ @@ -461,7 +461,7 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { buf->extra_info->input_pos = this->sample_table[i].sample_offset - this->data_start; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->sample_table[i].pts / 90000; + buf->extra_info->input_time = this->sample_table[i].pts / 90; buf->pts = this->sample_table[i].pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 49f39329c..fb1a547a9 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -22,7 +22,7 @@ * avoid while programming a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_fli.c,v 1.34 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_fli.c,v 1.35 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -169,7 +169,7 @@ static int demux_fli_send_chunk(demux_plugin_t *this_gen) { buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); buf->type = BUF_VIDEO_FLI; buf->extra_info->input_pos = current_file_pos; - buf->extra_info->input_time = pts_counter / 90000; + buf->extra_info->input_time = pts_counter / 90; buf->extra_info->input_length = this->stream_len; buf->pts = pts_counter; diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c index 2763f0f73..a1bb88a5d 100644 --- a/src/demuxers/demux_idcin.c +++ b/src/demuxers/demux_idcin.c @@ -63,7 +63,7 @@ * - if any bytes exceed 63, do not shift the bytes at all before * transmitting them to the video decoder * - * $Id: demux_idcin.c,v 1.32 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_idcin.c,v 1.33 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -202,7 +202,7 @@ static int demux_idcin_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_VIDEO_IDCIN; buf->extra_info->input_pos = this->input->get_current_pos(this->input); buf->extra_info->input_length = this->filesize; - buf->extra_info->input_time = pts_counter / 90000; + buf->extra_info->input_time = pts_counter / 90; buf->pts = pts_counter; if (remaining_sample_bytes > buf->max_size) @@ -242,7 +242,7 @@ static int demux_idcin_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_AUDIO_LPCM_LE; buf->extra_info->input_pos = this->input->get_current_pos(this->input); buf->extra_info->input_length = this->filesize; - buf->extra_info->input_time = pts_counter / 90000; + buf->extra_info->input_time = pts_counter / 90; buf->pts = pts_counter; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c index ae1c4a62a..cc0d0fa5d 100644 --- a/src/demuxers/demux_ipmovie.c +++ b/src/demuxers/demux_ipmovie.c @@ -21,7 +21,7 @@ * For more information regarding the Interplay MVE file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_ipmovie.c,v 1.3 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_ipmovie.c,v 1.4 2003/01/10 11:57:16 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -346,7 +346,7 @@ this->fps++; /* above calculation usually yields 14.9; we need 15 */ buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->pts = audio_pts; if (opcode_size > buf->max_size) @@ -434,7 +434,7 @@ this->fps++; /* above calculation usually yields 14.9; we need 15 */ buf->type = BUF_VIDEO_INTERPLAY; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->video_pts / 90000; + buf->extra_info->input_time = this->video_pts / 90; buf->pts = this->video_pts; if (opcode_size > buf->max_size) @@ -474,7 +474,7 @@ this->fps++; /* above calculation usually yields 14.9; we need 15 */ buf->type = BUF_VIDEO_INTERPLAY; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->video_pts / 90000; + buf->extra_info->input_time = this->video_pts / 90; buf->pts = this->video_pts; if (opcode_size > buf->max_size) diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c index 69d27ed9d..636559e35 100644 --- a/src/demuxers/demux_mng.c +++ b/src/demuxers/demux_mng.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mng.c,v 1.4 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_mng.c,v 1.5 2003/01/10 11:57:16 miguelfreitas Exp $ * * demux_mng.c, Demuxer plugin for Multiple-image Network Graphics format * @@ -175,7 +175,7 @@ static int demux_mng_send_chunk(demux_mng_t *this) buf->decoder_flags = BUF_FLAG_FRAMERATE; buf->decoder_info[0] = 90 * this->timer_count; buf->extra_info->input_pos = this->input->get_current_pos(this->input); - buf->extra_info->input_time = this->tick_count / 1000; + buf->extra_info->input_time = this->tick_count; buf->pts = 90 * this->tick_count; if (size > buf->max_size) { diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 57e118f66..27673d621 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg.c,v 1.102 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_mpeg.c,v 1.103 2003/01/10 11:57:16 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -529,7 +529,7 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int stream_id, int64_t scr) buf->extra_info->input_pos = this->input->get_current_pos(this->input); if (this->rate) - buf->extra_info->input_time = buf->extra_info->input_pos / (this->rate * 50); + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / (this->rate * 50); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -552,7 +552,7 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int stream_id, int64_t scr) buf->extra_info->input_pos = this->input->get_current_pos(this->input); if (this->rate) - buf->extra_info->input_time = buf->extra_info->input_pos / (this->rate * 50); + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / (this->rate * 50); this->video_fifo->put (this->video_fifo, buf); diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index d232e634b..858ec6a79 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_block.c,v 1.153 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_mpeg_block.c,v 1.154 2003/01/10 11:57:16 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -209,7 +209,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m buf->extra_info->input_length = this->input->get_length (this->input); if (this->rate) - buf->extra_info->input_time = buf->extra_info->input_pos / (this->rate * 50); + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / (this->rate * 50); if (p[3] == 0xBA) { /* program stream pack header */ @@ -236,7 +236,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m this->rate |= (p[11] >> 1); } - buf->extra_info->input_time = buf->extra_info->input_pos / (this->rate * 50); + buf->extra_info->input_time = buf->extra_info->input_pos * 1000 / (this->rate * 50); p += 12; diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 9465d6669..bfc691c48 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpgaudio.c,v 1.87 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_mpgaudio.c,v 1.88 2003/01/10 11:57:17 miguelfreitas Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -298,9 +298,9 @@ static int demux_mpgaudio_next (demux_mpgaudio_t *this, int decoder_flags) { { int len = this->input->get_length(this->input); if (len>0) - buf->extra_info->input_time = buf->extra_info->input_pos * this->stream_length / len; + buf->extra_info->input_time = buf->extra_info->input_pos * this->stream_length * 1000 / len; else - buf->extra_info->input_time = pts / 90000; + buf->extra_info->input_time = pts / 90; } #if 0 buf->pts = pts; diff --git a/src/demuxers/demux_nsf.c b/src/demuxers/demux_nsf.c index 181556150..5744d1f19 100644 --- a/src/demuxers/demux_nsf.c +++ b/src/demuxers/demux_nsf.c @@ -28,7 +28,7 @@ * For more information regarding the NSF format, visit: * http://www.tripoint.org/kevtris/nes/nsfspec.txt * - * $Id: demux_nsf.c,v 1.4 2003/01/09 04:23:14 tmmm Exp $ + * $Id: demux_nsf.c,v 1.5 2003/01/10 11:57:17 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -187,7 +187,7 @@ static int demux_nsf_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_AUDIO_NSF; buf->extra_info->input_pos = this->current_song - 1; buf->extra_info->input_length = this->total_songs; - buf->extra_info->input_time = this->current_pts / 90000; + buf->extra_info->input_time = this->current_pts / 90; buf->pts = this->current_pts; buf->size = 0; this->audio_fifo->put (this->audio_fifo, buf); diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 17a684a9c..578d074e3 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ogg.c,v 1.58 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_ogg.c,v 1.59 2003/01/10 11:57:17 miguelfreitas Exp $ * * demultiplexer for ogg streams * @@ -251,7 +251,8 @@ static void send_ogg_buf (demux_ogg_t *this, #endif buf->extra_info->input_pos = this->input->get_current_pos (this->input); - buf->extra_info->input_time = buf->extra_info->input_pos * 8 / this->avg_bitrate; + buf->extra_info->input_time = buf->extra_info->input_pos * 8 * 1000 / + this->avg_bitrate; buf->type = this->buf_types[stream_num] ; buf->decoder_flags = decoder_flags; diff --git a/src/demuxers/demux_pva.c b/src/demuxers/demux_pva.c index 35105c971..ae324eeee 100644 --- a/src/demuxers/demux_pva.c +++ b/src/demuxers/demux_pva.c @@ -21,7 +21,7 @@ * For more information regarding the PVA file format, refer to this PDF: * http://www.technotrend.de/download/av_format_v1.pdf * - * $Id: demux_pva.c,v 1.2 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_pva.c,v 1.3 2003/01/10 11:57:17 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -153,7 +153,7 @@ static int demux_pva_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_VIDEO_MPEG; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = buf->pts / 90000; + buf->extra_info->input_time = buf->pts / 90; if (chunk_size > buf->max_size) buf->size = buf->max_size; diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 86e15cf6a..6808d4194 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.139 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_qt.c,v 1.140 2003/01/10 11:57:17 miguelfreitas Exp $ * */ @@ -1916,7 +1916,7 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) { buf->type = this->qt->video_type; buf->extra_info->input_pos = this->qt->frames[i].offset - this->data_start; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->qt->frames[i].pts / 90000; + buf->extra_info->input_time = this->qt->frames[i].pts / 90; buf->pts = this->qt->frames[i].pts; buf->decoder_flags |= BUF_FLAG_FRAMERATE; @@ -1970,7 +1970,7 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) { if ((buf->type == BUF_AUDIO_LPCM_BE) || (buf->type == BUF_AUDIO_LPCM_LE)) { if (first_buf) { - buf->extra_info->input_time = this->qt->frames[i].pts / 90000; + buf->extra_info->input_time = this->qt->frames[i].pts / 90; buf->pts = this->qt->frames[i].pts; first_buf = 0; } else { @@ -1978,7 +1978,7 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) { buf->pts = 0; } } else { - buf->extra_info->input_time = this->qt->frames[i].pts / 90000; + buf->extra_info->input_time = this->qt->frames[i].pts / 90; buf->pts = this->qt->frames[i].pts; } diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c index 683c3c9c2..cfb4e2617 100644 --- a/src/demuxers/demux_rawdv.c +++ b/src/demuxers/demux_rawdv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_rawdv.c,v 1.2 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_rawdv.c,v 1.3 2003/01/10 11:57:17 miguelfreitas Exp $ * * demultiplexer for raw dv streams * @@ -103,7 +103,7 @@ static int demux_raw_dv_next (demux_raw_dv_t *this) { */ buf->pts = this->pts; - buf->extra_info->input_time = this->pts/90000; + buf->extra_info->input_time = this->pts/90; buf->extra_info->input_pos = this->input->get_current_pos(this->input); buf->extra_info->frame_number = this->cur_frame; buf->type = BUF_VIDEO_DV; diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 04a7ec05f..eb06d1b3c 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.31 2003/01/08 14:42:46 esnel Exp $ + * $Id: demux_real.c,v 1.32 2003/01/10 11:57:17 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -786,7 +786,8 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->pts = pts; buf->extra_info->input_pos = this->input->get_current_pos (this->input); - buf->extra_info->input_time = buf->extra_info->input_pos * 8 / this->avg_bitrate ; + buf->extra_info->input_time = buf->extra_info->input_pos * 8 * 1000 / + this->avg_bitrate ; buf->type = this->video_buf_type; check_newpts (this, pts, PTS_VIDEO, 0); @@ -870,7 +871,8 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->content = buf->mem; buf->pts = pts; buf->extra_info->input_pos = this->input->get_current_pos (this->input); - buf->extra_info->input_time = buf->extra_info->input_pos * 8 / this->avg_bitrate ; + buf->extra_info->input_time = buf->extra_info->input_pos * 8 * 1000 / + this->avg_bitrate ; buf->type = this->audio_buf_type; buf->decoder_flags = 0; buf->size = size; diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 96e32f038..269a90e4c 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -19,7 +19,7 @@ * * RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_realaudio.c,v 1.10 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_realaudio.c,v 1.11 2003/01/10 11:57:17 miguelfreitas Exp $ * */ @@ -148,7 +148,7 @@ static int demux_ra_send_chunk(demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = current_pts / 90000; + buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c index e16dafc7f..220efc491 100644 --- a/src/demuxers/demux_smjpeg.c +++ b/src/demuxers/demux_smjpeg.c @@ -21,7 +21,7 @@ * For more information on the SMJPEG file format, visit: * http://www.lokigames.com/development/smjpeg.php3 * - * $Id: demux_smjpeg.c,v 1.33 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_smjpeg.c,v 1.34 2003/01/10 11:57:17 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -271,7 +271,7 @@ static int demux_smjpeg_send_chunk(demux_plugin_t *this_gen) { buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->input_length; - buf->extra_info->input_time = pts / 90000; + buf->extra_info->input_time = pts / 90; buf->pts = pts; if (last_frame_pts) { diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index 7798f47ae..8d78475d4 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -19,7 +19,7 @@ * * SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_snd.c,v 1.22 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_snd.c,v 1.23 2003/01/10 11:57:18 miguelfreitas Exp $ * */ @@ -191,7 +191,7 @@ static int demux_snd_send_chunk(demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = current_pts / 90000; + buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_str.c b/src/demuxers/demux_str.c index 30ba1cc2e..448eab572 100644 --- a/src/demuxers/demux_str.c +++ b/src/demuxers/demux_str.c @@ -21,7 +21,7 @@ * This demuxer handles either raw STR files (which are just a concatenation * of raw compact disc sectors) or STR files with RIFF headers. * - * $Id: demux_str.c,v 1.2 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_str.c,v 1.3 2003/01/10 11:57:18 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -182,7 +182,7 @@ static int demux_str_send_chunk(demux_plugin_t *this_gen) { this->data_start + frame_number * CD_RAW_SECTOR_SIZE; buf->extra_info->input_length = this->data_size; buf->pts = frame_number * FRAME_DURATION; - buf->extra_info->input_time = buf->pts / 90000; + buf->extra_info->input_time = buf->pts / 90; /* constant size chunk */ buf->size = 2048; diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c index 4f452d487..21b00d5cd 100644 --- a/src/demuxers/demux_voc.c +++ b/src/demuxers/demux_voc.c @@ -23,7 +23,7 @@ * It will only play that block if it is PCM data. More variations will be * supported as they are encountered. * - * $Id: demux_voc.c,v 1.22 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_voc.c,v 1.23 2003/01/10 11:57:18 miguelfreitas Exp $ * */ @@ -183,7 +183,7 @@ static int demux_voc_send_chunk(demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = current_pts / 90000; + buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_vox.c b/src/demuxers/demux_vox.c index 91659516b..605939c48 100644 --- a/src/demuxers/demux_vox.c +++ b/src/demuxers/demux_vox.c @@ -20,7 +20,7 @@ * VOX Demuxer by Mike Melanson (melanson@pcisys.net) * This a demuxer for .vox files containing raw Dialogic ADPCM data. * - * $Id: demux_vox.c,v 1.1 2003/01/07 06:29:16 tmmm Exp $ + * $Id: demux_vox.c,v 1.2 2003/01/10 11:57:18 miguelfreitas Exp $ * */ @@ -102,7 +102,7 @@ static int demux_vox_send_chunk (demux_plugin_t *this_gen) { buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->input->get_length(this->input); - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->pts = audio_pts; buf->decoder_flags |= BUF_FLAG_FRAME_END; diff --git a/src/demuxers/demux_vqa.c b/src/demuxers/demux_vqa.c index 063d9ef14..9658614a1 100644 --- a/src/demuxers/demux_vqa.c +++ b/src/demuxers/demux_vqa.c @@ -27,7 +27,7 @@ * block needs information from the previous audio block in order to be * decoded, thus making random seeking difficult. * - * $Id: demux_vqa.c,v 1.25 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_vqa.c,v 1.26 2003/01/10 11:57:18 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -183,7 +183,7 @@ static int demux_vqa_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_AUDIO_VQA_IMA; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->filesize; - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->pts = audio_pts; if (chunk_size > buf->max_size) @@ -224,7 +224,7 @@ static int demux_vqa_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_VIDEO_VQA; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->filesize; - buf->extra_info->input_time = this->video_pts / 90000; + buf->extra_info->input_time = this->video_pts / 90; buf->pts = this->video_pts; if (chunk_size > buf->max_size) diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 54c5b1cd9..d73c531be 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -20,7 +20,7 @@ * MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net) * based on WAV specs that are available far and wide * - * $Id: demux_wav.c,v 1.31 2003/01/08 01:02:28 miguelfreitas Exp $ + * $Id: demux_wav.c,v 1.32 2003/01/10 11:57:18 miguelfreitas Exp $ * */ @@ -175,7 +175,7 @@ static int demux_wav_send_chunk(demux_plugin_t *this_gen) { buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = current_pts / 90000; + buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; if (remaining_sample_bytes > buf->max_size) diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index bbb199c13..e6bdcb060 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -22,7 +22,7 @@ * For more information on the MVE file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_wc3movie.c,v 1.31 2003/01/04 14:48:12 miguelfreitas Exp $ + * $Id: demux_wc3movie.c,v 1.32 2003/01/10 11:57:18 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -231,7 +231,7 @@ static int demux_mve_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_AUDIO_LPCM_LE; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = audio_pts / 90000; + buf->extra_info->input_time = audio_pts / 90; buf->pts = audio_pts; if (chunk_size > buf->max_size) @@ -260,7 +260,7 @@ static int demux_mve_send_chunk(demux_plugin_t *this_gen) { buf->type = BUF_VIDEO_WC3; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; - buf->extra_info->input_time = this->video_pts / 90000; + buf->extra_info->input_time = this->video_pts / 90; buf->pts = this->video_pts; if (chunk_size > buf->max_size) diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index d9b8caf86..bccde1f51 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.208 2003/01/09 13:26:03 miguelfreitas Exp $ + * $Id: xine.c,v 1.209 2003/01/10 11:57:19 miguelfreitas Exp $ * * top-level xine functions * @@ -1084,7 +1084,7 @@ int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, if (pos_stream) *pos_stream = pos; if (pos_time) - *pos_time = stream->current_extra_info->input_time * 1000; + *pos_time = stream->current_extra_info->input_time; if (length_time) *length_time = xine_get_stream_length (stream) * 1000; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 88f0bbff8..c615c5601 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.121 2003/01/08 01:02:33 miguelfreitas Exp $ + * $Id: xine_internal.h,v 1.122 2003/01/10 11:57:19 miguelfreitas Exp $ * */ @@ -124,9 +124,12 @@ struct extra_info_s { off_t input_pos; /* remember where this buf came from in the input source */ off_t input_length; /* remember the length of the input source */ - int input_time;/* time offset in seconds from beginning of stream */ + int input_time;/* time offset in miliseconds from beginning of stream */ uint32_t frame_number; /* number of current frame if known */ + int seek_count; /* internal engine use */ + pthread_mutex_t lock; /* keep consistency */ + int64_t vpts; /* set on output layers only */ }; /* -- cgit v1.2.3