]> git.sesse.net Git - vlc/blobdiff - include/input_ext-dec.h
* ALL: Introduction of a new api for decoders.
[vlc] / include / input_ext-dec.h
index df6aed632d6e04a8bf8f65dcac3dd3ae094235bc..12c8ceadb4e046130f476317c3cfe7a660a7c47d 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.h: structures exported to the VideoLAN decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-dec.h,v 1.78 2003/01/07 21:49:01 fenrir Exp $
+ * $Id: input_ext-dec.h,v 1.80 2003/09/02 20:19:25 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Kaempf <maxx@via.ecp.fr>
@@ -110,8 +110,29 @@ struct decoder_fifo_t
     void *              p_waveformatex;
     void *              p_bitmapinfoheader;
 
+    decoder_t *         p_dec;
+};
+
+/*****************************************************************************
+ * decoder_t
+ *****************************************************************************
+ * The decoder descriptor.
+ *****************************************************************************/
+struct decoder_t
+{
+    VLC_COMMON_MEMBERS
+
     /* Module properties */
-    module_t *              p_module;
+    module_t *          p_module;
+    decoder_sys_t *     p_sys;
+    int                 ( * pf_init )  ( decoder_t * );
+    int                 ( * pf_decode )( decoder_t *, block_t * );
+    int                 ( * pf_end )   ( decoder_t * );
+
+    /* Input properties */
+    decoder_fifo_t *    p_fifo;                /* stores the PES stream data */
+
+    /* Tmp field for old decoder api */
     int                 ( * pf_run ) ( decoder_fifo_t * );
 };
 
@@ -211,6 +232,8 @@ struct bit_stream_t
 /*****************************************************************************
  * Prototypes from input_ext-dec.c
  *****************************************************************************/
+VLC_EXPORT( void, input_ExtractPES,        ( decoder_fifo_t *, pes_packet_t ** ) );
+VLC_EXPORT( void, input_DeletePES,         ( input_buffers_t *, pes_packet_t * ) );
 VLC_EXPORT( int, InitBitstream, ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) );
 VLC_EXPORT( vlc_bool_t, NextDataPacket,    ( decoder_fifo_t *, bit_stream_t * ) );
 VLC_EXPORT( void, BitstreamNextDataPacket, ( bit_stream_t * ) );