FFmpeg
Functions | Variables
wrapped_avframe.c File Reference
#include "avcodec.h"
#include "decode.h"
#include "internal.h"
#include "libavutil/internal.h"
#include "libavutil/frame.h"
#include "libavutil/buffer.h"
#include "libavutil/pixdesc.h"

Go to the source code of this file.

Functions

static void wrapped_avframe_release_buffer (void *unused, uint8_t *data)
 
static int wrapped_avframe_encode (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static int wrapped_avframe_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
 

Variables

AVCodec ff_wrapped_avframe_encoder
 
AVCodec ff_wrapped_avframe_decoder
 

Detailed Description

Simple wrapper to store an AVFrame and forward it as AVPacket.

Definition in file wrapped_avframe.c.

Function Documentation

◆ wrapped_avframe_release_buffer()

static void wrapped_avframe_release_buffer ( void *  unused,
uint8_t data 
)
static

Definition at line 36 of file wrapped_avframe.c.

Referenced by wrapped_avframe_encode().

◆ wrapped_avframe_encode()

static int wrapped_avframe_encode ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int got_packet 
)
static

Definition at line 43 of file wrapped_avframe.c.

◆ wrapped_avframe_decode()

static int wrapped_avframe_decode ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket pkt 
)
static

Definition at line 79 of file wrapped_avframe.c.

Variable Documentation

◆ ff_wrapped_avframe_encoder

AVCodec ff_wrapped_avframe_encoder
Initial value:
= {
.name = "wrapped_avframe",
.long_name = NULL_IF_CONFIG_SMALL("AVFrame to AVPacket passthrough"),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 112 of file wrapped_avframe.c.

◆ ff_wrapped_avframe_decoder

AVCodec ff_wrapped_avframe_decoder
Initial value:
= {
.name = "wrapped_avframe",
.long_name = NULL_IF_CONFIG_SMALL("AVPacket to AVFrame passthrough"),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 121 of file wrapped_avframe.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
AV_CODEC_ID_WRAPPED_AVFRAME
@ AV_CODEC_ID_WRAPPED_AVFRAME
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: avcodec.h:708
wrapped_avframe_decode
static int wrapped_avframe_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: wrapped_avframe.c:79
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
wrapped_avframe_encode
static int wrapped_avframe_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: wrapped_avframe.c:43
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201