Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: talk/session/media/mediasession_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/session/media/mediasession.cc ('k') | talk/session/media/planarfunctions_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 static const RtpHeaderExtension kVideoRtpExtension3[] = { 170 static const RtpHeaderExtension kVideoRtpExtension3[] = {
171 RtpHeaderExtension("http://google.com/testing/video_something", 4), 171 RtpHeaderExtension("http://google.com/testing/video_something", 4),
172 RtpHeaderExtension("http://google.com/testing/both_audio_and_video", 5), 172 RtpHeaderExtension("http://google.com/testing/both_audio_and_video", 5),
173 }; 173 };
174 174
175 static const RtpHeaderExtension kVideoRtpExtensionAnswer[] = { 175 static const RtpHeaderExtension kVideoRtpExtensionAnswer[] = {
176 RtpHeaderExtension("urn:ietf:params:rtp-hdrext:toffset", 14), 176 RtpHeaderExtension("urn:ietf:params:rtp-hdrext:toffset", 14),
177 }; 177 };
178 178
179 static const uint32 kSimulcastParamsSsrc[] = {10, 11, 20, 21, 30, 31}; 179 static const uint32_t kSimulcastParamsSsrc[] = {10, 11, 20, 21, 30, 31};
180 static const uint32 kSimSsrc[] = {10, 20, 30}; 180 static const uint32_t kSimSsrc[] = {10, 20, 30};
181 static const uint32 kFec1Ssrc[] = {10, 11}; 181 static const uint32_t kFec1Ssrc[] = {10, 11};
182 static const uint32 kFec2Ssrc[] = {20, 21}; 182 static const uint32_t kFec2Ssrc[] = {20, 21};
183 static const uint32 kFec3Ssrc[] = {30, 31}; 183 static const uint32_t kFec3Ssrc[] = {30, 31};
184 184
185 static const char kMediaStream1[] = "stream_1"; 185 static const char kMediaStream1[] = "stream_1";
186 static const char kMediaStream2[] = "stream_2"; 186 static const char kMediaStream2[] = "stream_2";
187 static const char kVideoTrack1[] = "video_1"; 187 static const char kVideoTrack1[] = "video_1";
188 static const char kVideoTrack2[] = "video_2"; 188 static const char kVideoTrack2[] = "video_2";
189 static const char kAudioTrack1[] = "audio_1"; 189 static const char kAudioTrack1[] = "audio_1";
190 static const char kAudioTrack2[] = "audio_2"; 190 static const char kAudioTrack2[] = "audio_2";
191 static const char kAudioTrack3[] = "audio_3"; 191 static const char kAudioTrack3[] = "audio_3";
192 static const char kDataTrack1[] = "data_1"; 192 static const char kDataTrack1[] = "data_1";
193 static const char kDataTrack2[] = "data_2"; 193 static const char kDataTrack2[] = "data_2";
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 EXPECT_TRUE(desc->multistream()); 1803 EXPECT_TRUE(desc->multistream());
1804 const StreamParamsVec& streams = desc->streams(); 1804 const StreamParamsVec& streams = desc->streams();
1805 // Single stream. 1805 // Single stream.
1806 ASSERT_EQ(1u, streams.size()); 1806 ASSERT_EQ(1u, streams.size());
1807 // Stream should have 6 ssrcs: 3 for video, 3 for RTX. 1807 // Stream should have 6 ssrcs: 3 for video, 3 for RTX.
1808 EXPECT_EQ(6u, streams[0].ssrcs.size()); 1808 EXPECT_EQ(6u, streams[0].ssrcs.size());
1809 // And should have a SIM group for the simulcast. 1809 // And should have a SIM group for the simulcast.
1810 EXPECT_TRUE(streams[0].has_ssrc_group("SIM")); 1810 EXPECT_TRUE(streams[0].has_ssrc_group("SIM"));
1811 // And a FID group for RTX. 1811 // And a FID group for RTX.
1812 EXPECT_TRUE(streams[0].has_ssrc_group("FID")); 1812 EXPECT_TRUE(streams[0].has_ssrc_group("FID"));
1813 std::vector<uint32> primary_ssrcs; 1813 std::vector<uint32_t> primary_ssrcs;
1814 streams[0].GetPrimarySsrcs(&primary_ssrcs); 1814 streams[0].GetPrimarySsrcs(&primary_ssrcs);
1815 EXPECT_EQ(3u, primary_ssrcs.size()); 1815 EXPECT_EQ(3u, primary_ssrcs.size());
1816 std::vector<uint32> fid_ssrcs; 1816 std::vector<uint32_t> fid_ssrcs;
1817 streams[0].GetFidSsrcs(primary_ssrcs, &fid_ssrcs); 1817 streams[0].GetFidSsrcs(primary_ssrcs, &fid_ssrcs);
1818 EXPECT_EQ(3u, fid_ssrcs.size()); 1818 EXPECT_EQ(3u, fid_ssrcs.size());
1819 } 1819 }
1820 1820
1821 // Create an updated offer after creating an answer to the original offer and 1821 // Create an updated offer after creating an answer to the original offer and
1822 // verify that the RTP header extensions that were part of the original answer 1822 // verify that the RTP header extensions that were part of the original answer
1823 // are not changed in the updated offer. 1823 // are not changed in the updated offer.
1824 TEST_F(MediaSessionDescriptionFactoryTest, 1824 TEST_F(MediaSessionDescriptionFactoryTest,
1825 RespondentCreatesOfferAfterCreatingAnswerWithRtpExtensions) { 1825 RespondentCreatesOfferAfterCreatingAnswerWithRtpExtensions) {
1826 MediaSessionOptions opts; 1826 MediaSessionOptions opts;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 offer.reset(f1_.CreateOffer(options, NULL)); 2306 offer.reset(f1_.CreateOffer(options, NULL));
2307 ASSERT_TRUE(offer.get() != NULL); 2307 ASSERT_TRUE(offer.get() != NULL);
2308 audio_content = offer->GetContentByName("audio"); 2308 audio_content = offer->GetContentByName("audio");
2309 EXPECT_TRUE(VerifyNoCNCodecs(audio_content)); 2309 EXPECT_TRUE(VerifyNoCNCodecs(audio_content));
2310 rtc::scoped_ptr<SessionDescription> answer( 2310 rtc::scoped_ptr<SessionDescription> answer(
2311 f1_.CreateAnswer(offer.get(), options, NULL)); 2311 f1_.CreateAnswer(offer.get(), options, NULL));
2312 ASSERT_TRUE(answer.get() != NULL); 2312 ASSERT_TRUE(answer.get() != NULL);
2313 audio_content = answer->GetContentByName("audio"); 2313 audio_content = answer->GetContentByName("audio");
2314 EXPECT_TRUE(VerifyNoCNCodecs(audio_content)); 2314 EXPECT_TRUE(VerifyNoCNCodecs(audio_content));
2315 } 2315 }
OLDNEW
« no previous file with comments | « talk/session/media/mediasession.cc ('k') | talk/session/media/planarfunctions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698