FFmpeg 5.1.6
Data Structures | Macros | Functions
videotoolbox.h File Reference

Public libavcodec Videotoolbox header. More...

#include <stdint.h>
#include <VideoToolbox/VideoToolbox.h>
#include "libavcodec/avcodec.h"

Go to the source code of this file.

Data Structures

struct  AVVideotoolboxContext
 This struct holds all the information that needs to be passed between the caller and libavcodec for initializing Videotoolbox decoding. More...
 

Macros

#define Picture   QuickdrawPicture
 

Functions

AVVideotoolboxContextav_videotoolbox_alloc_context (void)
 Allocate and initialize a Videotoolbox context. More...
 
int av_videotoolbox_default_init (AVCodecContext *avctx)
 This is a convenience function that creates and sets up the Videotoolbox context using an internal implementation. More...
 
int av_videotoolbox_default_init2 (AVCodecContext *avctx, AVVideotoolboxContext *vtctx)
 This is a convenience function that creates and sets up the Videotoolbox context using an internal implementation. More...
 
void av_videotoolbox_default_free (AVCodecContext *avctx)
 This function must be called to free the Videotoolbox context initialized with av_videotoolbox_default_init(). More...
 

Detailed Description

Public libavcodec Videotoolbox header.

Definition in file videotoolbox.h.

Macro Definition Documentation

◆ Picture

#define Picture   QuickdrawPicture

Definition at line 34 of file videotoolbox.h.

Function Documentation

◆ av_videotoolbox_alloc_context()

AVVideotoolboxContext * av_videotoolbox_alloc_context ( void  )

Allocate and initialize a Videotoolbox context.

This function should be called from the get_format() callback when the caller selects the AV_PIX_FMT_VIDETOOLBOX format. The caller must then create the decoder object (using the output callback provided by libavcodec) that will be used for Videotoolbox-accelerated decoding.

When decoding with Videotoolbox is finished, the caller must destroy the decoder object and free the Videotoolbox context using av_free().

Returns
the newly allocated context or NULL on failure

◆ av_videotoolbox_default_init()

int av_videotoolbox_default_init ( AVCodecContext avctx)

This is a convenience function that creates and sets up the Videotoolbox context using an internal implementation.

Parameters
avctxthe corresponding codec context
Returns
>= 0 on success, a negative AVERROR code on failure

◆ av_videotoolbox_default_init2()

int av_videotoolbox_default_init2 ( AVCodecContext avctx,
AVVideotoolboxContext vtctx 
)

This is a convenience function that creates and sets up the Videotoolbox context using an internal implementation.

Parameters
avctxthe corresponding codec context
vtctxthe Videotoolbox context to use
Returns
>= 0 on success, a negative AVERROR code on failure

◆ av_videotoolbox_default_free()

void av_videotoolbox_default_free ( AVCodecContext avctx)

This function must be called to free the Videotoolbox context initialized with av_videotoolbox_default_init().

Parameters
avctxthe corresponding codec context