1 /*****************************************************************************
2 * vlc_codec.h: codec related structures
3 *****************************************************************************
4 * Copyright (C) 1999-2003 VideoLAN
5 * $Id: vlc_codec.h,v 1.4 2003/11/16 21:07:30 gbazin Exp $
7 * Authors: Gildas Bazin <gbazin@netcourrier.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #define _VLC_CODEC_H 1
30 * This file defines the structure and types used by decoders and encoders
33 typedef struct decoder_owner_sys_t decoder_owner_sys_t;
36 * \defgroup decoder Decoder
38 * The structure describing a decoder
47 /* Module properties */
49 decoder_sys_t * p_sys;
52 int ( * pf_decode )( decoder_t *, block_t * );
53 decoder_fifo_t * p_fifo;
54 int ( * pf_run ) ( decoder_fifo_t * );
57 picture_t * ( * pf_decode_video )( decoder_t *, block_t ** );
58 aout_buffer_t * ( * pf_decode_audio )( decoder_t *, block_t ** );
59 void ( * pf_decode_sub) ( decoder_t *, block_t ** );
60 block_t * ( * pf_packetize ) ( decoder_t *, block_t ** );
62 /* Input format ie from demuxer (XXX: a lot of field could be invalid) */
65 /* Output format of decoder/packetizer */
72 /* Audio output callbacks */
73 aout_buffer_t * ( * pf_aout_buffer_new) ( decoder_t *, int );
74 void ( * pf_aout_buffer_del) ( decoder_t *, aout_buffer_t * );
76 /* Video output callbacks */
77 picture_t * ( * pf_vout_buffer_new) ( decoder_t * );
78 void ( * pf_vout_buffer_del) ( decoder_t *, picture_t * );
81 /* Private structure for the owner of the decoder */
82 decoder_owner_sys_t *p_owner;
90 * \defgroup decoder Encoder
92 * The structure describing a Encoder
101 /* Module properties */
103 encoder_sys_t * p_sys;
105 block_t * ( * pf_header )( encoder_t * );
106 block_t * ( * pf_encode_video )( encoder_t *, picture_t * );
107 block_t * ( * pf_encode_audio )( encoder_t *, aout_buffer_t * );
109 /* Properties of the input data fed to the encoder */
112 /* Properties of the output of the encoder */
115 /* FIXME: move these to the ffmpeg encoder */
129 #endif /* _VLC_CODEC_H */