* UINTX -> uintx_t INTX -> intx_t
Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -90,23 +90,23 @@ enum RTPPayloadType {
|
||||
|
||||
typedef struct RTPContext {
|
||||
int payload_type;
|
||||
UINT32 ssrc;
|
||||
UINT16 seq;
|
||||
UINT32 timestamp;
|
||||
UINT32 base_timestamp;
|
||||
UINT32 cur_timestamp;
|
||||
uint32_t ssrc;
|
||||
uint16_t seq;
|
||||
uint32_t timestamp;
|
||||
uint32_t base_timestamp;
|
||||
uint32_t cur_timestamp;
|
||||
int max_payload_size;
|
||||
/* rtcp sender statistics receive */
|
||||
INT64 last_rtcp_ntp_time;
|
||||
UINT32 last_rtcp_timestamp;
|
||||
int64_t last_rtcp_ntp_time;
|
||||
uint32_t last_rtcp_timestamp;
|
||||
/* rtcp sender statistics */
|
||||
unsigned int packet_count;
|
||||
unsigned int octet_count;
|
||||
unsigned int last_octet_count;
|
||||
int first_packet;
|
||||
/* buffer for output */
|
||||
UINT8 buf[RTP_MAX_PACKET_LENGTH];
|
||||
UINT8 *buf_ptr;
|
||||
uint8_t buf[RTP_MAX_PACKET_LENGTH];
|
||||
uint8_t *buf_ptr;
|
||||
} RTPContext;
|
||||
|
||||
int rtp_get_codec_info(AVCodecContext *codec, int payload_type)
|
||||
@@ -184,14 +184,14 @@ int rtp_get_payload_type(AVCodecContext *codec)
|
||||
return payload_type;
|
||||
}
|
||||
|
||||
static inline UINT32 decode_be32(const UINT8 *p)
|
||||
static inline uint32_t decode_be32(const uint8_t *p)
|
||||
{
|
||||
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
|
||||
}
|
||||
|
||||
static inline UINT32 decode_be64(const UINT8 *p)
|
||||
static inline uint32_t decode_be64(const uint8_t *p)
|
||||
{
|
||||
return ((UINT64)decode_be32(p) << 32) | decode_be32(p + 4);
|
||||
return ((uint64_t)decode_be32(p) << 32) | decode_be32(p + 4);
|
||||
}
|
||||
|
||||
static int rtcp_parse_packet(AVFormatContext *s1, const unsigned char *buf, int len)
|
||||
@@ -221,7 +221,7 @@ int rtp_parse_packet(AVFormatContext *s1, AVPacket *pkt,
|
||||
unsigned int ssrc, h;
|
||||
int payload_type, seq, delta_timestamp;
|
||||
AVStream *st;
|
||||
UINT32 timestamp;
|
||||
uint32_t timestamp;
|
||||
|
||||
if (len < 12)
|
||||
return -1;
|
||||
@@ -390,7 +390,7 @@ static int rtp_write_header(AVFormatContext *s1)
|
||||
}
|
||||
|
||||
/* send an rtcp sender report packet */
|
||||
static void rtcp_send_sr(AVFormatContext *s1, INT64 ntp_time)
|
||||
static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
#if defined(DEBUG)
|
||||
@@ -409,7 +409,7 @@ static void rtcp_send_sr(AVFormatContext *s1, INT64 ntp_time)
|
||||
|
||||
/* send an rtp packet. sequence number is incremented, but the caller
|
||||
must update the timestamp itself */
|
||||
static void rtp_send_data(AVFormatContext *s1, UINT8 *buf1, int len)
|
||||
static void rtp_send_data(AVFormatContext *s1, uint8_t *buf1, int len)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
|
||||
@@ -435,7 +435,7 @@ static void rtp_send_data(AVFormatContext *s1, UINT8 *buf1, int len)
|
||||
/* send an integer number of samples and compute time stamp and fill
|
||||
the rtp send buffer before sending. */
|
||||
static void rtp_send_samples(AVFormatContext *s1,
|
||||
UINT8 *buf1, int size, int sample_size)
|
||||
uint8_t *buf1, int size, int sample_size)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
int len, max_packet_size, n;
|
||||
@@ -468,7 +468,7 @@ static void rtp_send_samples(AVFormatContext *s1,
|
||||
/* NOTE: we suppose that exactly one frame is given as argument here */
|
||||
/* XXX: test it */
|
||||
static void rtp_send_mpegaudio(AVFormatContext *s1,
|
||||
UINT8 *buf1, int size)
|
||||
uint8_t *buf1, int size)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
AVStream *st = s1->streams[0];
|
||||
@@ -524,12 +524,12 @@ static void rtp_send_mpegaudio(AVFormatContext *s1,
|
||||
/* NOTE: a single frame must be passed with sequence header if
|
||||
needed. XXX: use slices. */
|
||||
static void rtp_send_mpegvideo(AVFormatContext *s1,
|
||||
UINT8 *buf1, int size)
|
||||
uint8_t *buf1, int size)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
AVStream *st = s1->streams[0];
|
||||
int len, h, max_packet_size;
|
||||
UINT8 *q;
|
||||
uint8_t *q;
|
||||
|
||||
max_packet_size = s->max_payload_size;
|
||||
|
||||
@@ -572,7 +572,7 @@ static void rtp_send_mpegvideo(AVFormatContext *s1,
|
||||
}
|
||||
|
||||
static void rtp_send_raw(AVFormatContext *s1,
|
||||
UINT8 *buf1, int size)
|
||||
uint8_t *buf1, int size)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
AVStream *st = s1->streams[0];
|
||||
@@ -599,12 +599,12 @@ static void rtp_send_raw(AVFormatContext *s1,
|
||||
|
||||
/* write an RTP packet. 'buf1' must contain a single specific frame. */
|
||||
static int rtp_write_packet(AVFormatContext *s1, int stream_index,
|
||||
UINT8 *buf1, int size, int force_pts)
|
||||
uint8_t *buf1, int size, int force_pts)
|
||||
{
|
||||
RTPContext *s = s1->priv_data;
|
||||
AVStream *st = s1->streams[0];
|
||||
int rtcp_bytes;
|
||||
INT64 ntp_time;
|
||||
int64_t ntp_time;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("%d: write len=%d\n", stream_index, size);
|
||||
@@ -615,7 +615,7 @@ static int rtp_write_packet(AVFormatContext *s1, int stream_index,
|
||||
RTCP_TX_RATIO_DEN;
|
||||
if (s->first_packet || rtcp_bytes >= 28) {
|
||||
/* compute NTP time */
|
||||
ntp_time = force_pts; // ((INT64)force_pts << 28) / 5625
|
||||
ntp_time = force_pts; // ((int64_t)force_pts << 28) / 5625
|
||||
rtcp_send_sr(s1, ntp_time);
|
||||
s->last_octet_count = s->octet_count;
|
||||
s->first_packet = 0;
|
||||
|
Reference in New Issue
Block a user