summaryrefslogtreecommitdiff
path: root/src/libspudec/spudec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libspudec/spudec.h')
-rw-r--r--src/libspudec/spudec.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/src/libspudec/spudec.h b/src/libspudec/spudec.h
index e4ce15741..a79516a01 100644
--- a/src/libspudec/spudec.h
+++ b/src/libspudec/spudec.h
@@ -26,8 +26,10 @@
#include "metronom.h"
#include "input/input_plugin.h"
+#include "xine_internal.h"
-typedef struct spudec_s spudec_t;
+/* typedef struct spudec_s spudec_t; */
+typedef struct spudec_priv_s spudec_priv_t;
struct spudec_s {
@@ -35,19 +37,40 @@ struct spudec_s {
* reset spudec for a new stream
*
* clut : pointer to array of 16 cluts for palette info
+ * or NULL to use default (not recommended!).
*/
- void (*spudec_start) (spudec_t *this, clut_t *clut);
+ void (*start) (spudec_t *this, clut_t *clut);
+
+ /*
+ * change the colour lookup table (clut) used by the decoder.
+ *
+ * clut : pointer to array of 16 cluts for palette info
+ * or NULL to use default (not recommended!).
+ */
+
+ void (*change_clut) (spudec_t *this, clut_t *clut);
+
+ /*
+ * pass a packet demux-ed from the MPEG2 stream to the decoder.
+ * (the buffer is copied so may be 'free'-ed).
+ *
+ * buf : a buf_element_t containing the packet.
+ */
+ void (*push_packet) (spudec_t *this, buf_element_t *buf);
/*
* overlay functions: spudec decodes all subpicture data until
* it reaches the given vpts, then overlays the subpicture
*/
- void (*spudec_overlay_yuv) (spudec_t *this, uint32_t vpts,
- uint8_t *y, uint8_t *u, uint8_t *v);
- void (*spudec_overlay_rgb) (spudec_t *this, uint32_t vpts,
- uint8_t *rgb_data, int mode);
+ void (*overlay_yuv) (spudec_t *this, uint32_t vpts,
+ uint8_t *y, uint8_t *u, uint8_t *v);
+ void (*overlay_rgb) (spudec_t *this, uint32_t vpts,
+ uint8_t *rgb_data, int mode);
+
+ /* PRIVATE DATA -- Not to be touched. */
+ spudec_priv_t *private;
};
/*
@@ -57,6 +80,13 @@ struct spudec_s {
* spu_fifo : fifo buffer where subpicture packages arrive
*/
-spudec_t *spudec_init (metronom_t *metronom, fifo_buffer_t *spu_fifo);
+extern spudec_t *spudec_init (xine_t *xine);
+
+/*
+ * close a given subpicture decoder
+ *
+ * decoder : The decoder previously returned by spudec_init
+ */
+extern void spudec_close (spudec_t *decoder);
#endif /* HAVE_SPUDEC_H */