21 #ifndef AVFORMAT_RTPENC_H
22 #define AVFORMAT_RTPENC_H
68 #define FF_RTP_FLAG_MP4A_LATM 1
69 #define FF_RTP_FLAG_RFC2190 2
70 #define FF_RTP_FLAG_SKIP_RTCP 4
71 #define FF_RTP_FLAG_H264_MODE0 8
72 #define FF_RTP_FLAG_SEND_BYE 16
74 #define FF_RTP_FLAG_OPTS(ctx, fieldname) \
75 { "rtpflags", "RTP muxer flags", offsetof(ctx, fieldname), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
76 { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
77 { "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
78 { "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
79 { "h264_mode0", "Use mode 0 for H264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
80 { "send_bye", "Send RTCP BYE packets when finishing", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SEND_BYE}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \
int64_t last_rtcp_ntp_time
unsigned int last_octet_count
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.
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)
int max_frames_per_packet
void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size)
Packetize H.263 frames into RTP packets according to RFC 4629.
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buff, int size)
void ff_rtp_send_latm(AVFormatContext *s1, const uint8_t *buff, int size)
void ff_rtp_send_vp8(AVFormatContext *s1, const uint8_t *buff, int size)
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 ff_rtp_send_h261(AVFormatContext *s1, const uint8_t *buf1, int size)
void ff_rtp_send_h264_hevc(AVFormatContext *s1, const uint8_t *buf1, int size)
void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
int64_t first_rtcp_ntp_time
Describe the class of an AVClass context structure.
unsigned int packet_count
void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf1, int size, const uint8_t *mb_info, int mb_info_size)
const uint8_t * ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start, const uint8_t *av_restrict end)