00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVFORMAT_RTPENC_H
00022 #define AVFORMAT_RTPENC_H
00023
00024 #include "avformat.h"
00025 #include "rtp.h"
00026
00027 struct RTPMuxContext {
00028 AVFormatContext *ic;
00029 AVStream *st;
00030 int payload_type;
00031 uint32_t ssrc;
00032 uint16_t seq;
00033 uint32_t timestamp;
00034 uint32_t base_timestamp;
00035 uint32_t cur_timestamp;
00036 int max_payload_size;
00037 int num_frames;
00038
00039
00040 int64_t last_rtcp_ntp_time;
00041 int64_t first_rtcp_ntp_time;
00042
00043
00044 unsigned int packet_count;
00045 unsigned int octet_count;
00046 unsigned int last_octet_count;
00047 int first_packet;
00048
00049 uint8_t *buf;
00050 uint8_t *buf_ptr;
00051
00052 int max_frames_per_packet;
00053
00058 int nal_length_size;
00059 };
00060
00061 typedef struct RTPMuxContext RTPMuxContext;
00062
00063 void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
00064
00065 void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
00066 void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size);
00067 void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size);
00068 void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size);
00069 void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size);
00070 void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size);
00071 void ff_rtp_send_vp8(AVFormatContext *s1, const uint8_t *buff, int size);
00072
00073 #endif