FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
frame.h File Reference

reference-counted frame API More...

#include <stdint.h>
#include "avutil.h"
#include "buffer.h"
#include "dict.h"
#include "rational.h"
#include "samplefmt.h"
#include "version.h"

Go to the source code of this file.

Data Structures

struct  AVFrameSideData
 
struct  AVFrame
 This structure describes decoded (raw) audio or video data. More...
 

Macros

#define AVCOL_SPC_YCGCO   AVCOL_SPC_YCOCG
 
#define AV_NUM_DATA_POINTERS   8
 
#define AV_FRAME_FLAG_CORRUPT   (1 << 0)
 The frame data may be corrupted, e.g.
 
#define FF_DECODE_ERROR_INVALID_BITSTREAM   1
 
#define FF_DECODE_ERROR_MISSING_REFERENCE   2
 

Enumerations

enum  AVColorSpace {
  AVCOL_SPC_RGB = 0, AVCOL_SPC_BT709 = 1, AVCOL_SPC_UNSPECIFIED = 2, AVCOL_SPC_FCC = 4,
  AVCOL_SPC_BT470BG = 5, AVCOL_SPC_SMPTE170M = 6, AVCOL_SPC_SMPTE240M = 7, AVCOL_SPC_YCOCG = 8,
  AVCOL_SPC_BT2020_NCL = 9, AVCOL_SPC_BT2020_CL = 10, AVCOL_SPC_NB
}
 
enum  AVColorRange { AVCOL_RANGE_UNSPECIFIED = 0, AVCOL_RANGE_MPEG = 1, AVCOL_RANGE_JPEG = 2, AVCOL_RANGE_NB }
 
enum  AVFrameSideDataType {
  AV_FRAME_DATA_PANSCAN, AV_FRAME_DATA_A53_CC, AV_FRAME_DATA_STEREO3D, AV_FRAME_DATA_MATRIXENCODING,
  AV_FRAME_DATA_DOWNMIX_INFO
}
 

Functions

int64_t av_frame_get_best_effort_timestamp (const AVFrame *frame)
 Accessors for some AVFrame fields.
 
void av_frame_set_best_effort_timestamp (AVFrame *frame, int64_t val)
 
int64_t av_frame_get_pkt_duration (const AVFrame *frame)
 
void av_frame_set_pkt_duration (AVFrame *frame, int64_t val)
 
int64_t av_frame_get_pkt_pos (const AVFrame *frame)
 
void av_frame_set_pkt_pos (AVFrame *frame, int64_t val)
 
int64_t av_frame_get_channel_layout (const AVFrame *frame)
 
void av_frame_set_channel_layout (AVFrame *frame, int64_t val)
 
int av_frame_get_channels (const AVFrame *frame)
 
void av_frame_set_channels (AVFrame *frame, int val)
 
int av_frame_get_sample_rate (const AVFrame *frame)
 
void av_frame_set_sample_rate (AVFrame *frame, int val)
 
AVDictionaryav_frame_get_metadata (const AVFrame *frame)
 
void av_frame_set_metadata (AVFrame *frame, AVDictionary *val)
 
int av_frame_get_decode_error_flags (const AVFrame *frame)
 
void av_frame_set_decode_error_flags (AVFrame *frame, int val)
 
int av_frame_get_pkt_size (const AVFrame *frame)
 
void av_frame_set_pkt_size (AVFrame *frame, int val)
 
AVDictionary ** avpriv_frame_get_metadatap (AVFrame *frame)
 
int8_t * av_frame_get_qp_table (AVFrame *f, int *stride, int *type)
 
int av_frame_set_qp_table (AVFrame *f, AVBufferRef *buf, int stride, int type)
 
enum AVColorSpace av_frame_get_colorspace (const AVFrame *frame)
 
void av_frame_set_colorspace (AVFrame *frame, enum AVColorSpace val)
 
enum AVColorRange av_frame_get_color_range (const AVFrame *frame)
 
void av_frame_set_color_range (AVFrame *frame, enum AVColorRange val)
 
const char * av_get_colorspace_name (enum AVColorSpace val)
 Get the name of a colorspace.
 
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.
 
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_get_buffer (AVFrame *frame, int align)
 Allocate new buffer(s) for audio or video data.
 
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 (AVFrame *dst, const AVFrame *src)
 Copy the frame data from src to dst.
 
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)
 

Detailed Description

reference-counted frame API

Definition in file frame.h.

Macro Definition Documentation

#define AVCOL_SPC_YCGCO   AVCOL_SPC_YCOCG

Definition at line 52 of file frame.h.

Referenced by get_pixel_format().

#define AV_NUM_DATA_POINTERS   8
#define FF_DECODE_ERROR_INVALID_BITSTREAM   1

Definition at line 493 of file frame.h.

Referenced by ac3_decode_frame(), and cpia_decode_frame().

#define FF_DECODE_ERROR_MISSING_REFERENCE   2

Definition at line 494 of file frame.h.

Enumeration Type Documentation

Enumerator:
AVCOL_SPC_RGB 
AVCOL_SPC_BT709 

also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B

AVCOL_SPC_UNSPECIFIED 
AVCOL_SPC_FCC 
AVCOL_SPC_BT470BG 

also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601

AVCOL_SPC_SMPTE170M 

also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above

AVCOL_SPC_SMPTE240M 
AVCOL_SPC_YCOCG 

Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.

AVCOL_SPC_BT2020_NCL 

ITU-R BT2020 non-constant luminance system.

AVCOL_SPC_BT2020_CL 

ITU-R BT2020 constant luminance system.

AVCOL_SPC_NB 

Not part of ABI.

Definition at line 39 of file frame.h.

Enumerator:
AVCOL_RANGE_UNSPECIFIED 
AVCOL_RANGE_MPEG 

the normal 219*2^(n-8) "MPEG" YUV ranges

AVCOL_RANGE_JPEG 

the normal 2^n-1 "JPEG" YUV ranges

AVCOL_RANGE_NB 

Not part of ABI.

Definition at line 54 of file frame.h.