49 int packing_scheme, has_payload_desc, has_packet_info, alen,
81 if ((packing_scheme =
get_bits(&gb, 2)) == 0)
88 if (has_payload_desc) {
89 int data_len, pos, is_start, is_finish;
99 if (!is_start || !is_finish) {
101 "split over several packets");
110 tag !=
MKTAG(
'v',
'i',
'd',
'e')) ||
112 tag !=
MKTAG(
's',
'o',
'u',
'n')))
116 if (pos + data_len > len)
119 while (
avio_tell(&pb) + 4 < pos + data_len) {
122 if (
avio_tell(&pb) + tlv_len > pos + data_len)
125 #define MKTAG16(a,b) MKTAG(a,b,0,0)
163 if (has_packet_info) {
172 switch (packing_scheme) {
192 if (has_marker_bit) {
243 #define RTP_QT_HANDLER(m, n, s, t) \
244 RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
247 .codec_id = AV_CODEC_ID_NONE, \
248 .priv_data_size = sizeof(PayloadContext), \
249 .close = qt_rtp_close, \
250 .parse_packet = qt_rtp_parse_packet, \
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
RTP/JPEG specific private data.
static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
int index
stream index in AVFormatContext
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.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
unsigned int avio_rb16(AVIOContext *s)
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
unsigned int avio_rb32(AVIOContext *s)
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
static int get_bits_count(const GetBitContext *s)
bitstream reader API header.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
uint32_t timestamp
current frame timestamp
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
unsigned int avio_rl32(AVIOContext *s)
enum AVMediaType codec_type
General type of the encoded data.
int flags
A combination of AV_PKT_FLAG values.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
static void qt_rtp_close(PayloadContext *qt)
#define RTP_QT_HANDLER(m, n, s, t)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static unsigned int get_bits1(GetBitContext *s)
static int FUNC() aud(CodedBitstreamContext *ctx, RWContext *rw, H264RawAUD *current)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
#define flags(name, subs,...)
unsigned int avio_rl16(AVIOContext *s)
unsigned int bytes_per_frame
int ffio_init_context(AVIOContext *s, unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence))
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define MKTAG(a, b, c, d)
This structure stores compressed data.