58 if (id3v2_extra_meta) {
71 unsigned int channel_type;
163 int64_t data_pos =
pos -
s->internal->data_offset;
164 int64_t packet_size = dsf->
audio_size - data_pos;
165 int64_t skip_size = dsf->
data_size - data_pos - packet_size;
169 if (packet_size <= 0 || skip_size <= 0)
177 if (ret < packet_size / st->codecpar->channels)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
uint64_t avio_rl64(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
#define MKTAG(a, b, c, d)
static int dsf_probe(const AVProbeData *p)
static const uint64_t dsf_channel_layout[]
AVInputFormat ff_dsf_demuxer
static int dsf_read_packet(AVFormatContext *s, AVPacket *pkt)
static int dsf_read_header(AVFormatContext *s)
static void read_id3(AVFormatContext *s, uint64_t id3pos)
static int read_header(FFV1Context *f)
#define AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT1_BACK
@ AV_CODEC_ID_DSD_MSBF_PLANAR
@ AV_CODEC_ID_DSD_LSBF_PLANAR
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta, unsigned int max_search_size)
Read an ID3v2 tag, including supported extra metadata.
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta)
Free memory allocated parsing special (non-text) metadata.
int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta *extra_meta)
Create a stream for each APIC (attached picture) extracted from the ID3v2 header.
int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *extra_meta)
Create chapters for all CHAP tags found in the ID3v2 header.
#define ID3v2_DEFAULT_MAGIC
Default magic bytes for ID3v2 header: "ID3".
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define FF_ARRAY_ELEMS(a)
uint64_t channel_layout
Audio only.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
int block_align
Audio only.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
This structure stores compressed data.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define avpriv_request_sample(...)