49 int packing_scheme, has_payload_desc, has_packet_info, alen,
80 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) {
249 #define RTP_QT_HANDLER(m, n, s, t) \
250 RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
253 .codec_id = AV_CODEC_ID_NONE, \
254 .alloc = qt_rtp_new, \
255 .free = qt_rtp_free, \
256 .parse_packet = qt_rtp_parse_packet, \
#define AVERROR_PATCHWELCOME
void av_free_packet(AVPacket *pkt)
Free a packet.
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)
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory.
static int get_bits_count(const GetBitContext *s)
bitstream reader API header.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static PayloadContext * qt_rtp_new(void)
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
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static void qt_rtp_free(PayloadContext *qt)
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
int flags
A combination of AV_PKT_FLAG values.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
unsigned int nb_streams
A list of all streams in the file.
void * av_realloc(void *ptr, size_t size) 1(2)
Allocate or reallocate a block of memory.
#define RTP_QT_HANDLER(m, n, s, t)
enum AVMediaType codec_type
#define RTP_FLAG_KEY
RTP packet contains a keyframe.
static unsigned int get_bits1(GetBitContext *s)
#define MKTAG(a, b, c, d)
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)
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 AVERROR_INVALIDDATA
This structure stores compressed data.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...