28 #define RTP_HEVC_HEADERS_SIZE 3
48 int nal_type = (buf[0] >> 1) & 0x3F;
51 if (len <= rtp_ctx->max_payload_size) {
52 int buffered_size = rtp_ctx->
buf_ptr - rtp_ctx->
buf;
61 if (buffered_size + 4 + len <= rtp_ctx->max_payload_size) {
62 if (buffered_size == 0) {
68 memcpy(rtp_ctx->
buf_ptr, buf, len);
91 rtp_ctx->
buf[0] = 49 << 1;
106 rtp_ctx->
buf[2] = nal_type;
108 rtp_ctx->
buf[2] |= 1 << 7;
114 while (len > rtp_payload_size) {
119 buf += rtp_payload_size;
120 len -= rtp_payload_size;
123 rtp_ctx->
buf[2] &= ~(1 << 7);
127 rtp_ctx->
buf[2] |= 1 << 6;
151 while (buf_ptr < buf_end) {
155 next_NAL_unit = buf_end;
159 while (!*(buf_ptr++))
164 nal_send(ctx, buf_ptr, next_NAL_unit - buf_ptr, next_NAL_unit == buf_end);
167 buf_ptr = next_NAL_unit;