Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vlc_codec.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_codec.h: codec related structures
00003  *****************************************************************************
00004  * Copyright (C) 1999-2003 the VideoLAN team
00005  * $Id: vlc_codec.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Gildas Bazin <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 #ifndef _VLC_CODEC_H
00024 #define _VLC_CODEC_H 1
00025 
00031 typedef struct decoder_owner_sys_t decoder_owner_sys_t;
00032 
00041 /*
00042  * BIG FAT WARNING : the code relies in the first 4 members of filter_t
00043  * and decoder_t to be the same, so if you have anything to add, do it
00044  * at the end of the structure.
00045  */
00046 struct decoder_t
00047 {
00048     VLC_COMMON_MEMBERS
00049 
00050     /* Module properties */
00051     module_t *          p_module;
00052     decoder_sys_t *     p_sys;
00053 
00054     /* Input format ie from demuxer (XXX: a lot of field could be invalid) */
00055     es_format_t         fmt_in;
00056 
00057     /* Output format of decoder/packetizer */
00058     es_format_t         fmt_out;
00059 
00060     /* Some decoders only accept packetized data (ie. not truncated) */
00061     vlc_bool_t          b_need_packetized;
00062 
00063     /* Tell the decoder if it is allowed to drop frames */
00064     vlc_bool_t          b_pace_control;
00065 
00066     picture_t *         ( * pf_decode_video )( decoder_t *, block_t ** );
00067     aout_buffer_t *     ( * pf_decode_audio )( decoder_t *, block_t ** );
00068     subpicture_t *      ( * pf_decode_sub)   ( decoder_t *, block_t ** );
00069     block_t *           ( * pf_packetize )   ( decoder_t *, block_t ** );
00070 
00071     /*
00072      * Buffers allocation
00073      */
00074 
00075     /* Audio output callbacks */
00076     aout_buffer_t * ( * pf_aout_buffer_new) ( decoder_t *, int );
00077     void            ( * pf_aout_buffer_del) ( decoder_t *, aout_buffer_t * );
00078 
00079     /* Video output callbacks */
00080     picture_t     * ( * pf_vout_buffer_new) ( decoder_t * );
00081     void            ( * pf_vout_buffer_del) ( decoder_t *, picture_t * );
00082     void            ( * pf_picture_link)    ( decoder_t *, picture_t * );
00083     void            ( * pf_picture_unlink)  ( decoder_t *, picture_t * );
00084 
00085     /* SPU output callbacks */
00086     subpicture_t *  ( * pf_spu_buffer_new) ( decoder_t * );
00087     void            ( * pf_spu_buffer_del) ( decoder_t *, subpicture_t * );
00088 
00089     /* Private structure for the owner of the decoder */
00090     decoder_owner_sys_t *p_owner;
00091 };
00092 
00105 struct encoder_t
00106 {
00107     VLC_COMMON_MEMBERS
00108 
00109     /* Module properties */
00110     module_t *          p_module;
00111     encoder_sys_t *     p_sys;
00112 
00113     /* Properties of the input data fed to the encoder */
00114     es_format_t         fmt_in;
00115 
00116     /* Properties of the output of the encoder */
00117     es_format_t         fmt_out;
00118 
00119     block_t *           ( * pf_encode_video )( encoder_t *, picture_t * );
00120     block_t *           ( * pf_encode_audio )( encoder_t *, aout_buffer_t * );
00121     block_t *           ( * pf_encode_sub )( encoder_t *, subpicture_t * );
00122 
00123     /* Common encoder options */
00124     int i_threads;               /* Number of threads to use during encoding */
00125     int i_iframes;               /* One I frame per i_iframes */
00126     int i_bframes;               /* One B frame per i_bframes */
00127     int i_tolerance;             /* Bitrate tolerance */
00128 
00129     /* Encoder config */
00130     sout_cfg_t *p_cfg;
00131 };
00132 
00137 #endif /* _VLC_CODEC_H */

Generated on Tue Dec 20 10:14:19 2005 for vlc-0.8.4a by  doxygen 1.4.2