FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
frame.c File Reference
#include "channel_layout.h"
#include "avassert.h"
#include "buffer.h"
#include "common.h"
#include "dict.h"
#include "frame.h"
#include "imgutils.h"
#include "mem.h"
#include "samplefmt.h"

Go to the source code of this file.

Macros

#define CHECK_CHANNELS_CONSISTENCY(frame)
 

Functions

AVDictionary ** avpriv_frame_get_metadatap (AVFrame *frame)
 
int av_frame_set_qp_table (AVFrame *f, AVBufferRef *buf, int stride, int qp_type)
 
int8_t * av_frame_get_qp_table (AVFrame *f, int *stride, int *type)
 
const char * av_get_colorspace_name (enum AVColorSpace val)
 Get the name of a colorspace.
 
static void get_frame_defaults (AVFrame *frame)
 
static void free_side_data (AVFrameSideData **ptr_sd)
 
AVFrameav_frame_alloc (void)
 Allocate an AVFrame and set its fields to default values.
 
void av_frame_free (AVFrame **frame)
 Free the frame and any dynamically allocated objects in it, e.g.
 
static int get_video_buffer (AVFrame *frame, int align)
 
static int get_audio_buffer (AVFrame *frame, int align)
 
int av_frame_get_buffer (AVFrame *frame, int align)
 Allocate new buffer(s) for audio or video data.
 
int av_frame_ref (AVFrame *dst, const AVFrame *src)
 Set up a new reference to the data described by the source frame.
 
AVFrameav_frame_clone (const AVFrame *src)
 Create a new frame that references the same data as src.
 
void av_frame_unref (AVFrame *frame)
 Unreference all the buffers referenced by frame and reset the frame fields.
 
void av_frame_move_ref (AVFrame *dst, AVFrame *src)
 Move everythnig contained in src to dst and reset src.
 
int av_frame_is_writable (AVFrame *frame)
 Check if the frame data is writable.
 
int av_frame_make_writable (AVFrame *frame)
 Ensure that the frame data is writable, avoiding data copy if possible.
 
int av_frame_copy_props (AVFrame *dst, const AVFrame *src)
 Copy only "metadata" fields from src to dst.
 
AVBufferRefav_frame_get_plane_buffer (AVFrame *frame, int plane)
 Get the buffer reference a given data plane is stored in.
 
AVFrameSideDataav_frame_new_side_data (AVFrame *frame, enum AVFrameSideDataType type, int size)
 Add a new side data to a frame.
 
AVFrameSideDataav_frame_get_side_data (const AVFrame *frame, enum AVFrameSideDataType type)
 
static int frame_copy_video (AVFrame *dst, const AVFrame *src)
 
static int frame_copy_audio (AVFrame *dst, const AVFrame *src)
 
int av_frame_copy (AVFrame *dst, const AVFrame *src)
 Copy the frame data from src to dst.
 
void av_frame_remove_side_data (AVFrame *frame, enum AVFrameSideDataType type)
 If side data of the supplied type exists in the frame, free it and remove it from the frame.
 
const char * av_frame_side_data_name (enum AVFrameSideDataType type)
 

Macro Definition Documentation

#define CHECK_CHANNELS_CONSISTENCY (   frame)
Value:
av_assert2(!(frame)->channel_layout || \
(frame)->channels == \

Definition at line 42 of file frame.c.

Referenced by av_frame_get_plane_buffer(), av_frame_ref(), frame_copy_audio(), and get_audio_buffer().

Function Documentation

static void get_frame_defaults ( AVFrame frame)
static

Definition at line 89 of file frame.c.

Referenced by av_frame_alloc(), av_frame_move_ref(), and av_frame_unref().

static void free_side_data ( AVFrameSideData **  ptr_sd)
static

Definition at line 114 of file frame.c.

Referenced by av_frame_copy_props(), av_frame_remove_side_data(), and av_frame_unref().

static int get_video_buffer ( AVFrame frame,
int  align 
)
static

Definition at line 145 of file frame.c.

Referenced by av_frame_get_buffer().

static int get_audio_buffer ( AVFrame frame,
int  align 
)
static

Definition at line 197 of file frame.c.

Referenced by av_frame_get_buffer().

static int frame_copy_video ( AVFrame dst,
const AVFrame src 
)
static

Definition at line 603 of file frame.c.

Referenced by av_frame_copy().

static int frame_copy_audio ( AVFrame dst,
const AVFrame src 
)
static

Definition at line 625 of file frame.c.

Referenced by av_frame_copy().