FFmpeg
Loading...
Searching...
No Matches
pcmdec.c File Reference
#include "config_components.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "avformat.h"
#include "demux.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, ...)
 
#define PCMDEF_3(name, long_name, ext, codec, config, ...)
 
#define PCMDEF_EXT(name, long_name, ext, uppercase, ...)
 
#define PCMDEF(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 119 of file pcmdec.c.

◆ PCMDEF_1

#define PCMDEF_1 ( name_,
long_name_,
ext,
codec,
... )
Value:
const FFInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.p.name = #name_, \
.p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.p.extensions = ext, \
.p.priv_class = &pcm_demuxer_class, \
.priv_data_size = sizeof(PCMAudioDemuxerContext), \
.raw_codec_id = codec, \
__VA_ARGS__ \
};
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition avformat.h:499
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition avformat.h:498
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition pcm.c:57
int ff_pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition pcm.c:73
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition libcdio.c:151
static int pcm_read_header(AVFormatContext *s)
Definition pcmdec.c:41
static const AVClass pcm_demuxer_class
Definition pcmdec.c:112

Definition at line 120 of file pcmdec.c.

◆ PCMDEF_2

#define PCMDEF_2 ( name,
long_name,
ext,
codec,
enabled,
... )
Value:
PCMDEF_ ## enabled(name, long_name, ext, codec, __VA_ARGS__)
const char * name
Definition qsvenc.c:142

Definition at line 134 of file pcmdec.c.

◆ PCMDEF_3

#define PCMDEF_3 ( name,
long_name,
ext,
codec,
config,
... )
Value:
PCMDEF_2(name, long_name, ext, codec, config, __VA_ARGS__)
#define PCMDEF_2(name, long_name, ext, codec, enabled,...)
Definition pcmdec.c:134

Definition at line 136 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__)
#define PCMDEF_3(name, long_name, ext, codec, config,...)
Definition pcmdec.c:136

Definition at line 138 of file pcmdec.c.

◆ PCMDEF

#define PCMDEF ( name,
long_name,
ext,
uppercase )
Value:
PCMDEF_EXT(name, long_name, ext, uppercase, )
#define PCMDEF_EXT(name, long_name, ext, uppercase,...)
Definition pcmdec.c:138

Definition at line 141 of file pcmdec.c.

Function Documentation

◆ pcm_read_header()

static int pcm_read_header ( AVFormatContext * s)
static

Definition at line 41 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 },
{ "ch_layout", "", 0x42 , AV_OPT_TYPE_CHLAYOUT, {.str = "mono"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition coverity.c:32
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition opt.h:355
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
Definition opt.h:330

Definition at line 107 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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
static const AVOption pcm_options[]
Definition pcmdec.c:107

Definition at line 112 of file pcmdec.c.