]> git.sesse.net Git - vlc/blobdiff - include/vlc_codec.h
ninput.h: added prototype of demux2_vaControlHelper.
[vlc] / include / vlc_codec.h
index 5ab767cef300c4001af67cb16d894fbb6f4e09bf..f62e99ce77de3c8262de8dc2d3edcf9e7fb93001 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_codec.h: codec related structures
  *****************************************************************************
  * Copyright (C) 1999-2003 VideoLAN
- * $Id: vlc_codec.h,v 1.1 2003/10/08 21:01:07 gbazin Exp $
+ * $Id: vlc_codec.h,v 1.8 2004/02/20 18:34:28 massiot Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 #ifndef _VLC_CODEC_H
 #define _VLC_CODEC_H 1
 
+#include "ninput.h"
+
 /**
  * \file
  * This file defines the structure and types used by decoders and encoders
  */
 
+typedef struct decoder_owner_sys_t decoder_owner_sys_t;
+
 /**
  * \defgroup decoder Decoder
  *
@@ -43,15 +47,35 @@ struct decoder_t
     /* Module properties */
     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 */
+    picture_t *         ( * pf_decode_video )( decoder_t *, block_t ** );
+    aout_buffer_t *     ( * pf_decode_audio )( decoder_t *, block_t ** );
+    void                ( * pf_decode_sub)   ( decoder_t *, block_t ** );
+    block_t *           ( * pf_packetize )   ( decoder_t *, block_t ** );
+
+    /* Input format ie from demuxer (XXX: a lot of field could be invalid) */
+    es_format_t         fmt_in;
+
+    /* Output format of decoder/packetizer */
+    es_format_t         fmt_out;
+
+    /*
+     * Buffers allocation
+     */
 
-    /* Tmp field for old decoder api */
-    int                 ( * pf_run ) ( decoder_fifo_t * );
+    /* Audio output callbacks */
+    aout_buffer_t * ( * pf_aout_buffer_new) ( decoder_t *, int );
+    void            ( * pf_aout_buffer_del) ( decoder_t *, aout_buffer_t * );
+
+    /* Video output callbacks */
+    picture_t     * ( * pf_vout_buffer_new) ( decoder_t * );
+    void            ( * pf_vout_buffer_del) ( decoder_t *, picture_t * );
+    void            ( * pf_picture_link)    ( decoder_t *, picture_t * );
+    void            ( * pf_picture_unlink)  ( decoder_t *, picture_t * );
+
+
+    /* Private structure for the owner of the decoder */
+    decoder_owner_sys_t *p_owner;
 };
 
 /**
@@ -79,14 +103,29 @@ struct encoder_t
     block_t *           ( * pf_encode_audio )( encoder_t *, aout_buffer_t * );
 
     /* Properties of the input data fed to the encoder */
-    union {
-        audio_sample_format_t audio;
-        video_frame_format_t  video;
-    } format;
+    es_format_t         fmt_in;
 
     /* Properties of the output of the encoder */
-    vlc_fourcc_t i_fourcc;
-    int          i_bitrate;
+    es_format_t         fmt_out;
+
+    /* FIXME: move these to the ffmpeg encoder */
+    int i_key_int;
+    int i_b_frames;
+    int i_vtolerance;
+    int i_qmin;
+    int i_qmax;
+    int i_hq;
+    vlc_bool_t          b_strict_rc;
+    vlc_bool_t          b_pre_me;
+    vlc_bool_t          b_hurry_up;
+    vlc_bool_t          b_interlace;
+    int                 i_rc_buffer_size;
+    float               f_rc_buffer_aggressivity;
+    float               f_i_quant_factor;
+    int                 i_noise_reduction;
+    vlc_bool_t          b_mpeg4_matrix;
+    int                 i_threads;
+    vlc_bool_t          b_trellis;
 };
 
 /**