Go to the documentation of this file.
32 #define SCD_MAGIC ((uint64_t)MKBETAG('S', 'E', 'D', 'B') << 32 | \
33 MKBETAG('S', 'S', 'C', 'F'))
34 #define SCD_MIN_HEADER_SIZE 20
35 #define SCD_OFFSET_HEADER_SIZE 28
36 #define SCD_TRACK_HEADER_SIZE 32
38 #define SCD_TRACK_ID_PCM 0
39 #define SCD_TRACK_ID_OGG 6
40 #define SCD_TRACK_ID_MP3 7
41 #define SCD_TRACK_ID_MS_ADPCM 12
105 for (
size_t i = 0;
i <
table->count;
i++)
109 for (
size_t i = 0;
i <
table->count;
i++)
158 "add '-strict %d' if you want to use it.\n",
163 hoffset =
ctx->hdr.table1.entries[
index];
255 if (
ctx->hdr.version != 3) {
273 for (
int i = 0;
i <
ctx->hdr.table1.count;
i++) {
278 if (
ctx->hdr.table1.count == 0)
293 for (
int i = 0;
i <
ctx->hdr.table1.count;
i++) {
298 ctx->current_track %=
ctx->hdr.table1.count;
300 trk =
ctx->tracks +
ctx->current_track;
301 par =
s->streams[
ctx->current_track]->codecpar;
323 }
else if (
ret < 0) {
336 ctx->current_track++;
351 for(
int i = 0;
i <
ctx->hdr.table1.count; ++
i)
352 ctx->tracks[
i].bytes_read = 0;
#define AVERROR_EXPERIMENTAL
Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
This struct describes the properties of an encoded stream.
#define AVERROR_EOF
End of file.
static const uint16_t table[]
#define SCD_TRACK_ID_MS_ADPCM
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int nb_channels
Number of channels in this layout.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static av_cold int read_close(AVFormatContext *ctx)
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
enum AVStreamParseType need_parsing
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define SCD_MIN_HEADER_SIZE
static int scd_read_close(AVFormatContext *s)
This structure contains the data a format has to probe a file.
AVChannelLayout ch_layout
Audio only.
int sample_rate
Audio only.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
int flags
A combination of AV_PKT_FLAG values.
static int scd_read_offsets(AVFormatContext *s)
static int scd_read_table(AVFormatContext *s, SCDOffsetTable *table)
const AVInputFormat ff_scd_demuxer
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int block_align
Audio only.
static int scd_read_header(AVFormatContext *s)
void * av_calloc(size_t nmemb, size_t size)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int index
stream index in AVFormatContext
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set that converts the value to a string and stores it.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
static int scd_probe(const AVProbeData *p)
#define avpriv_request_sample(...)
#define SCD_TRACK_HEADER_SIZE
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define SCD_OFFSET_HEADER_SIZE
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
static int scd_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
static int scd_read_packet(AVFormatContext *s, AVPacket *pkt)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_RB64
static int scd_read_track(AVFormatContext *s, SCDTrackHeader *track, int index)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16