FFmpeg
Data Structures | Macros | Functions | Variables
pcmdec.c File Reference
#include "libavutil/avstring.h"
#include "avformat.h"
#include "internal.h"
#include "pcm.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  PCMAudioDemuxerContext
 

Macros

#define PCMDEF_0(name_, long_name_, ext, codec, ...)
 
#define PCMDEF_1(name_, long_name_, ext, codec, ...)
 
#define PCMDEF_2(name, long_name, ext, codec, enabled, ...)   PCMDEF_ ## enabled(name, long_name, ext, codec, __VA_ARGS__)
 
#define PCMDEF_3(name, long_name, ext, codec, config, ...)   PCMDEF_2(name, long_name, ext, codec, config, __VA_ARGS__)
 
#define PCMDEF_EXT(name, long_name, ext, uppercase, ...)
 
#define PCMDEF(name, long_name, ext, uppercase)   PCMDEF_EXT(name, long_name, ext, uppercase, )
 

Functions

static int pcm_read_header (AVFormatContext *s)
 

Variables

static const AVOption pcm_options []
 
static const AVClass pcm_demuxer_class
 

Macro Definition Documentation

◆ PCMDEF_0

#define PCMDEF_0 (   name_,
  long_name_,
  ext,
  codec,
  ... 
)

Definition at line 109 of file pcmdec.c.

◆ PCMDEF_1

#define PCMDEF_1 (   name_,
  long_name_,
  ext,
  codec,
  ... 
)
Value:
const AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.priv_data_size = sizeof(PCMAudioDemuxerContext), \
.extensions = ext, \
.raw_codec_id = codec, \
.priv_class = &pcm_demuxer_class, \
__VA_ARGS__ \
};

Definition at line 110 of file pcmdec.c.

◆ PCMDEF_2

#define PCMDEF_2 (   name,
  long_name,
  ext,
  codec,
  enabled,
  ... 
)    PCMDEF_ ## enabled(name, long_name, ext, codec, __VA_ARGS__)

Definition at line 124 of file pcmdec.c.

◆ PCMDEF_3

#define PCMDEF_3 (   name,
  long_name,
  ext,
  codec,
  config,
  ... 
)    PCMDEF_2(name, long_name, ext, codec, config, __VA_ARGS__)

Definition at line 126 of file pcmdec.c.

◆ PCMDEF_EXT

#define PCMDEF_EXT (   name,
  long_name,
  ext,
  uppercase,
  ... 
)
Value:
PCMDEF_3(name, long_name, ext, AV_CODEC_ID_PCM_ ## uppercase, \
CONFIG_PCM_ ## uppercase ## _DEMUXER, __VA_ARGS__)

Definition at line 128 of file pcmdec.c.

◆ PCMDEF

#define PCMDEF (   name,
  long_name,
  ext,
  uppercase 
)    PCMDEF_EXT(name, long_name, ext, uppercase, )

Definition at line 131 of file pcmdec.c.

Function Documentation

◆ pcm_read_header()

static int pcm_read_header ( AVFormatContext s)
static

Definition at line 36 of file pcmdec.c.

Variable Documentation

◆ pcm_options

const AVOption pcm_options[]
static
Initial value:
= {
{ "sample_rate", "", 0x42, AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "channels", "", 0x42, AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}

Definition at line 97 of file pcmdec.c.

◆ pcm_demuxer_class

const AVClass pcm_demuxer_class
static
Initial value:
= {
.class_name = "pcm demuxer",
.item_name = av_default_item_name,
.option = pcm_options,
}

Definition at line 102 of file pcmdec.c.

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
PCMDEF_3
#define PCMDEF_3(name, long_name, ext, codec, config,...)
Definition: pcmdec.c:126
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:149
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:476
AVInputFormat
Definition: avformat.h:650
pcm_options
static const AVOption pcm_options[]
Definition: pcmdec.c:97
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:655
pcm_demuxer_class
static const AVClass pcm_demuxer_class
Definition: pcmdec.c:102
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:278
ff_pcm_read_packet
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: pcm.c:29
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
ff_pcm_read_seek
int ff_pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: pcm.c:56
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
PCMAudioDemuxerContext
Definition: pcmdec.c:30
pcm_read_header
static int pcm_read_header(AVFormatContext *s)
Definition: pcmdec.c:36
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561