30 #define BRP_TAG MKTAG('B', 'R', 'P', 'P') 31 #define BRP_FILE_HEADER_SIZE 12 32 #define BRP_BLOCK_HEADER_SIZE 12 33 #define BRP_STREAM_HEADER_SIZE 20 34 #define BRP_MAX_STREAMS 32 35 #define BRP_BASF_LOOKAHEAD 10 36 #define BVID_HEADER_SIZE 16 37 #define MASK_HEADER_SIZE 12 38 #define BRP_MIN_BUFFER_SIZE FFMAX3(FFMAX3(BRP_FILE_HEADER_SIZE, \ 39 BRP_BLOCK_HEADER_SIZE, \ 40 BRP_STREAM_HEADER_SIZE), \ 44 #define BRP_CODEC_ID_BVID MKTAG('B', 'V', 'I', 'D') 45 #define BRP_CODEC_ID_BASF MKTAG('B', 'A', 'S', 'F') 46 #define BRP_CODEC_ID_MASK MKTAG('M', 'A', 'S', 'K') 109 void *buf,
size_t bufsz)
205 }
else if (ret > 0) {
225 if (bvid->
width >= 65536 || bvid->
height >= 65536 ||
304 if (i == BRP_BASF_LOOKAHEAD || blk.
stream_id == -1) {
344 if ((ret =
avio_seek(s->
pb, offset, SEEK_SET)) < 0)
399 else if (ret != blk.
size)
void ff_argo_asf_parse_chunk_header(ArgoASFChunkHeader *hdr, const uint8_t *buf)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define avpriv_request_sample(...)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
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.
static int read_extradata(AVFormatContext *s, const ArgoBRPStreamHeader *hdr, void *buf, size_t bufsz)
static int argo_brp_probe(const AVProbeData *p)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Opaque data information usually continuous.
#define BRP_FILE_HEADER_SIZE
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
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
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define BRP_CODEC_ID_BASF
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVStream ** streams
A list of all streams in the file.
static int argo_brp_read_packet(AVFormatContext *s, AVPacket *pkt)
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define ASF_MIN_BUFFER_SIZE
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define BRP_STREAM_HEADER_SIZE
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
simple assert() macros that are a bit more flexible than ISO C assert().
#define BRP_CODEC_ID_MASK
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
common internal API header
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
#define BRP_BASF_LOOKAHEAD
int ff_argo_asf_validate_file_header(AVFormatContext *s, const ArgoASFFileHeader *hdr)
#define BRP_BLOCK_HEADER_SIZE
Usually treated as AVMEDIA_TYPE_DATA.
void ff_argo_asf_parse_file_header(ArgoASFFileHeader *hdr, const uint8_t *buf)
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define ASF_CHUNK_HEADER_SIZE
AVIOContext * pb
I/O context.
#define BRP_CODEC_ID_BVID
This structure contains the data a format has to probe a file.
struct ArgoBRPDemuxContext::@242 basf
int bits_per_raw_sample
This is the number of valid bits in each output sample.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
AVInputFormat ff_argo_brp_demuxer
#define BRP_MIN_BUFFER_SIZE
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
int64_t nb_frames
number of frames in this stream if known or 0
ArgoBRPStreamHeader streams[BRP_MAX_STREAMS]
static int argo_brp_read_header(AVFormatContext *s)
void * priv_data
Format private data.
#define ASF_FILE_HEADER_SIZE
AVCodecParameters * codecpar
Codec parameters associated with this stream.
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
int ff_argo_asf_fill_stream(AVFormatContext *s, AVStream *st, const ArgoASFFileHeader *fhdr, const ArgoASFChunkHeader *ckhdr)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...