History

lavc: add a header for internal generic-layer APIs

The goal is to distinguish between APIs provided by the generic layer to individual codecs and APIs internal to the generic layer. Start by moving ff_{decode,encode}_receive_frame() and ff_{decode,encode}_preinit() into this new header, as those functions are called from generic code and should not be visible to individual codecs.

Anton Khirnov committed 3 years ago

Commit 5e7b5b01 parent 83c0f7b6 files · +56 −22Browse files

Showing the changes to libavcodec/avcodec_internal.h (1 of 6 files). Show all

Unified · Split

libavcodec/avcodec_internal.h+53−0
@@ -0,0 +1,53 @@
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
28struct AVCodecContext;
29struct AVFrame;
30
31/**
32 * avcodec_receive_frame() implementation for decoders.
33 */
34int ff_decode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame);
35
36/**
37 * avcodec_receive_frame() implementation for encoders.
38 */
39int 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 */
45int 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 */
51int ff_decode_preinit(struct AVCodecContext *avctx);
52
53#endif // AVCODEC_AVCODEC_INTERNAL_H

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t