Go to the documentation of this file.
52 const uint8_t *buf,
int len);
56 const uint8_t *buf,
int len)
58 int interleave_size, interleave_index;
65 interleave_size = buf[0] >> 3 & 7;
66 interleave_index = buf[0] & 7;
68 if (interleave_size > 5) {
73 if (interleave_index > interleave_size) {
75 interleave_index, interleave_size);
78 if (interleave_size !=
data->interleave_size) {
81 data->interleave_size = interleave_size;
82 data->interleave_index = 0;
83 for (
i = 0;
i < 6;
i++)
84 data->group[
i].size = 0;
87 if (interleave_index < data->interleave_index) {
89 if (
data->group_finished) {
92 data->interleave_index = 0;
96 for (;
data->interleave_index <= interleave_size;
97 data->interleave_index++)
98 data->group[
data->interleave_index].size = 0;
102 memcpy(
data->next_data, buf,
len);
104 data->next_timestamp = *timestamp;
107 data->interleave_index = 0;
111 if (interleave_index >
data->interleave_index) {
113 for (;
data->interleave_index < interleave_index;
114 data->interleave_index++)
115 data->group[
data->interleave_index].size = 0;
117 data->interleave_index = interleave_index;
133 ip = &
data->group[
data->interleave_index];
140 data->group_finished = ip->
size == 0;
142 if (interleave_index == interleave_size) {
143 data->interleave_index = 0;
144 return !
data->group_finished;
146 data->interleave_index++;
153 const uint8_t *buf,
int len)
158 if (
data->group_finished &&
data->interleave_index == 0) {
159 *timestamp =
data->next_timestamp;
189 if (
data->interleave_index ==
data->interleave_size) {
190 data->interleave_index = 0;
191 if (!
data->group_finished)
194 return data->next_size > 0;
196 data->interleave_index++;
203 const uint8_t *buf,
int len, uint16_t seq,
217 .static_payload_id = 12,
InterleavePacket group[6]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
static int return_stored_frame(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int qcelp_parse_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
uint8_t next_data[1+35 *10]
static const uint8_t frame_sizes[]
static int store_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len)
#define i(width, name, range_min, range_max)
const RTPDynamicProtocolHandler ff_qcelp_dynamic_handler
int index
stream index in AVFormatContext
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/JPEG specific private data.