8#ifndef JANUS_PP_AVFORMAT
9#define JANUS_PP_AVFORMAT
13#include <libavcodec/avcodec.h>
14#include <libavformat/avformat.h>
16#define LIBAVCODEC_VER_AT_LEAST(major, minor) \
17 (LIBAVCODEC_VERSION_MAJOR > major || \
18 (LIBAVCODEC_VERSION_MAJOR == major && \
19 LIBAVCODEC_VERSION_MINOR >= minor))
21#define LIBAVFORMAT_VER_AT_LEAST(major, minor) \
22 (LIBAVFORMAT_VERSION_MAJOR > major || \
23 (LIBAVFORMAT_VERSION_MAJOR == major && \
24 LIBAVFORMAT_VERSION_MINOR >= minor))
26#if LIBAVCODEC_VER_AT_LEAST(51, 42)
27#define PIX_FMT_YUV420P AV_PIX_FMT_YUV420P
30#if LIBAVCODEC_VER_AT_LEAST(56, 56)
31#ifndef CODEC_FLAG_GLOBAL_HEADER
32#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
34#ifndef FF_INPUT_BUFFER_PADDING_SIZE
35#define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
39#if LIBAVCODEC_VER_AT_LEAST(57, 14)
44#if LIBAVCODEC_VER_AT_LEAST(59, 24)
45#define NEW_CHANNEL_LAYOUT
53AVStream *
janus_pp_new_audio_avstream(AVFormatContext *fctx,
int codec_id,
int samplerate,
int channels,
const uint8_t *extradata,
int size);