diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-09 03:37:59 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-09 03:37:59 +0000 |
commit | 645f84663db1951293a7c821dccba45ebdabfcfe (patch) | |
tree | 25921d66b1107950db591aa98e2086623c5e83cd /src/libmpeg2/xine_decoder.c | |
parent | 28fd212fe15c240f337575a12057d3468e5ee05d (diff) | |
download | xine-lib-645f84663db1951293a7c821dccba45ebdabfcfe.tar.gz xine-lib-645f84663db1951293a7c821dccba45ebdabfcfe.tar.bz2 |
- new (fast) demuxer seeking scheme
- updated decoder api to allow reseting internal state on seeks
CVS patchset: 1696
CVS date: 2002/04/09 03:37:59
Diffstat (limited to 'src/libmpeg2/xine_decoder.c')
-rw-r--r-- | src/libmpeg2/xine_decoder.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index 56af6324b..3543ce6e2 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_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: xine_decoder.c,v 1.26 2002/04/04 00:08:36 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.27 2002/04/09 03:38:00 miguelfreitas Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -109,6 +109,17 @@ static void mpeg2dec_flush (video_decoder_t *this_gen) { pthread_mutex_unlock (&this->lock); } +static void mpeg2dec_reset (video_decoder_t *this_gen) { + mpeg2dec_decoder_t *this = (mpeg2dec_decoder_t *) this_gen; + + pthread_mutex_lock (&this->lock); + + mpeg2_reset (&this->mpeg2); + + pthread_mutex_unlock (&this->lock); +} + + static void mpeg2dec_close (video_decoder_t *this_gen) { mpeg2dec_decoder_t *this = (mpeg2dec_decoder_t *) this_gen; @@ -134,7 +145,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { mpeg2dec_decoder_t *this ; - if (iface_version != 5) { + if (iface_version != 6) { printf( "libmpeg2: plugin doesn't support plugin API version %d.\n" "libmpeg2: this means there's a version mismatch between xine and this " "libmpeg2: decoder plugin.\nInstalling current plugins should help.\n", @@ -150,6 +161,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { this->video_decoder.init = mpeg2dec_init; this->video_decoder.decode_data = mpeg2dec_decode_data; this->video_decoder.flush = mpeg2dec_flush; + this->video_decoder.reset = mpeg2dec_reset; this->video_decoder.close = mpeg2dec_close; this->video_decoder.get_identifier = mpeg2dec_get_id; this->video_decoder.priority = 5; |