30 if (p->
buf_size < 45 || memcmp(p->
buf,
"1bit", 4) ||
101 uint32_t text_offset, data_offset, channel_assign;
124 av_dict_set(&
s->metadata,
"playback_time", playback_time, 0);
137 if (!(channel_assign & 1)) {
139 for (
i = 1;
i < 32;
i++)
140 if ((channel_assign >>
i) & 1)
148 if (
avio_seek(pb, text_offset, SEEK_SET) >= 0) {
161 return avio_seek(pb, data_offset, SEEK_SET);
175 .priv_class = &wsd_demuxer_class,
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() 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_rb32(AVIOContext *s)
int avio_r8(AVIOContext *s)
#define bit(string, value)
#define AV_CH_FRONT_RIGHT
#define AV_CH_FRONT_RIGHT_OF_CENTER
#define AV_CH_BACK_CENTER
#define AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_FRONT_CENTER
#define AV_CH_LOW_FREQUENCY
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_WARNING
Something somehow does not look correct.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define FF_RAW_DEMUXER_CLASS(name)
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.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
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.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define avpriv_request_sample(...)
char * av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
Get the timecode string from the SMPTE timecode format.
#define AV_TIMECODE_STR_SIZE
static int wsd_probe(const AVProbeData *p)
static int wsd_to_av_channel_layoyt(AVFormatContext *s, int bit)
static int get_metadata(AVFormatContext *s, const char *const tag, const unsigned size)
static int empty_string(const char *buf, unsigned size)
static int wsd_read_header(AVFormatContext *s)
AVInputFormat ff_wsd_demuxer