FFmpeg
Functions | Variables
wrapped_avframe.c File Reference
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "libavutil/frame.h"
#include "libavutil/buffer.h"
#include "libavutil/mem.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, AVFrame *out, int *got_frame, AVPacket *pkt)
 

Variables

const FFCodec ff_wrapped_avframe_encoder
 
const FFCodec 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 35 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 42 of file wrapped_avframe.c.

◆ wrapped_avframe_decode()

static int wrapped_avframe_decode ( AVCodecContext avctx,
AVFrame out,
int *  got_frame,
AVPacket pkt 
)
static

Definition at line 78 of file wrapped_avframe.c.

Variable Documentation

◆ ff_wrapped_avframe_encoder

const FFCodec ff_wrapped_avframe_encoder
Initial value:
= {
.p.name = "wrapped_avframe",
CODEC_LONG_NAME("AVFrame to AVPacket passthrough"),
.p.type = AVMEDIA_TYPE_VIDEO,
}

Definition at line 106 of file wrapped_avframe.c.

◆ ff_wrapped_avframe_decoder

const FFCodec ff_wrapped_avframe_decoder
Initial value:
= {
.p.name = "wrapped_avframe",
CODEC_LONG_NAME("AVPacket to AVFrame passthrough"),
.p.type = AVMEDIA_TYPE_VIDEO,
}

Definition at line 115 of file wrapped_avframe.c.

wrapped_avframe_decode
static int wrapped_avframe_decode(AVCodecContext *avctx, AVFrame *out, int *got_frame, AVPacket *pkt)
Definition: wrapped_avframe.c:78
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:320
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
AV_CODEC_ID_WRAPPED_AVFRAME
@ AV_CODEC_ID_WRAPPED_AVFRAME
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: codec_id.h:608
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
wrapped_avframe_encode
static int wrapped_avframe_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: wrapped_avframe.c:42
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201