summaryrefslogtreecommitdiff
path: root/src/libspudec/xine_decoder.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-09-18 04:20:09 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-09-18 04:20:09 +0000
commit40a213a03b067c8ac436b784c6a54d0e6e3d2311 (patch)
tree358bd1fd1471cd7938f8db6c21f72ffe8853e27d /src/libspudec/xine_decoder.c
parentdb4a9292eb386fe91bbb4059c1b172e45bd32ce7 (diff)
downloadxine-lib-40a213a03b067c8ac436b784c6a54d0e6e3d2311.tar.gz
xine-lib-40a213a03b067c8ac436b784c6a54d0e6e3d2311.tar.bz2
Updating the DVD menu code to use better nav_pci information.
libspudec parses nav_pci info correctly. libdvdnav does not parse nav_pci info at all. CVS patchset: 2681 CVS date: 2002/09/18 04:20:09
Diffstat (limited to 'src/libspudec/xine_decoder.c')
-rw-r--r--src/libspudec/xine_decoder.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 9ee27bf01..e62aab25f 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.75 2002/09/05 22:18:58 mroi Exp $
+ * $Id: xine_decoder.c,v 1.76 2002/09/18 04:20:09 jcdutton Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -291,7 +291,24 @@ static void spudec_dispose (spu_decoder_t *this_gen) {
free (this->event.object.overlay);
free (this);
}
+/* gets the current already correctly processed nav_pci info */
+/* This is not perfectly in sync with the display, but all the same, */
+/* much closer than doing it at the input stage. */
+/* returns a bool for error/success.*/
+static int spudec_get_nav_pci (spu_decoder_t *this_gen, void *pci) {
+ spudec_decoder_t *this = (spudec_decoder_t *) this_gen;
+ pci_t *nav_pci = (pci_t *) pci;
+
+ if (!this || !nav_pci)
+ return 0;
+
+ pthread_mutex_lock(&this->nav_pci_lock);
+ memcpy(nav_pci, &this->pci, sizeof(pci_t) );
+ pthread_mutex_unlock(&this->nav_pci_lock);
+ return 1;
+}
+
static void *init_spu_decoder_plugin (xine_t *xine, void *data) {
spudec_decoder_t *this ;
@@ -304,6 +321,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) {
this->spu_decoder.close = spudec_close;
this->spu_decoder.get_identifier = spudec_get_id;
this->spu_decoder.dispose = spudec_dispose;
+ this->spu_decoder.get_nav_pci = spudec_get_nav_pci;
this->xine = xine;