Go to the documentation of this file.
50 if ((br->
pos & 7) == 0)
56 return !!(br->
last & 0x80000000);
63 for (
int i = 0;
i < n;
i++) {
80 while ((
ret =
pop(br, pb)) == 0)
101 if (!(
data & 0x80)) {
109 if (!(
data & 0x80)) {
128 if (bytestream2_get_be16(&gb) != 0x4C32)
133 if (bytestream2_get_be16(&gb) == 0)
138 int type = bytestream2_get_byte(&gb);
139 int size = bytestream2_get_byte(&gb);
142 score += 5 * (
size == 0);
175 int stream_index = -1;
226 if (stream_index ==
s->nb_streams) {
285 int stream_index,
bits, pkt_size, endframe;
297 if (stream_index < 0)
299 if (stream_index >=
s->nb_streams)
302 endframe =
pop(br, pb);
317 pkt_size =
pop_int(br, pb, 13) + 1;
318 if (pkt_size > m->
size)
320 packet =
s->streams[stream_index]->priv_data;
329 if (endframe &&
packet->size > 0) {
346 if (m->
flags % 2 == 0) {
368 for (
int i = 0;
i <
s->nb_streams;
i++) {
378 .p.extensions =
"moflex",
static int pop_length(BitReader *br, AVIOContext *pb)
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
enum AVMediaType codec_type
General type of the encoded data.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static int moflex_probe(const AVProbeData *p)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int buf_size
Size of buf except extra allocated bytes.
int nb_channels
Number of channels in this layout.
enum AVMediaType codec_type
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static int pop(BitReader *br, AVIOContext *pb)
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 type
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Rational number (pair of numerator and denominator).
uint64_t avio_rb64(AVIOContext *s)
This structure contains the data a format has to probe a file.
AVChannelLayout ch_layout
Audio only.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
int sample_rate
Audio only.
static int moflex_read_close(AVFormatContext *s)
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
unsigned int avio_rb24(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static AVRational av_make_q(int num, int den)
Create an AVRational.
const FFInputFormat ff_moflex_demuxer
static int pop_int(BitReader *br, AVIOContext *pb, int n)
static int moflex_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
int avio_r8(AVIOContext *s)
int flags
A combination of AV_PKT_FLAG values.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
static int moflex_read_sync(AVFormatContext *s)
#define i(width, name, range_min, range_max)
static int read_var_byte(AVFormatContext *s, unsigned *out)
enum AVPacketSideDataType packet
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 default value
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
unsigned int avio_rb16(AVIOContext *s)
static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(const AVProbeData *p)
static int moflex_read_header(AVFormatContext *s)
@ AV_CODEC_ID_ADPCM_IMA_MOFLEX
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
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.