Go to the documentation of this file.
37 int max_pkt_size, xdt, frag;
40 max_pkt_size =
s->max_payload_size - 6;
41 if (max_pkt_size <= 0) {
76 frag =
size <= max_pkt_size ? 0 : 1;
79 uint8_t *end_ptr =
s->buf + 6 + max_pkt_size;
80 uint8_t *ptr =
s->buf_ptr + 2 +
size;
81 int remaining = end_ptr - ptr;
84 if (
s->num_frames > 0 &&
86 s->num_frames ==
s->max_frames_per_packet ||
95 if (0 ==
s->num_frames)
96 s->timestamp =
s->cur_timestamp;
101 *q++ =
s->num_frames;
103 if (
s->num_frames > 1)
107 memcpy(q, buff,
size);
112 }
else if (
s->num_frames) {
118 s->timestamp =
s->cur_timestamp;
122 int len = (!frag || frag == 3) ?
size : max_pkt_size;
126 *q++ = (frag << 6) | (xdt << 4);
130 memcpy(q, buff,
len);
137 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.
AVStream ** streams
A list of all streams in the file.
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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.
void * priv_data
Format private data.