FFmpeg
avcodec_internal.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /*
20  * APIs internal to the generic codec layer.
21  *
22  * MUST NOT be included by individual encoders or decoders.
23  */
24 
25 #ifndef AVCODEC_AVCODEC_INTERNAL_H
26 #define AVCODEC_AVCODEC_INTERNAL_H
27 
28 struct AVCodecContext;
29 struct AVFrame;
30 
31 /**
32  * avcodec_receive_frame() implementation for decoders.
33  */
34 int ff_decode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame);
35 
36 /**
37  * avcodec_receive_frame() implementation for encoders.
38  */
39 int ff_encode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame);
40 
41 /*
42  * Perform encoder initialization and validation.
43  * Called when opening the encoder, before the FFCodec.init() call.
44  */
45 int ff_encode_preinit(struct AVCodecContext *avctx);
46 
47 /**
48  * Perform decoder initialization and validation.
49  * Called when opening the decoder, before the FFCodec.init() call.
50  */
51 int ff_decode_preinit(struct AVCodecContext *avctx);
52 
53 void ff_decode_flush_buffers(struct AVCodecContext *avctx);
54 void ff_encode_flush_buffers(struct AVCodecContext *avctx);
55 
58 
59 void ff_codec_close(struct AVCodecContext *avctx);
60 
61 #endif // AVCODEC_AVCODEC_INTERNAL_H
ff_decode_receive_frame
int ff_decode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame)
avcodec_receive_frame() implementation for decoders.
Definition: decode.c:762
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:344
ff_encode_preinit
int ff_encode_preinit(struct AVCodecContext *avctx)
Definition: encode.c:731
ff_encode_internal_alloc
struct AVCodecInternal * ff_encode_internal_alloc(void)
Definition: encode.c:851
ff_encode_flush_buffers
void ff_encode_flush_buffers(struct AVCodecContext *avctx)
Definition: encode.c:841
ff_decode_preinit
int ff_decode_preinit(struct AVCodecContext *avctx)
Perform decoder initialization and validation.
Definition: decode.c:1686
frame
static AVFrame * frame
Definition: demux_decode.c:54
AVCodecInternal
Definition: internal.h:49
ff_decode_internal_alloc
struct AVCodecInternal * ff_decode_internal_alloc(void)
Definition: decode.c:1947
ff_decode_flush_buffers
void ff_decode_flush_buffers(struct AVCodecContext *avctx)
Definition: decode.c:1930
AVCodecContext
main external API structure.
Definition: avcodec.h:445
ff_encode_receive_frame
int ff_encode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame)
avcodec_receive_frame() implementation for encoders.
Definition: encode.c:828
ff_codec_close
void ff_codec_close(struct AVCodecContext *avctx)
Definition: avcodec.c:401