diff options
Diffstat (limited to 'src/demuxers')
| -rw-r--r-- | src/demuxers/demux.h | 3 | ||||
| -rw-r--r-- | src/demuxers/demux_mpeg_block.c | 40 |
2 files changed, 38 insertions, 5 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index 8518b6f81..d284bcd44 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.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: demux.h,v 1.6 2001/07/14 12:50:34 guenter Exp $ + * $Id: demux.h,v 1.7 2001/07/14 13:28:31 guenter Exp $ */ #ifndef HAVE_DEMUX_H @@ -49,7 +49,6 @@ /* called when xine tries to branch seamlessly to the next mrl */ typedef char* (*gui_get_next_mrl_cb_t) (void); - /* called when xine branched successfully to the next mrl */ typedef void (*gui_branched_cb_t) (void); diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index e66b06560..54ac3d6fe 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.26 2001/07/14 12:50:34 guenter Exp $ + * $Id: demux_mpeg_block.c,v 1.27 2001/07/14 13:28:31 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -81,9 +81,43 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m buf = this->input->read_block (this->input, this->video_fifo, this->blocksize); if (buf==NULL) { + char *next_mrl; + printf ("demux_mpeg_block: read_block failed\n"); - this->status = DEMUX_FINISHED; - return ; + + /* + * check if seamless branching is possible + */ + + if (this->next_mrl_cb + && (next_mrl = this->next_mrl_cb () )) { + printf ("demux_mpeg_block: checking if we can branch to %s\n", next_mrl); + + if (this->input->is_branch_possible + && this->input->is_branch_possible (this->input, next_mrl)) { + + printf ("demux_mpeg_block: branching\n"); + + this->input->close (this->input); + this->input->open (this->input, next_mrl); + + if (this->branched_cb) + this->branched_cb (); + + buf = this->input->read_block (this->input, this->video_fifo, this->blocksize); + if (!buf) { + this->status = DEMUX_FINISHED; + return ; + } + + } else { + this->status = DEMUX_FINISHED; + return ; + } + } else { + this->status = DEMUX_FINISHED; + return ; + } } p = buf->content; /* len = this->mnBlocksize; */ |
