Move trackmediainfomap files from api/ to pc/.
It looks like this was left out of the original api/pc move CL since it
had been added recently.
BUG=webrtc:5883
TBR=ossu@webrtc.org
Review-Url: https://codereview.webrtc.org/2690793003
Cr-Commit-Position: refs/heads/master@{#16560}
diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn
index 2e3d5fe..f0752f9 100644
--- a/webrtc/api/BUILD.gn
+++ b/webrtc/api/BUILD.gn
@@ -68,8 +68,6 @@
"statstypes.cc",
"statstypes.h",
"streamcollection.h",
- "trackmediainfomap.cc",
- "trackmediainfomap.h",
"udptransportinterface.h",
"umametrics.h",
"videosourceproxy.h",
diff --git a/webrtc/pc/BUILD.gn b/webrtc/pc/BUILD.gn
index 5aa3ae4..54471c6 100644
--- a/webrtc/pc/BUILD.gn
+++ b/webrtc/pc/BUILD.gn
@@ -122,6 +122,8 @@
"statscollector.cc",
"statscollector.h",
"streamcollection.h",
+ "trackmediainfomap.cc",
+ "trackmediainfomap.h",
"videocapturertracksource.cc",
"videocapturertracksource.h",
"videotrack.cc",
@@ -281,6 +283,7 @@
"test/peerconnectiontestwrapper.h",
"test/rtcstatsobtainer.h",
"test/testsdpstrings.h",
+ "trackmediainfomap_unittest.cc",
"videocapturertracksource_unittest.cc",
"videotrack_unittest.cc",
"webrtcsdp_unittest.cc",
diff --git a/webrtc/pc/rtcstatscollector.h b/webrtc/pc/rtcstatscollector.h
index d5c86f6..48e66ba 100644
--- a/webrtc/pc/rtcstatscollector.h
+++ b/webrtc/pc/rtcstatscollector.h
@@ -19,7 +19,6 @@
#include "webrtc/api/stats/rtcstats_objects.h"
#include "webrtc/api/stats/rtcstatscollectorcallback.h"
#include "webrtc/api/stats/rtcstatsreport.h"
-#include "webrtc/api/trackmediainfomap.h"
#include "webrtc/base/asyncinvoker.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/refcount.h"
@@ -29,6 +28,7 @@
#include "webrtc/base/timeutils.h"
#include "webrtc/media/base/mediachannel.h"
#include "webrtc/pc/datachannel.h"
+#include "webrtc/pc/trackmediainfomap.h"
namespace cricket {
class Candidate;
diff --git a/webrtc/api/trackmediainfomap.cc b/webrtc/pc/trackmediainfomap.cc
similarity index 91%
rename from webrtc/api/trackmediainfomap.cc
rename to webrtc/pc/trackmediainfomap.cc
index 0a22842..d296c7f 100644
--- a/webrtc/api/trackmediainfomap.cc
+++ b/webrtc/pc/trackmediainfomap.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/api/trackmediainfomap.h"
+#include "webrtc/pc/trackmediainfomap.h"
#include <utility>
@@ -16,13 +16,13 @@
namespace {
-template<typename K, typename V>
+template <typename K, typename V>
V FindValueOrNull(const std::map<K, V>& map, const K& key) {
auto it = map.find(key);
return (it != map.end()) ? it->second : nullptr;
}
-template<typename K, typename V>
+template <typename K, typename V>
const V* FindAddressOrNull(const std::map<K, V>& map, const K& key) {
auto it = map.find(key);
return (it != map.end()) ? &it->second : nullptr;
@@ -46,10 +46,9 @@
if (!track) {
continue;
}
- RTC_DCHECK_EQ(track->kind(),
- media_type == cricket::MEDIA_TYPE_AUDIO
- ? MediaStreamTrackInterface::kAudioKind
- : MediaStreamTrackInterface::kVideoKind);
+ RTC_DCHECK_EQ(track->kind(), media_type == cricket::MEDIA_TYPE_AUDIO
+ ? MediaStreamTrackInterface::kAudioKind
+ : MediaStreamTrackInterface::kVideoKind);
// TODO(deadbeef): |ssrc| should be removed in favor of |GetParameters|.
uint32_t ssrc = rtp_sender->ssrc();
if (ssrc != 0) {
@@ -69,10 +68,9 @@
cricket::MediaType media_type = rtp_receiver->media_type();
MediaStreamTrackInterface* track = rtp_receiver->track();
RTC_DCHECK(track);
- RTC_DCHECK_EQ(track->kind(),
- media_type == cricket::MEDIA_TYPE_AUDIO
- ? MediaStreamTrackInterface::kAudioKind
- : MediaStreamTrackInterface::kVideoKind);
+ RTC_DCHECK_EQ(track->kind(), media_type == cricket::MEDIA_TYPE_AUDIO
+ ? MediaStreamTrackInterface::kAudioKind
+ : MediaStreamTrackInterface::kVideoKind);
RtpParameters params = rtp_receiver->GetParameters();
for (const RtpEncodingParameters& encoding : params.encodings) {
if (!encoding.ssrc) {
@@ -104,8 +102,8 @@
video_media_info_(std::move(video_media_info)) {
std::map<uint32_t, AudioTrackInterface*> audio_track_by_ssrc;
std::map<uint32_t, VideoTrackInterface*> video_track_by_ssrc;
- GetAudioAndVideoTrackBySsrc(
- rtp_senders, rtp_receivers, &audio_track_by_ssrc, &video_track_by_ssrc);
+ GetAudioAndVideoTrackBySsrc(rtp_senders, rtp_receivers, &audio_track_by_ssrc,
+ &video_track_by_ssrc);
if (voice_media_info_) {
for (auto& sender_info : voice_media_info_->senders) {
AudioTrackInterface* associated_track =
diff --git a/webrtc/api/trackmediainfomap.h b/webrtc/pc/trackmediainfomap.h
similarity index 89%
rename from webrtc/api/trackmediainfomap.h
rename to webrtc/pc/trackmediainfomap.h
index 7bf0977..ceab741 100644
--- a/webrtc/api/trackmediainfomap.h
+++ b/webrtc/pc/trackmediainfomap.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_API_TRACKMEDIAINFOMAP_H_
-#define WEBRTC_API_TRACKMEDIAINFOMAP_H_
+#ifndef WEBRTC_PC_TRACKMEDIAINFOMAP_H_
+#define WEBRTC_PC_TRACKMEDIAINFOMAP_H_
#include <map>
#include <memory>
@@ -84,15 +84,19 @@
// the inverse of the maps above. One info object always maps to only one
// track.
std::map<const cricket::VoiceSenderInfo*,
- rtc::scoped_refptr<AudioTrackInterface>> audio_track_by_sender_info_;
+ rtc::scoped_refptr<AudioTrackInterface>>
+ audio_track_by_sender_info_;
std::map<const cricket::VoiceReceiverInfo*,
- rtc::scoped_refptr<AudioTrackInterface>> audio_track_by_receiver_info_;
+ rtc::scoped_refptr<AudioTrackInterface>>
+ audio_track_by_receiver_info_;
std::map<const cricket::VideoSenderInfo*,
- rtc::scoped_refptr<VideoTrackInterface>> video_track_by_sender_info_;
+ rtc::scoped_refptr<VideoTrackInterface>>
+ video_track_by_sender_info_;
std::map<const cricket::VideoReceiverInfo*,
- rtc::scoped_refptr<VideoTrackInterface>> video_track_by_receiver_info_;
+ rtc::scoped_refptr<VideoTrackInterface>>
+ video_track_by_receiver_info_;
};
} // namespace webrtc
-#endif // WEBRTC_API_TRACKMEDIAINFOMAP_H_
+#endif // WEBRTC_PC_TRACKMEDIAINFOMAP_H_
diff --git a/webrtc/api/trackmediainfomap_unittest.cc b/webrtc/pc/trackmediainfomap_unittest.cc
similarity index 71%
rename from webrtc/api/trackmediainfomap_unittest.cc
rename to webrtc/pc/trackmediainfomap_unittest.cc
index a8ff6c2..2786214 100644
--- a/webrtc/api/trackmediainfomap_unittest.cc
+++ b/webrtc/pc/trackmediainfomap_unittest.cc
@@ -8,22 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/api/trackmediainfomap.h"
+#include "webrtc/pc/trackmediainfomap.h"
#include <initializer_list>
#include <memory>
#include <utility>
#include <vector>
-#include "webrtc/api/audiotrack.h"
#include "webrtc/api/rtpreceiverinterface.h"
#include "webrtc/api/rtpsenderinterface.h"
#include "webrtc/api/test/mock_rtpreceiver.h"
#include "webrtc/api/test/mock_rtpsender.h"
-#include "webrtc/api/test/fakevideotracksource.h"
-#include "webrtc/api/videotrack.h"
#include "webrtc/base/refcount.h"
#include "webrtc/media/base/mediachannel.h"
+#include "webrtc/pc/audiotrack.h"
+#include "webrtc/pc/test/fakevideotracksource.h"
+#include "webrtc/pc/videotrack.h"
#include "webrtc/test/gtest.h"
namespace webrtc {
@@ -42,7 +42,8 @@
}
rtc::scoped_refptr<MockRtpSender> CreateMockRtpSender(
- cricket::MediaType media_type, std::initializer_list<uint32_t> ssrcs,
+ cricket::MediaType media_type,
+ std::initializer_list<uint32_t> ssrcs,
rtc::scoped_refptr<MediaStreamTrackInterface> track) {
uint32_t first_ssrc;
if (ssrcs.size()) {
@@ -54,23 +55,24 @@
new rtc::RefCountedObject<MockRtpSender>());
EXPECT_CALL(*sender, track()).WillRepeatedly(testing::Return(track));
EXPECT_CALL(*sender, ssrc()).WillRepeatedly(testing::Return(first_ssrc));
- EXPECT_CALL(*sender, media_type()).WillRepeatedly(testing::Return(
- media_type));
- EXPECT_CALL(*sender, GetParameters()).WillRepeatedly(testing::Return(
- CreateRtpParametersWithSsrcs(ssrcs)));
+ EXPECT_CALL(*sender, media_type())
+ .WillRepeatedly(testing::Return(media_type));
+ EXPECT_CALL(*sender, GetParameters())
+ .WillRepeatedly(testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
return sender;
}
rtc::scoped_refptr<MockRtpReceiver> CreateMockRtpReceiver(
- cricket::MediaType media_type, std::initializer_list<uint32_t> ssrcs,
+ cricket::MediaType media_type,
+ std::initializer_list<uint32_t> ssrcs,
rtc::scoped_refptr<MediaStreamTrackInterface> track) {
rtc::scoped_refptr<MockRtpReceiver> receiver(
new rtc::RefCountedObject<MockRtpReceiver>());
EXPECT_CALL(*receiver, track()).WillRepeatedly(testing::Return(track));
- EXPECT_CALL(*receiver, media_type()).WillRepeatedly(testing::Return(
- media_type));
- EXPECT_CALL(*receiver, GetParameters()).WillRepeatedly(testing::Return(
- CreateRtpParametersWithSsrcs(ssrcs)));
+ EXPECT_CALL(*receiver, media_type())
+ .WillRepeatedly(testing::Return(media_type));
+ EXPECT_CALL(*receiver, GetParameters())
+ .WillRepeatedly(testing::Return(CreateRtpParametersWithSsrcs(ssrcs)));
return receiver;
}
@@ -86,8 +88,7 @@
FakeVideoTrackSource::Create(false))),
remote_video_track_(
VideoTrack::Create("RemoteVideoTrack",
- FakeVideoTrackSource::Create(false))) {
- }
+ FakeVideoTrackSource::Create(false))) {}
~TrackMediaInfoMapTest() {
// If we have a map the ownership has been passed to the map, only delete if
@@ -101,8 +102,9 @@
void AddRtpSenderWithSsrcs(std::initializer_list<uint32_t> ssrcs,
MediaStreamTrackInterface* local_track) {
rtc::scoped_refptr<MockRtpSender> rtp_sender = CreateMockRtpSender(
- local_track->kind() == MediaStreamTrackInterface::kAudioKind ?
- cricket::MEDIA_TYPE_AUDIO : cricket::MEDIA_TYPE_VIDEO,
+ local_track->kind() == MediaStreamTrackInterface::kAudioKind
+ ? cricket::MEDIA_TYPE_AUDIO
+ : cricket::MEDIA_TYPE_VIDEO,
ssrcs, local_track);
rtp_senders_.push_back(rtp_sender);
@@ -128,8 +130,9 @@
void AddRtpReceiverWithSsrcs(std::initializer_list<uint32_t> ssrcs,
MediaStreamTrackInterface* remote_track) {
rtc::scoped_refptr<MockRtpReceiver> rtp_receiver = CreateMockRtpReceiver(
- remote_track->kind() == MediaStreamTrackInterface::kAudioKind ?
- cricket::MEDIA_TYPE_AUDIO : cricket::MEDIA_TYPE_VIDEO,
+ remote_track->kind() == MediaStreamTrackInterface::kAudioKind
+ ? cricket::MEDIA_TYPE_AUDIO
+ : cricket::MEDIA_TYPE_VIDEO,
ssrcs, remote_track);
rtp_receivers_.push_back(rtp_receiver);
@@ -157,8 +160,7 @@
map_.reset(new TrackMediaInfoMap(
std::unique_ptr<cricket::VoiceMediaInfo>(voice_media_info_),
std::unique_ptr<cricket::VideoMediaInfo>(video_media_info_),
- rtp_senders_,
- rtp_receivers_));
+ rtp_senders_, rtp_receivers_));
}
protected:
@@ -176,17 +178,17 @@
} // namespace
TEST_F(TrackMediaInfoMapTest, SingleSenderReceiverPerTrackWithOneSsrc) {
- AddRtpSenderWithSsrcs({ 1 }, local_audio_track_);
- AddRtpReceiverWithSsrcs({ 2 }, remote_audio_track_);
- AddRtpSenderWithSsrcs({ 3 }, local_video_track_);
- AddRtpReceiverWithSsrcs({ 4 }, remote_video_track_);
+ AddRtpSenderWithSsrcs({1}, local_audio_track_);
+ AddRtpReceiverWithSsrcs({2}, remote_audio_track_);
+ AddRtpSenderWithSsrcs({3}, local_video_track_);
+ AddRtpReceiverWithSsrcs({4}, remote_video_track_);
CreateMap();
// Local audio track <-> RTP audio sender
ASSERT_TRUE(map_->GetVoiceSenderInfos(*local_audio_track_));
- EXPECT_EQ(*map_->GetVoiceSenderInfos(*local_audio_track_),
- std::vector<cricket::VoiceSenderInfo*>({
- &voice_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVoiceSenderInfos(*local_audio_track_),
+ std::vector<cricket::VoiceSenderInfo*>({&voice_media_info_->senders[0]}));
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[0]),
local_audio_track_.get());
@@ -198,9 +200,9 @@
// Local video track <-> RTP video sender
ASSERT_TRUE(map_->GetVideoSenderInfos(*local_video_track_));
- EXPECT_EQ(*map_->GetVideoSenderInfos(*local_video_track_),
- std::vector<cricket::VideoSenderInfo*>({
- &video_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVideoSenderInfos(*local_video_track_),
+ std::vector<cricket::VideoSenderInfo*>({&video_media_info_->senders[0]}));
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[0]),
local_video_track_.get());
@@ -226,17 +228,17 @@
TEST_F(TrackMediaInfoMapTest,
SingleSenderReceiverPerTrackWithAudioAndVideoUseSameSsrc) {
- AddRtpSenderWithSsrcs({ 1 }, local_audio_track_);
- AddRtpReceiverWithSsrcs({ 2 }, remote_audio_track_);
- AddRtpSenderWithSsrcs({ 1 }, local_video_track_);
- AddRtpReceiverWithSsrcs({ 2 }, remote_video_track_);
+ AddRtpSenderWithSsrcs({1}, local_audio_track_);
+ AddRtpReceiverWithSsrcs({2}, remote_audio_track_);
+ AddRtpSenderWithSsrcs({1}, local_video_track_);
+ AddRtpReceiverWithSsrcs({2}, remote_video_track_);
CreateMap();
// Local audio track <-> RTP audio sender
ASSERT_TRUE(map_->GetVoiceSenderInfos(*local_audio_track_));
- EXPECT_EQ(*map_->GetVoiceSenderInfos(*local_audio_track_),
- std::vector<cricket::VoiceSenderInfo*>({
- &voice_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVoiceSenderInfos(*local_audio_track_),
+ std::vector<cricket::VoiceSenderInfo*>({&voice_media_info_->senders[0]}));
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[0]),
local_audio_track_.get());
@@ -248,9 +250,9 @@
// Local video track <-> RTP video sender
ASSERT_TRUE(map_->GetVideoSenderInfos(*local_video_track_));
- EXPECT_EQ(*map_->GetVideoSenderInfos(*local_video_track_),
- std::vector<cricket::VideoSenderInfo*>({
- &video_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVideoSenderInfos(*local_video_track_),
+ std::vector<cricket::VideoSenderInfo*>({&video_media_info_->senders[0]}));
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[0]),
local_video_track_.get());
@@ -262,40 +264,40 @@
}
TEST_F(TrackMediaInfoMapTest, SingleMultiSsrcSenderPerTrack) {
- AddRtpSenderWithSsrcs({ 1, 2 }, local_audio_track_);
- AddRtpSenderWithSsrcs({ 3, 4 }, local_video_track_);
+ AddRtpSenderWithSsrcs({1, 2}, local_audio_track_);
+ AddRtpSenderWithSsrcs({3, 4}, local_video_track_);
CreateMap();
// Local audio track <-> RTP audio senders
ASSERT_TRUE(map_->GetVoiceSenderInfos(*local_audio_track_));
- EXPECT_EQ(*map_->GetVoiceSenderInfos(*local_audio_track_),
- std::vector<cricket::VoiceSenderInfo*>({
- &voice_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVoiceSenderInfos(*local_audio_track_),
+ std::vector<cricket::VoiceSenderInfo*>({&voice_media_info_->senders[0]}));
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[0]),
local_audio_track_.get());
// Local video track <-> RTP video senders
ASSERT_TRUE(map_->GetVideoSenderInfos(*local_video_track_));
- EXPECT_EQ(*map_->GetVideoSenderInfos(*local_video_track_),
- std::vector<cricket::VideoSenderInfo*>({
- &video_media_info_->senders[0] }));
+ EXPECT_EQ(
+ *map_->GetVideoSenderInfos(*local_video_track_),
+ std::vector<cricket::VideoSenderInfo*>({&video_media_info_->senders[0]}));
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[0]),
local_video_track_.get());
}
TEST_F(TrackMediaInfoMapTest, MultipleOneSsrcSendersPerTrack) {
- AddRtpSenderWithSsrcs({ 1 }, local_audio_track_);
- AddRtpSenderWithSsrcs({ 2 }, local_audio_track_);
- AddRtpSenderWithSsrcs({ 3 }, local_video_track_);
- AddRtpSenderWithSsrcs({ 4 }, local_video_track_);
+ AddRtpSenderWithSsrcs({1}, local_audio_track_);
+ AddRtpSenderWithSsrcs({2}, local_audio_track_);
+ AddRtpSenderWithSsrcs({3}, local_video_track_);
+ AddRtpSenderWithSsrcs({4}, local_video_track_);
CreateMap();
// Local audio track <-> RTP audio senders
ASSERT_TRUE(map_->GetVoiceSenderInfos(*local_audio_track_));
- EXPECT_EQ(*map_->GetVoiceSenderInfos(*local_audio_track_),
- std::vector<cricket::VoiceSenderInfo*>({
- &voice_media_info_->senders[0],
- &voice_media_info_->senders[1] }));
+ EXPECT_EQ(
+ *map_->GetVoiceSenderInfos(*local_audio_track_),
+ std::vector<cricket::VoiceSenderInfo*>(
+ {&voice_media_info_->senders[0], &voice_media_info_->senders[1]}));
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[0]),
local_audio_track_.get());
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[1]),
@@ -303,10 +305,10 @@
// Local video track <-> RTP video senders
ASSERT_TRUE(map_->GetVideoSenderInfos(*local_video_track_));
- EXPECT_EQ(*map_->GetVideoSenderInfos(*local_video_track_),
- std::vector<cricket::VideoSenderInfo*>({
- &video_media_info_->senders[0],
- &video_media_info_->senders[1] }));
+ EXPECT_EQ(
+ *map_->GetVideoSenderInfos(*local_video_track_),
+ std::vector<cricket::VideoSenderInfo*>(
+ {&video_media_info_->senders[0], &video_media_info_->senders[1]}));
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[0]),
local_video_track_.get());
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[1]),
@@ -314,18 +316,18 @@
}
TEST_F(TrackMediaInfoMapTest, MultipleMultiSsrcSendersPerTrack) {
- AddRtpSenderWithSsrcs({ 1, 2 }, local_audio_track_);
- AddRtpSenderWithSsrcs({ 3, 4 }, local_audio_track_);
- AddRtpSenderWithSsrcs({ 5, 6 }, local_video_track_);
- AddRtpSenderWithSsrcs({ 7, 8 }, local_video_track_);
+ AddRtpSenderWithSsrcs({1, 2}, local_audio_track_);
+ AddRtpSenderWithSsrcs({3, 4}, local_audio_track_);
+ AddRtpSenderWithSsrcs({5, 6}, local_video_track_);
+ AddRtpSenderWithSsrcs({7, 8}, local_video_track_);
CreateMap();
// Local audio track <-> RTP audio senders
ASSERT_TRUE(map_->GetVoiceSenderInfos(*local_audio_track_));
- EXPECT_EQ(*map_->GetVoiceSenderInfos(*local_audio_track_),
- std::vector<cricket::VoiceSenderInfo*>({
- &voice_media_info_->senders[0],
- &voice_media_info_->senders[1] }));
+ EXPECT_EQ(
+ *map_->GetVoiceSenderInfos(*local_audio_track_),
+ std::vector<cricket::VoiceSenderInfo*>(
+ {&voice_media_info_->senders[0], &voice_media_info_->senders[1]}));
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[0]),
local_audio_track_.get());
EXPECT_EQ(map_->GetAudioTrack(voice_media_info_->senders[1]),
@@ -333,10 +335,10 @@
// Local video track <-> RTP video senders
ASSERT_TRUE(map_->GetVideoSenderInfos(*local_video_track_));
- EXPECT_EQ(*map_->GetVideoSenderInfos(*local_video_track_),
- std::vector<cricket::VideoSenderInfo*>({
- &video_media_info_->senders[0],
- &video_media_info_->senders[1] }));
+ EXPECT_EQ(
+ *map_->GetVideoSenderInfos(*local_video_track_),
+ std::vector<cricket::VideoSenderInfo*>(
+ {&video_media_info_->senders[0], &video_media_info_->senders[1]}));
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[0]),
local_video_track_.get());
EXPECT_EQ(map_->GetVideoTrack(video_media_info_->senders[1]),
@@ -348,31 +350,30 @@
// base/test/gtest_util.h.
#if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
-class TrackMediaInfoMapDeathTest : public TrackMediaInfoMapTest {
-};
+class TrackMediaInfoMapDeathTest : public TrackMediaInfoMapTest {};
TEST_F(TrackMediaInfoMapDeathTest, MultipleOneSsrcReceiversPerTrack) {
- AddRtpReceiverWithSsrcs({ 1 }, remote_audio_track_);
- AddRtpReceiverWithSsrcs({ 2 }, remote_audio_track_);
- AddRtpReceiverWithSsrcs({ 3 }, remote_video_track_);
- AddRtpReceiverWithSsrcs({ 4 }, remote_video_track_);
+ AddRtpReceiverWithSsrcs({1}, remote_audio_track_);
+ AddRtpReceiverWithSsrcs({2}, remote_audio_track_);
+ AddRtpReceiverWithSsrcs({3}, remote_video_track_);
+ AddRtpReceiverWithSsrcs({4}, remote_video_track_);
EXPECT_DEATH(CreateMap(), "");
}
TEST_F(TrackMediaInfoMapDeathTest, MultipleMultiSsrcReceiversPerTrack) {
- AddRtpReceiverWithSsrcs({ 1, 2 }, remote_audio_track_);
- AddRtpReceiverWithSsrcs({ 3, 4 }, remote_audio_track_);
- AddRtpReceiverWithSsrcs({ 5, 6 }, remote_video_track_);
- AddRtpReceiverWithSsrcs({ 7, 8 }, remote_video_track_);
+ AddRtpReceiverWithSsrcs({1, 2}, remote_audio_track_);
+ AddRtpReceiverWithSsrcs({3, 4}, remote_audio_track_);
+ AddRtpReceiverWithSsrcs({5, 6}, remote_video_track_);
+ AddRtpReceiverWithSsrcs({7, 8}, remote_video_track_);
EXPECT_DEATH(CreateMap(), "");
}
TEST_F(TrackMediaInfoMapDeathTest,
SingleSenderReceiverPerTrackWithSsrcNotUnique) {
- AddRtpSenderWithSsrcs({ 1 }, local_audio_track_);
- AddRtpReceiverWithSsrcs({ 1 }, remote_audio_track_);
- AddRtpSenderWithSsrcs({ 2 }, local_video_track_);
- AddRtpReceiverWithSsrcs({ 2 }, remote_video_track_);
+ AddRtpSenderWithSsrcs({1}, local_audio_track_);
+ AddRtpReceiverWithSsrcs({1}, remote_audio_track_);
+ AddRtpSenderWithSsrcs({2}, local_video_track_);
+ AddRtpReceiverWithSsrcs({2}, remote_video_track_);
EXPECT_DEATH(CreateMap(), "");
}