Go to the documentation of this file.
25 #define MARKER_16LE 0x72F81F4E
26 #define MARKER_20LE 0x20876FF0E154
27 #define MARKER_24LE 0x72F8961F4EA5
29 #define IS_16LE_MARKER(state) ((state & 0xFFFFFFFF) == MARKER_16LE)
30 #define IS_20LE_MARKER(state) ((state & 0xF0FFFFF0FFFF) == MARKER_20LE)
31 #define IS_24LE_MARKER(state) ((state & 0xFFFFFFFFFFFF) == MARKER_24LE)
32 #define IS_LE_MARKER(state) (IS_16LE_MARKER(state) || IS_20LE_MARKER(state) || IS_24LE_MARKER(state))
36 int data_type,
int data_size,
52 if ((data_type & 0x1F) != 0x1C) {
61 switch (data_size / word_bits) {
81 *
offset *= (word_bits + 7 >> 3) * 2;
88 int markers[3] = { 0 };
89 int i, pos, sum,
max, data_type, data_size,
offset;
92 for (pos = 0; pos < p->
buf_size; pos++) {
120 if (markers[
max] < markers[
i])
124 if (markers[
max] > 3 && markers[
max] * 4 > sum * 3)
186 if (!
s->nb_streams) {
static void bswap_buf24(uint8_t *data, int size)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
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 FFSWAP(type, a, b)
#define AVERROR_EOF
End of file.
static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt)
int buf_size
Size of buf except extra allocated bytes.
#define IS_20LE_MARKER(state)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
void ff_spdif_bswap_buf16(uint16_t *dst, const uint16_t *src, int w)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define IS_16LE_MARKER(state)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int s337m_read_header(AVFormatContext *s)
This structure contains the data a format has to probe a file.
static int s337m_probe(const AVProbeData *p)
AVCodecID
Identify the syntax and semantics of the bitstream.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_RL24
int avio_r8(AVIOContext *s)
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 offset
#define i(width, name, range_min, range_max)
unsigned int avio_rl24(AVIOContext *s)
static int s337m_get_offset_and_codec(AVFormatContext *s, uint64_t state, int data_type, int data_size, int *offset, enum AVCodecID *codec)
#define IS_LE_MARKER(state)
#define FF_ARRAY_ELEMS(a)
AVInputFormat ff_s337m_demuxer
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.