summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_mpeg_block.c9
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/video_decoder.c4
-rw-r--r--src/xine-engine/xine.c7
-rw-r--r--src/xine-engine/xine_internal.h3
5 files changed, 19 insertions, 7 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 43c08514b..79eadd086 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.91 2002/04/16 10:54:22 jcdutton Exp $
+ * $Id: demux_mpeg_block.c,v 1.92 2002/04/16 12:27:20 jcdutton Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -183,6 +183,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->decoder_flags = 0;
buf->input_pos = this->input->get_current_pos (this->input);
+ buf->input_length = this->input->get_length (this->input);
if (this->rate)
buf->input_time = buf->input_pos / (this->rate * 50);
@@ -302,6 +303,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->type = BUF_SPU_NAV;
buf->pts = 0; /* NAV packets do not have PES values */
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
this->video_fifo->put (this->video_fifo, buf);
#ifdef LOG
@@ -485,6 +487,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->type = BUF_SPU_PACKAGE + spu_id;
buf->pts = pts;
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
this->video_fifo->put (this->video_fifo, buf);
@@ -507,6 +510,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->pts = pts;
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
if(this->audio_fifo)
this->audio_fifo->put (this->audio_fifo, buf);
@@ -567,6 +571,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->pts = pts;
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
if(this->audio_fifo)
this->audio_fifo->put (this->audio_fifo, buf);
@@ -584,6 +589,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->pts = pts;
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
this->video_fifo->put (this->video_fifo, buf);
@@ -600,6 +606,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf->pts = pts;
buf->input_pos = this->input->get_current_pos(this->input);
+ buf->input_length = this->input->get_length (this->input);
if(this->audio_fifo)
this->audio_fifo->put (this->audio_fifo, buf);
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 3d70f54c6..0b819494f 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.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: buffer.h,v 1.39 2002/04/09 03:38:01 miguelfreitas Exp $
+ * $Id: buffer.h,v 1.40 2002/04/16 12:27:20 jcdutton Exp $
*
*
* contents:
@@ -150,6 +150,7 @@ struct buf_element_s {
int64_t pts; /* presentation time stamp, used for a/v sync */
int64_t disc_off; /* discontinuity offset */
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 */
uint32_t decoder_flags; /* stuff like keyframe, is_header ... see below */
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 7bc3d68a1..eae3d1574 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.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: video_decoder.c,v 1.82 2002/04/09 13:53:52 miguelfreitas Exp $
+ * $Id: video_decoder.c,v 1.83 2002/04/16 12:27:20 jcdutton Exp $
*
*/
@@ -80,6 +80,8 @@ void *video_decoder_loop (void *this_gen) {
if (buf->input_pos)
this->cur_input_pos = buf->input_pos;
+ if (buf->input_length)
+ this->cur_input_length = buf->input_length;
if (buf->input_time)
this->cur_input_time = buf->input_time;
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 171026e98..1606c173d 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.118 2002/04/16 11:06:37 jcdutton Exp $
+ * $Id: xine.c,v 1.119 2002/04/16 12:27:20 jcdutton Exp $
*
* top-level xine functions
*
@@ -550,6 +550,7 @@ xine_t *xine_init (vo_driver_t *vo,
this->spu_channel_auto = -1;
this->spu_channel_user = -1;
this->cur_input_pos = 0;
+ this->cur_input_length = 0;
/*
* init and start decoder threads
@@ -641,8 +642,8 @@ int xine_get_current_position (xine_t *this) {
}
/* pos = this->mCurInput->seek (0, SEEK_CUR); */
- len = this->cur_input_plugin->get_length (this->cur_input_plugin);
-
+ len = this->cur_input_length;
+ if (len == 0) len = this->cur_input_plugin->get_length (this->cur_input_plugin);
share = (double) this->cur_input_pos / (double) len * 65535;
pthread_mutex_unlock (&this->xine_lock);
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index b54e4dadc..51aef162d 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.76 2002/04/09 04:35:17 miguelfreitas Exp $
+ * $Id: xine_internal.h,v 1.77 2002/04/16 12:27:21 jcdutton Exp $
*
*/
@@ -167,6 +167,7 @@ struct xine_s {
int status;
int speed;
off_t cur_input_pos;
+ off_t cur_input_length;
int cur_input_time;
char cur_mrl[1024];