]> git.sesse.net Git - vlc/blobdiff - modules/codec/spudec/spudec.h
Removes trailing spaces. Removes tabs.
[vlc] / modules / codec / spudec / spudec.h
index b8887c8cd5377b59693b5f78fc8bef760e636062..13717181c6424b5cdf069bf83733034c3ab2fbba 100644 (file)
@@ -1,16 +1,16 @@
 /*****************************************************************************
  * spudec.h : sub picture unit decoder thread interface
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: spudec.h,v 1.7 2003/07/22 20:49:10 hartman Exp $
+ * Copyright (C) 1999, 2000, 2006 the VideoLAN team
+ * $Id$
  *
- * Authors: Samuel Hocevar <sam@zoy.org>
+ * Authors: Sam Hocevar <sam@zoy.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-typedef struct spudec_thread_t spudec_thread_t;
+/* #define DEBUG_SPUDEC 1 */
 
-struct subpicture_sys_t
+struct decoder_sys_t
+{
+    int b_packetizer;
+
+    mtime_t i_pts;
+    unsigned int i_spu_size;
+    unsigned int i_rle_size;
+    unsigned int i_spu;
+
+    block_t *p_block;
+
+    /* We will never overflow */
+    uint8_t buffer[65536];
+};
+
+typedef struct subpicture_data_t
 {
     mtime_t i_pts;                                 /* presentation timestamp */
 
@@ -35,43 +50,12 @@ struct subpicture_sys_t
     uint8_t    pi_alpha[4];
     uint8_t    pi_yuv[4][3];
 
-    /* Link to our input */
-    vlc_object_t * p_input;
-
-    /* Cropping properties */
-    vlc_mutex_t  lock;
-    vlc_bool_t   b_crop;
-    unsigned int i_x_start, i_y_start, i_x_end, i_y_end;
-};
-
-/*****************************************************************************
- * spudec_thread_t : sub picture unit decoder thread descriptor
- *****************************************************************************/
-struct spudec_thread_t
-{
-    /*
-     * Thread properties and locks
-     */
-    vlc_thread_t        thread_id;                /* id for thread functions */
-
-    /*
-     * 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;
+    /* Auto crop fullscreen subtitles */
+    vlc_bool_t b_auto_crop;
+    int i_y_top_offset;
+    int i_y_bottom_offset;
 
-    /*
-     * Output properties
-     */
-    vout_thread_t *     p_vout;          /* needed to create the spu objects */
-
-    /*
-     * Private properties
-     */
-    unsigned int        i_spu_size;            /* size of current SPU packet */
-    unsigned int        i_rle_size;                  /* size of the RLE part */
-};
+} subpicture_data_t;
 
 /*****************************************************************************
  * Amount of bytes we GetChunk() in one go
@@ -93,9 +77,4 @@ 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 * );