]> git.sesse.net Git - vlc/blobdiff - modules/codec/spudec/spudec.h
* vorbis comments can be mixed case. strstr -> strcasestr
[vlc] / modules / codec / spudec / spudec.h
index c38b5c7285fd7d22b1efcff66dd07c32548b2bc9..fbc5a649f7edf43008a5e2ea362969a529fbf814 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * spudec.h : sub picture unit decoder thread interface
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: spudec.h,v 1.2 2002/08/16 03:07:56 sam Exp $
+ * Copyright (C) 1999, 2000 the VideoLAN team
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-struct subpicture_sys_t
+struct decoder_sys_t
 {
-    mtime_t i_pts;                                 /* presentation timestamp */
+    int b_packetizer;
 
-    int   pi_offset[2];                              /* byte offsets to data */
-    void *p_data;
+    mtime_t i_pts;
+    int i_spu_size;
+    int i_rle_size;
+    int i_spu;
 
-    /* Color information */
-    vlc_bool_t b_palette;
-    u8    pi_alpha[4];
-    u8    pi_yuv[4][3];
+    block_t *p_block;
+
+    /* We will never overflow more than 11 bytes if I'm right */
+    uint8_t buffer[65536 + 20 ];
 };
 
-/*****************************************************************************
- * spudec_thread_t : sub picture unit decoder thread descriptor
- *****************************************************************************/
-typedef struct spudec_thread_t
+typedef struct subpicture_data_t
 {
-    /*
-     * Thread properties and locks
-     */
-    vlc_thread_t        thread_id;                /* id for thread functions */
+    mtime_t i_pts;                                 /* presentation timestamp */
 
-    /*
-     * Input properties
-     */
-    decoder_fifo_t *    p_fifo;                /* stores the PES stream data */
-    /* The bit stream structure handles the PES stream at the bit level */
-    bit_stream_t        bit_stream;
+    int   pi_offset[2];                              /* byte offsets to data */
+    void *p_data;
 
-    /*
-     * Output properties
-     */
-    vout_thread_t *     p_vout;          /* needed to create the spu objects */
+    /* Color information */
+    vlc_bool_t b_palette;
+    uint8_t    pi_alpha[4];
+    uint8_t    pi_yuv[4][3];
 
-    /*
-     * Private properties
-     */
-    int                 i_spu_size;            /* size of current SPU packet */
-    int                 i_rle_size;                  /* size of the RLE part */
+    /* Auto crop fullscreen subtitles */
+    vlc_bool_t b_auto_crop;
+    int i_y_top_offset;
+    int i_y_bottom_offset;
 
-} spudec_thread_t;
+} subpicture_data_t;
 
 /*****************************************************************************
  * Amount of bytes we GetChunk() in one go
@@ -84,9 +75,4 @@ typedef struct spudec_thread_t
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-int  E_(SyncPacket)           ( spudec_thread_t * );
-void E_(ParsePacket)          ( spudec_thread_t * );
-
-void E_(RenderSPU)            ( vout_thread_t *, picture_t *,
-                                const subpicture_t * );
-
+subpicture_t * E_(ParsePacket)( decoder_t * );