MediaProcessors
Typedefs | Functions
proc_frame_2_ffmpeg.h File Reference

Facilities to convert processor's input/output frame to FFmpeg's formats and vice versa. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct proc_frame_ctx_s proc_frame_ctx_t
 
typedef struct AVFrame AVFrame
 
typedef enum AVPixelFormat AVPixelFormat
 
typedef enum proc_sample_fmt_enum proc_sample_fmt_t
 

Functions

void * proc_frame_ctx_2_avframe (const proc_frame_ctx_t *proc_frame_ctx)
 
AVFrame * allocate_frame_video (int pix_fmt, int width, int height)
 
void avframe_release (void **ref_avfame)
 
proc_frame_ctx_tavpacket_2_proc_frame_ctx (const void *avpacket_arg)
 
void * proc_frame_ctx_2_avpacket (const proc_frame_ctx_t *proc_frame_ctx)
 
void avpacket_release (void **ref_avpacket)
 
proc_frame_ctx_tavframe_2_proc_frame_ctx (const void *avframe)
 

Detailed Description

Facilities to convert processor's input/output frame to FFmpeg's formats and vice versa.

Author
Rafael Antoniello

Definition in file proc_frame_2_ffmpeg.h.

Function Documentation

AVFrame* allocate_frame_video ( int  pix_fmt,
int  width,
int  height 
)

Allocate an FFmpeg's AVFrame structure for video encoding. This is a wrapper function of the FFmpeg's 'av_frame_alloc()' for allocating an AVFrame structure.

Parameters
pix_fmtFFmpeg's video pixel-format identifier.
widthVideo frame width.
heightVideo frame height. return Pointer to the allocated AVFrame structure.

Definition at line 185 of file proc_frame_2_ffmpeg.c.

proc_frame_ctx_t* avframe_2_proc_frame_ctx ( const void *  avframe)

Transform FFmpeg's AVFrame structure to a processor frame context structure (type proc_frame_ctx_t).

Parameters
avframeOpaque pointer to the AVFrame structure. return Pointer to the processor frame context structure.

Definition at line 325 of file proc_frame_2_ffmpeg.c.

void avframe_release ( void **  ref_avfame)

Release FFmpeg's AVFrame structure. This function is a wrapper of FFmpeg's 'av_frame_free()'.

Parameters
ref_avfameOpaque reference to a pointer to an AVFrame structure to be released.

Definition at line 228 of file proc_frame_2_ffmpeg.c.

proc_frame_ctx_t* avpacket_2_proc_frame_ctx ( const void *  avpacket_arg)

Transform FFmpeg's AVPacket structure to a processor frame context structure (type proc_frame_ctx_t).

Parameters
avpacket_argOpaque pointer to the AVPacket structure. return Pointer to the processor frame context structure.

Definition at line 236 of file proc_frame_2_ffmpeg.c.

void avpacket_release ( void **  ref_avpacket)

Release FFmpeg's AVPacket structure. This function is a wrapper of FFmpeg's 'av_packet_free()'.

Parameters
ref_avpacketOpaque reference to a pointer to an AVPacket structure to be released.

Definition at line 316 of file proc_frame_2_ffmpeg.c.

void* proc_frame_ctx_2_avframe ( const proc_frame_ctx_t proc_frame_ctx)

Transform a processor frame context structure (type proc_frame_ctx_t) to an FFmpeg's AVFrame structure.

Parameters
proc_frame_ctxPointer to the processor frame context structure. return Opaque pointer that actually can be casted to an AVFrame structure.

Definition at line 47 of file proc_frame_2_ffmpeg.c.

void* proc_frame_ctx_2_avpacket ( const proc_frame_ctx_t proc_frame_ctx)

Transform a processor frame context structure (type proc_frame_ctx_t) to an FFmpeg's AVPacket structure.

Parameters
proc_frame_ctxPointer to the processor frame context structure. return Opaque pointer that actually can be casted to an AVPacket structure.

Definition at line 273 of file proc_frame_2_ffmpeg.c.