| Index: talk/session/media/channel_unittest.cc
|
| diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc
|
| index 9020cafcec23fd46a611c07b15f1e23609ec53c0..add89b3fa9c6362dea2cb4aac7dd246db1833578 100644
|
| --- a/talk/session/media/channel_unittest.cc
|
| +++ b/talk/session/media/channel_unittest.cc
|
| @@ -67,9 +67,9 @@ static const cricket::AudioCodec kIsacCodec(103, "ISAC", 40000, 16000, 1, 0);
|
| static const cricket::VideoCodec kH264Codec(97, "H264", 640, 400, 30, 0);
|
| static const cricket::VideoCodec kH264SvcCodec(99, "H264-SVC", 320, 200, 15, 0);
|
| static const cricket::DataCodec kGoogleDataCodec(101, "google-data", 0);
|
| -static const uint32 kSsrc1 = 0x1111;
|
| -static const uint32 kSsrc2 = 0x2222;
|
| -static const uint32 kSsrc3 = 0x3333;
|
| +static const uint32_t kSsrc1 = 0x1111;
|
| +static const uint32_t kSsrc2 = 0x2222;
|
| +static const uint32_t kSsrc3 = 0x3333;
|
| static const int kAudioPts[] = {0, 8};
|
| static const int kVideoPts[] = {97, 99};
|
|
|
| @@ -130,8 +130,10 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| enum Flags { RTCP = 0x1, RTCP_MUX = 0x2, SECURE = 0x4, SSRC_MUX = 0x8,
|
| DTLS = 0x10 };
|
|
|
| - ChannelTest(const uint8* rtp_data, int rtp_len,
|
| - const uint8* rtcp_data, int rtcp_len)
|
| + ChannelTest(const uint8_t* rtp_data,
|
| + int rtp_len,
|
| + const uint8_t* rtcp_data,
|
| + int rtcp_len)
|
| : session1_(true),
|
| session2_(false),
|
| media_channel1_(NULL),
|
| @@ -141,8 +143,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| media_info_callbacks1_(),
|
| media_info_callbacks2_(),
|
| ssrc_(0),
|
| - error_(T::MediaChannel::ERROR_NONE) {
|
| - }
|
| + error_(T::MediaChannel::ERROR_NONE) {}
|
|
|
| void CreateChannels(int flags1, int flags2) {
|
| CreateChannels(new typename T::MediaChannel(NULL, typename T::Options()),
|
| @@ -310,22 +311,22 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| static_cast<int>(rtcp_packet_.size()));
|
| }
|
| // Methods to send custom data.
|
| - bool SendCustomRtp1(uint32 ssrc, int sequence_number, int pl_type = -1) {
|
| + bool SendCustomRtp1(uint32_t ssrc, int sequence_number, int pl_type = -1) {
|
| std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
|
| return media_channel1_->SendRtp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool SendCustomRtp2(uint32 ssrc, int sequence_number, int pl_type = -1) {
|
| + bool SendCustomRtp2(uint32_t ssrc, int sequence_number, int pl_type = -1) {
|
| std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
|
| return media_channel2_->SendRtp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool SendCustomRtcp1(uint32 ssrc) {
|
| + bool SendCustomRtcp1(uint32_t ssrc) {
|
| std::string data(CreateRtcpData(ssrc));
|
| return media_channel1_->SendRtcp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool SendCustomRtcp2(uint32 ssrc) {
|
| + bool SendCustomRtcp2(uint32_t ssrc) {
|
| std::string data(CreateRtcpData(ssrc));
|
| return media_channel2_->SendRtcp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| @@ -347,27 +348,27 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| static_cast<int>(rtcp_packet_.size()));
|
| }
|
| // Methods to check custom data.
|
| - bool CheckCustomRtp1(uint32 ssrc, int sequence_number, int pl_type = -1 ) {
|
| + bool CheckCustomRtp1(uint32_t ssrc, int sequence_number, int pl_type = -1) {
|
| std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
|
| return media_channel1_->CheckRtp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool CheckCustomRtp2(uint32 ssrc, int sequence_number, int pl_type = -1) {
|
| + bool CheckCustomRtp2(uint32_t ssrc, int sequence_number, int pl_type = -1) {
|
| std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
|
| return media_channel2_->CheckRtp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool CheckCustomRtcp1(uint32 ssrc) {
|
| + bool CheckCustomRtcp1(uint32_t ssrc) {
|
| std::string data(CreateRtcpData(ssrc));
|
| return media_channel1_->CheckRtcp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - bool CheckCustomRtcp2(uint32 ssrc) {
|
| + bool CheckCustomRtcp2(uint32_t ssrc) {
|
| std::string data(CreateRtcpData(ssrc));
|
| return media_channel2_->CheckRtcp(data.c_str(),
|
| static_cast<int>(data.size()));
|
| }
|
| - std::string CreateRtpData(uint32 ssrc, int sequence_number, int pl_type) {
|
| + std::string CreateRtpData(uint32_t ssrc, int sequence_number, int pl_type) {
|
| std::string data(rtp_packet_);
|
| // Set SSRC in the rtp packet copy.
|
| rtc::SetBE32(const_cast<char*>(data.c_str()) + 8, ssrc);
|
| @@ -378,7 +379,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| }
|
| return data;
|
| }
|
| - std::string CreateRtcpData(uint32 ssrc) {
|
| + std::string CreateRtcpData(uint32_t ssrc) {
|
| std::string data(rtcp_packet_);
|
| // Set SSRC in the rtcp packet copy.
|
| rtc::SetBE32(const_cast<char*>(data.c_str()) + 4, ssrc);
|
| @@ -411,7 +412,8 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
|
|
| // Creates a cricket::SessionDescription with one MediaContent and one stream.
|
| // kPcmuCodec is used as audio codec and kH264Codec is used as video codec.
|
| - cricket::SessionDescription* CreateSessionDescriptionWithStream(uint32 ssrc) {
|
| + cricket::SessionDescription* CreateSessionDescriptionWithStream(
|
| + uint32_t ssrc) {
|
| typename T::Content content;
|
| cricket::SessionDescription* sdesc = new cricket::SessionDescription();
|
| CreateContent(SECURE, kPcmuCodec, kH264Codec, &content);
|
| @@ -468,14 +470,15 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| }
|
|
|
| void OnMediaChannelError(typename T::Channel* channel,
|
| - uint32 ssrc,
|
| + uint32_t ssrc,
|
| typename T::MediaChannel::Error error) {
|
| ssrc_ = ssrc;
|
| error_ = error;
|
| }
|
|
|
| - void AddLegacyStreamInContent(uint32 ssrc, int flags,
|
| - typename T::Content* content) {
|
| + void AddLegacyStreamInContent(uint32_t ssrc,
|
| + int flags,
|
| + typename T::Content* content) {
|
| // Base implementation.
|
| }
|
|
|
| @@ -1386,7 +1389,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| int pl_type2 = pl_types[1];
|
| int flags = SSRC_MUX | RTCP;
|
| if (secure) flags |= SECURE;
|
| - uint32 expected_channels = 2U;
|
| + uint32_t expected_channels = 2U;
|
| if (rtcp_mux) {
|
| flags |= RTCP_MUX;
|
| expected_channels = 1U;
|
| @@ -1719,7 +1722,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
| int media_info_callbacks1_;
|
| int media_info_callbacks2_;
|
|
|
| - uint32 ssrc_;
|
| + uint32_t ssrc_;
|
| typename T::MediaChannel::Error error_;
|
| };
|
|
|
| @@ -1753,9 +1756,11 @@ bool ChannelTest<VoiceTraits>::CodecMatches(const cricket::AudioCodec& c1,
|
| c1.bitrate == c2.bitrate && c1.channels == c2.channels;
|
| }
|
|
|
| -template<>
|
| +template <>
|
| void ChannelTest<VoiceTraits>::AddLegacyStreamInContent(
|
| - uint32 ssrc, int flags, cricket::AudioContentDescription* audio) {
|
| + uint32_t ssrc,
|
| + int flags,
|
| + cricket::AudioContentDescription* audio) {
|
| audio->AddLegacyStream(ssrc);
|
| }
|
|
|
| @@ -1817,9 +1822,11 @@ bool ChannelTest<VideoTraits>::CodecMatches(const cricket::VideoCodec& c1,
|
| c1.framerate == c2.framerate;
|
| }
|
|
|
| -template<>
|
| +template <>
|
| void ChannelTest<VideoTraits>::AddLegacyStreamInContent(
|
| - uint32 ssrc, int flags, cricket::VideoContentDescription* video) {
|
| + uint32_t ssrc,
|
| + int flags,
|
| + cricket::VideoContentDescription* video) {
|
| video->AddLegacyStream(ssrc);
|
| }
|
|
|
| @@ -2588,9 +2595,11 @@ bool ChannelTest<DataTraits>::CodecMatches(const cricket::DataCodec& c1,
|
| return c1.name == c2.name;
|
| }
|
|
|
| -template<>
|
| +template <>
|
| void ChannelTest<DataTraits>::AddLegacyStreamInContent(
|
| - uint32 ssrc, int flags, cricket::DataContentDescription* data) {
|
| + uint32_t ssrc,
|
| + int flags,
|
| + cricket::DataContentDescription* data) {
|
| data->AddLegacyStream(ssrc);
|
| }
|
|
|
|
|