34 int max_header_toc_size = 1 +
s->max_frames_per_packet;
39 len =
s->buf_ptr -
s->buf;
41 (
s->num_frames ==
s->max_frames_per_packet ||
42 len +
size - 1 >
s->max_payload_size ||
45 int header_size =
s->num_frames + 1;
46 p =
s->buf + max_header_toc_size - header_size;
48 memmove(p,
s->buf, header_size);
57 s->buf_ptr =
s->buf + max_header_toc_size;
58 s->timestamp =
s->cur_timestamp;
61 s->buf[1 +
s->num_frames - 1] |= 0x80;
65 s->buf[1 +
s->num_frames++] = buff[0] & 0x7C;
68 memcpy(
s->buf_ptr, buff,
size);
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
Compare two timestamps each in its own time base.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size)
Packetize AMR frames into RTP packets according to RFC 3267, in octet-aligned mode.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.