44 uint32_t *timestamp,
const uint8_t *buf,
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", 1);
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) {
188 if (has_marker_bit) {
243 #define RTP_QT_HANDLER(m, n, s, t) \
244 RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
247 .codec_id = CODEC_ID_NONE, \
248 .alloc = qt_rtp_new, \
249 .free = qt_rtp_free, \
250 .parse_packet = qt_rtp_parse_packet, \
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
RTP/H264 specific private data.
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
void * av_realloc(void *ptr, size_t size)
Allocate or reallocate a block of memory.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
unsigned int avio_rb16(AVIOContext *s)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
unsigned int avio_rb32(AVIOContext *s)
static int get_bits_count(const GetBitContext *s)
void av_free_packet(AVPacket *pkt)
Free a packet.
bitstream reader API header.
void av_destruct_packet(AVPacket *pkt)
Default packet destructor.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void(* destruct)(struct AVPacket *)
static PayloadContext * qt_rtp_new(void)
uint32_t timestamp
timestamp of next-to-be-returned packet
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.
unsigned int avio_rl32(AVIOContext *s)
int flags
A combination of AV_PKT_FLAG values.
AVCodecContext * codec
codec context
unsigned int nb_streams
A list of all streams in the file.
static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags)
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#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)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
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_log_missing_feature(void *avc, const char *feature, int want_sample)
Log a generic warning message about a missing feature.
#define MKTAG(a, b, c, d)