60 av_log(s1,
AV_LOG_DEBUG,
"Sending NAL %x of len %d M=%d\n", buf[0] & 0x1F, size, last);
64 int skip_aggregate = 0;
82 if (buffered_size + 2 + header_size +
size <= s->max_payload_size &&
84 if (buffered_size == 0) {
102 int flag_byte, header_size;
106 "NAL size %d > %d, try -slice-max-size %d\n", size,
125 uint8_t nal_type = (buf[0] >> 1) & 0x3F;
155 s->
buf[2] = nal_type;
172 s->
buf[flag_byte] &= ~(1 << 7);
174 s->
buf[flag_byte] |= 1 << 6;
175 memcpy(&s->
buf[header_size], buf, size);
const uint8_t * ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)
static void nal_send(AVFormatContext *s1, const uint8_t *buf, int size, int last)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int nal_length_size
Number of bytes used for H.264 NAL length, if the MP4 syntax is used (1, 2 or 4)
static av_cold int end(AVCodecContext *avctx)
AVStream ** streams
A list of all streams in the file.
static void flush_buffered(AVFormatContext *s1, int last)
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define FF_RTP_FLAG_H264_MODE0
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
void ff_rtp_send_h264_hevc(AVFormatContext *s1, const uint8_t *buf1, int size)
const uint8_t * ff_avc_mp4_find_startcode(const uint8_t *start, const uint8_t *end, int nal_length_size)
void * priv_data
Format private data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.