aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-21 19:28:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-22 02:44:38 +0100
commite9eb8d0bcecd656292856698f603a841a82cc9c6 (patch)
tree4b601393c2f41791e8db8ea2fe4ad2a1dbae3937 /libavformat/rtpenc.c
parente48fe14a54d8360336dbb22f3f787815b57dda47 (diff)
downloadffmpeg-e9eb8d0bcecd656292856698f603a841a82cc9c6.tar.gz
avio: avio: avio_ prefixes for put_* functions
In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 77eb5504d3b3e1047900382350e0bc5e0bfb16b5)
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 22e68bac97..b32a9a4041 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -197,15 +197,15 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
s->last_rtcp_ntp_time = ntp_time;
rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000},
s1->streams[0]->time_base) + s->base_timestamp;
- put_byte(s1->pb, (RTP_VERSION << 6));
- put_byte(s1->pb, RTCP_SR);
- put_be16(s1->pb, 6); /* length in words - 1 */
- put_be32(s1->pb, s->ssrc);
- put_be32(s1->pb, ntp_time / 1000000);
- put_be32(s1->pb, ((ntp_time % 1000000) << 32) / 1000000);
- put_be32(s1->pb, rtp_ts);
- put_be32(s1->pb, s->packet_count);
- put_be32(s1->pb, s->octet_count);
+ avio_w8(s1->pb, (RTP_VERSION << 6));
+ avio_w8(s1->pb, RTCP_SR);
+ avio_wb16(s1->pb, 6); /* length in words - 1 */
+ avio_wb32(s1->pb, s->ssrc);
+ avio_wb32(s1->pb, ntp_time / 1000000);
+ avio_wb32(s1->pb, ((ntp_time % 1000000) << 32) / 1000000);
+ avio_wb32(s1->pb, rtp_ts);
+ avio_wb32(s1->pb, s->packet_count);
+ avio_wb32(s1->pb, s->octet_count);
put_flush_packet(s1->pb);
}
@@ -218,13 +218,13 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
av_dlog(s1, "rtp_send_data size=%d\n", len);
/* build the RTP header */
- put_byte(s1->pb, (RTP_VERSION << 6));
- put_byte(s1->pb, (s->payload_type & 0x7f) | ((m & 0x01) << 7));
- put_be16(s1->pb, s->seq);
- put_be32(s1->pb, s->timestamp);
- put_be32(s1->pb, s->ssrc);
+ avio_w8(s1->pb, (RTP_VERSION << 6));
+ avio_w8(s1->pb, (s->payload_type & 0x7f) | ((m & 0x01) << 7));
+ avio_wb16(s1->pb, s->seq);
+ avio_wb32(s1->pb, s->timestamp);
+ avio_wb32(s1->pb, s->ssrc);
- put_buffer(s1->pb, buf1, len);
+ avio_write(s1->pb, buf1, len);
put_flush_packet(s1->pb);
s->seq++;