diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-09 13:53:52 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-09 13:53:52 +0000 |
commit | ce3eaf6e094d025149ff0090f3de9437c39aab67 (patch) | |
tree | b2c62ddd34aa02d61a9eddac75296a7e3308859b | |
parent | 8ff820b65a21d201083237710298881e28d1f895 (diff) | |
download | xine-lib-ce3eaf6e094d025149ff0090f3de9437c39aab67.tar.gz xine-lib-ce3eaf6e094d025149ff0090f3de9437c39aab67.tar.bz2 |
patch to fix libsputext on seeks by Zoltán Böszörményi
CVS patchset: 1703
CVS date: 2002/04/09 13:53:52
-rw-r--r-- | src/libspucc/xine_decoder.c | 9 | ||||
-rw-r--r-- | src/libspudec/spu_decoder_api.h | 2 | ||||
-rw-r--r-- | src/libspudec/xine_decoder.c | 10 | ||||
-rw-r--r-- | src/libsputext/xine_decoder.c | 11 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 5 |
6 files changed, 31 insertions, 10 deletions
diff --git a/src/libspucc/xine_decoder.c b/src/libspucc/xine_decoder.c index 0936a4c67..a27274470 100644 --- a/src/libspucc/xine_decoder.c +++ b/src/libspucc/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.6 2002/03/31 23:14:48 cvogler Exp $ + * $Id: xine_decoder.c,v 1.7 2002/04/09 13:53:52 miguelfreitas Exp $ * * closed caption spu decoder. receive data by events. * @@ -307,6 +307,10 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { } +static void spudec_reset (spu_decoder_t *this_gen) { +} + + static void spudec_close (spu_decoder_t *this_gen) { spucc_decoder_t *this = (spucc_decoder_t *) this_gen; @@ -363,7 +367,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { spucc_decoder_t *this ; - if (iface_version != 4) { + if (iface_version != 5) { printf("libspucc: doesn't support plugin api version %d.\n" "libspucc: This means there is a version mismatch between xine and\n" "libspucc: this plugin.\n", iface_version); @@ -376,6 +380,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { this->spu_decoder.can_handle = spudec_can_handle; this->spu_decoder.init = spudec_init; this->spu_decoder.decode_data = spudec_decode_data; + this->spu_decoder.reset = spudec_reset; this->spu_decoder.close = spudec_close; this->spu_decoder.get_identifier = spudec_get_id; this->spu_decoder.priority = 1; diff --git a/src/libspudec/spu_decoder_api.h b/src/libspudec/spu_decoder_api.h index fd1c8de9f..dc4f3889b 100644 --- a/src/libspudec/spu_decoder_api.h +++ b/src/libspudec/spu_decoder_api.h @@ -44,6 +44,8 @@ struct spu_decoder_s { void (*decode_data) (spu_decoder_t *this, buf_element_t *buf); + void (*reset) (spu_decoder_t *this); + void (*close) (spu_decoder_t *this); char* (*get_identifier) (void); diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c index 44e9c1ace..0b2b437ec 100644 --- a/src/libspudec/xine_decoder.c +++ b/src/libspudec/xine_decoder.c @@ -19,7 +19,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.59 2002/04/06 15:40:19 jcdutton Exp $ + * $Id: xine_decoder.c,v 1.60 2002/04/09 13:53:52 miguelfreitas Exp $ * * stuff needed to turn libspu into a xine decoder plugin */ @@ -153,6 +153,9 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { } } +static void spudec_reset (spu_decoder_t *this_gen) { +} + static void spudec_close (spu_decoder_t *this_gen) { spudec_decoder_t *this = (spudec_decoder_t *) this_gen; int i; @@ -268,7 +271,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { spudec_decoder_t *this ; - if (iface_version != 4) { + if (iface_version != 5) { printf("libspudec: Doesn't support plugin API version %d.\n" "libspudec: This means there is a version mismatch between XINE and\n" "libspudec: this plugin.\n", iface_version); @@ -279,10 +282,11 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { /* xine_xmalloc does memset */ /* memset (this, 0, sizeof(*this)); */ - this->spu_decoder.interface_version = 4; + this->spu_decoder.interface_version = iface_version; this->spu_decoder.can_handle = spudec_can_handle; this->spu_decoder.init = spudec_init; this->spu_decoder.decode_data = spudec_decode_data; + this->spu_decoder.reset = spudec_reset; this->spu_decoder.close = spudec_close; this->spu_decoder.get_identifier = spudec_get_id; this->spu_decoder.priority = 1; diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_decoder.c index 9d9c5a19a..c5c025d0c 100644 --- a/src/libsputext/xine_decoder.c +++ b/src/libsputext/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.18 2002/03/25 22:55:42 f1rmb Exp $ + * $Id: xine_decoder.c,v 1.19 2002/04/09 13:53:52 miguelfreitas Exp $ * * code based on mplayer module: * @@ -947,6 +947,12 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { } +static void spudec_reset (spu_decoder_t *this_gen) { + sputext_decoder_t *this = (sputext_decoder_t *) this_gen; + + this->cur = 0; +} + static void spudec_close (spu_decoder_t *this_gen) { sputext_decoder_t *this = (sputext_decoder_t *) this_gen; @@ -995,7 +1001,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { sputext_decoder_t *this ; - if (iface_version != 4) { + if (iface_version != 5) { printf("libsputext: doesn't support plugin api version %d.\n" "libsputext: This means there is a version mismatch between xine and\n" "libsputext: this plugin.\n", iface_version); @@ -1008,6 +1014,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) { this->spu_decoder.can_handle = spudec_can_handle; this->spu_decoder.init = spudec_init; this->spu_decoder.decode_data = spudec_decode_data; + this->spu_decoder.reset = spudec_reset; this->spu_decoder.close = spudec_close; this->spu_decoder.get_identifier = spudec_get_id; this->spu_decoder.priority = 1; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a980bbf4a..3c4b7b03c 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.71 2002/03/14 17:28:06 guenter Exp $ + * $Id: load_plugins.c,v 1.72 2002/04/09 13:53:52 miguelfreitas Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -534,7 +534,7 @@ void load_decoder_plugins (xine_t *this, spu_decoder_t *sdp; int streamtype; - sdp = (spu_decoder_t *) initplug(4, this); + sdp = (spu_decoder_t *) initplug(5, this); if (sdp) { sdp->metronom = this->metronom; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 359c28274..7bc3d68a1 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.81 2002/04/09 03:38:01 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.82 2002/04/09 13:53:52 miguelfreitas Exp $ * */ @@ -185,6 +185,9 @@ void *video_decoder_loop (void *this_gen) { if (this->cur_video_decoder_plugin) { this->cur_video_decoder_plugin->reset (this->cur_video_decoder_plugin); } + if (this->cur_spu_decoder_plugin) { + this->cur_spu_decoder_plugin->reset (this->cur_spu_decoder_plugin); + } break; case BUF_CONTROL_DISCONTINUITY: |