Blender V5.0
ffmpeg_compat.h File Reference
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/cpu.h>
#include <libavutil/display.h>
#include <libswscale/swscale.h>

Go to the source code of this file.

Macros

#define FFMPEG_INLINE   static inline
#define FFMPEG_USE_OLD_CHANNEL_VARS
#define FFMPEG_SWSCALE_THREADING
#define FFMPEG_USE_DURATION_WORKAROUND   1

Functions

FFMPEG_INLINE void my_guess_pkt_duration (AVFormatContext *s, AVStream *st, AVPacket *pkt)
FFMPEG_INLINE int64_t timestamp_from_pts_or_dts (int64_t pts, int64_t dts)
FFMPEG_INLINE int64_t av_get_pts_from_frame (AVFrame *picture)
FFMPEG_INLINE int64_t av_get_frame_duration_in_pts_units (const AVFrame *picture)
FFMPEG_INLINE size_t ffmpeg_get_buffer_alignment ()
FFMPEG_INLINE void ffmpeg_copy_display_matrix (const AVStream *src, AVStream *dst)
FFMPEG_INLINE int ffmpeg_get_video_rotation (const AVStream *stream)
FFMPEG_INLINE enum AVPixelFormat * ffmpeg_get_pix_fmts (struct AVCodecContext *context, const AVCodec *codec)
FFMPEG_INLINE enum AVSampleFormat * ffmpeg_get_sample_fmts (struct AVCodecContext *context, const AVCodec *codec)
FFMPEG_INLINE const int * ffmpeg_get_sample_rates (struct AVCodecContext *context, const AVCodec *codec)

Detailed Description

Compatibility macros to make every FFMPEG installation appear like the most current installation (wrapping some functionality sometimes) it also includes all FFMPEG header files at once, no need to do it separately.

Definition in file ffmpeg_compat.h.

Macro Definition Documentation

◆ FFMPEG_INLINE

◆ FFMPEG_SWSCALE_THREADING

#define FFMPEG_SWSCALE_THREADING

Definition at line 61 of file ffmpeg_compat.h.

◆ FFMPEG_USE_DURATION_WORKAROUND

#define FFMPEG_USE_DURATION_WORKAROUND   1

Definition at line 77 of file ffmpeg_compat.h.

◆ FFMPEG_USE_OLD_CHANNEL_VARS

#define FFMPEG_USE_OLD_CHANNEL_VARS

Definition at line 56 of file ffmpeg_compat.h.

Function Documentation

◆ av_get_frame_duration_in_pts_units()

FFMPEG_INLINE int64_t av_get_frame_duration_in_pts_units ( const AVFrame * picture)

Definition at line 144 of file ffmpeg_compat.h.

◆ av_get_pts_from_frame()

FFMPEG_INLINE int64_t av_get_pts_from_frame ( AVFrame * picture)

Definition at line 137 of file ffmpeg_compat.h.

References timestamp_from_pts_or_dts().

◆ ffmpeg_copy_display_matrix()

FFMPEG_INLINE void ffmpeg_copy_display_matrix ( const AVStream * src,
AVStream * dst )

Definition at line 172 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ ffmpeg_get_buffer_alignment()

FFMPEG_INLINE size_t ffmpeg_get_buffer_alignment ( )

Definition at line 153 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ ffmpeg_get_pix_fmts()

FFMPEG_INLINE enum AVPixelFormat * ffmpeg_get_pix_fmts ( struct AVCodecContext * context,
const AVCodec * codec )

Definition at line 211 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ ffmpeg_get_sample_fmts()

FFMPEG_INLINE enum AVSampleFormat * ffmpeg_get_sample_fmts ( struct AVCodecContext * context,
const AVCodec * codec )

Definition at line 220 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ ffmpeg_get_sample_rates()

FFMPEG_INLINE const int * ffmpeg_get_sample_rates ( struct AVCodecContext * context,
const AVCodec * codec )

Definition at line 229 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ ffmpeg_get_video_rotation()

FFMPEG_INLINE int ffmpeg_get_video_rotation ( const AVStream * stream)

Definition at line 190 of file ffmpeg_compat.h.

References FFMPEG_INLINE.

◆ my_guess_pkt_duration()

FFMPEG_INLINE void my_guess_pkt_duration ( AVFormatContext * s,
AVStream * st,
AVPacket * pkt )

Definition at line 86 of file ffmpeg_compat.h.

References PRId64.

◆ timestamp_from_pts_or_dts()

FFMPEG_INLINE int64_t timestamp_from_pts_or_dts ( int64_t pts,
int64_t dts )

Definition at line 125 of file ffmpeg_compat.h.

Referenced by av_get_pts_from_frame().