1 /*****************************************************************************
2 * vlc_codec.h: codec related structures
3 *****************************************************************************
4 * Copyright (C) 1999-2003 VideoLAN
5 * $Id: vlc_codec.h,v 1.3 2003/11/05 18:59:01 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
28 * This file defines the structure and types used by decoders and encoders
32 * \defgroup decoder Decoder
34 * The structure describing a decoder
43 /* Module properties */
45 decoder_sys_t * p_sys;
46 int ( * pf_init ) ( decoder_t * );
47 int ( * pf_decode )( decoder_t *, block_t * );
48 int ( * pf_end ) ( decoder_t * );
50 /* Input properties */
51 decoder_fifo_t * p_fifo; /* stores the PES stream data */
53 /* Tmp field for old decoder api */
54 int ( * pf_run ) ( decoder_fifo_t * );
62 * \defgroup decoder Encoder
64 * The structure describing a Encoder
73 /* Module properties */
75 encoder_sys_t * p_sys;
77 block_t * ( * pf_header )( encoder_t * );
78 block_t * ( * pf_encode_video )( encoder_t *, picture_t * );
79 block_t * ( * pf_encode_audio )( encoder_t *, aout_buffer_t * );
81 /* Properties of the input data fed to the encoder */
83 audio_sample_format_t audio;
84 video_frame_format_t video;
87 /* Properties of the output of the encoder */
88 vlc_fourcc_t i_fourcc;
92 uint8_t *p_extra_data;
94 /* FIXME: move these to the ffmpeg encoder */
96 int i_frame_rate_base;
111 #endif /* _VLC_CODEC_H */