Go to the documentation of this file.
37 int max_pkt_size, xdt, frag;
40 max_pkt_size =
s->max_payload_size - 6;
72 frag =
size <= max_pkt_size ? 0 : 1;
75 uint8_t *end_ptr =
s->buf + 6 + max_pkt_size;
76 uint8_t *ptr =
s->buf_ptr + 2 +
size;
77 int remaining = end_ptr - ptr;
80 if (
s->num_frames > 0 &&
82 s->num_frames ==
s->max_frames_per_packet ||
91 if (0 ==
s->num_frames)
92 s->timestamp =
s->cur_timestamp;
99 if (
s->num_frames > 1)
103 memcpy(q, buff,
size);
108 }
else if (
s->num_frames) {
114 s->timestamp =
s->cur_timestamp;
118 int len = (!frag || frag == 3) ?
size : max_pkt_size;
122 *q++ = (frag << 6) | (xdt << 4);
126 memcpy(q, buff,
len);
133 frag =
size <= max_pkt_size ? 3 : 2;
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)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
Packetize Xiph frames into RTP according to RFC 5215 (Vorbis) and the Theora RFC draft.