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
29
31
33
38
39 /**
40 * A map between packet and frame side data types.
41 * Terminated with an entry where packet=AV_PKT_DATA_NB.
42 */
44
45 /**
46 * avcodec_receive_frame() implementation for decoders.
47 */
49
50 /**
51 * avcodec_receive_frame() implementation for encoders.
52 */
54
55 /*
56 * Perform encoder initialization and validation.
57 * Called when opening the encoder, before the FFCodec.init() call.
58 */
60
61 /**
62 * Perform decoder initialization and validation.
63 * Called when opening the decoder, before the FFCodec.init() call.
64 */
66
69
74
76
78
81
82 /**
83 * Wait for decoding threads to finish and reset internal state.
84 * Called by avcodec_flush_buffers().
85 *
86 * @param avctx The context.
87 */
89
90 /**
91 * Submit available packets for decoding to worker threads, return a
92 * decoded frame if available. Returns AVERROR(EAGAIN) if none is available.
93 *
94 * Parameters are the same as FFCodec.receive_frame.
95 */
97
98 /**
99 * Do the actual decoding and obtain a decoded frame from the decoder, if
100 * available. When frame threading is used, this is invoked by the worker
101 * threads, otherwise by the top layer directly.
102 */
104
105 /**
106 * Get a packet for decoding. This gets invoked by the worker threads.
107 */
109
110 #endif // AVCODEC_AVCODEC_INTERNAL_H