]> 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 0082f509ad948f95d0e5649fd5a23b8c81c652d1..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.77 2002/11/11 14:39:11 sam 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>
@@ -107,9 +107,32 @@ struct decoder_fifo_t
     es_sys_t *          p_demux_data;
     stream_ctrl_t *     p_stream_ctrl;
     sout_instance_t *   p_sout;
+    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 * );
 };
 
@@ -209,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 * ) );