Convert video quality test from a TEST_F to a TEST fixture.
The purpose is to make the fixture reusable in downstream
projects. The CL adds the following things to API:
- api/test/video_quality_test_fixture.h
- api/test/create_video_quality_test_fixture.h
The following things are moved to API:
- call/bitrate_constraints.h (api/bitrate_constraints.h)
- call/simulated_network.h (api/test/simulated_network.h)
- call/media_type.h (api/mediatypes.h)
These are required by the params struct passed to the
fixture. I didn't attempt to split the params struct into
an internal-only and public version in this CL, and as
a result we need to pull in the above things. They are
quite harmless though, so I think it's worth it in order
to avoid splitting up the test config struct.
This CL doesn't solve all the problems we need to
implement downstream tests; we probably need to upstream
tracing variants of FakeNetworkPipe for instance, but
that will come later. This puts in place the basic
structure for now.
Bug: None
Change-Id: I35e26ed126fad27bc7b2a465400291084f6ac911
Reviewed-on: https://webrtc-review.googlesource.com/69601
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23714}
diff --git a/pc/webrtcsdp.cc b/pc/webrtcsdp.cc
index d068470..70a0634 100644
--- a/pc/webrtcsdp.cc
+++ b/pc/webrtcsdp.cc
@@ -22,6 +22,7 @@
#include <unordered_map>
#include <vector>
+#include "api/mediatypes.h"
#include "api/candidate.h"
#include "api/cryptoparams.h"
#include "api/jsepicecandidate.h"
@@ -232,7 +233,7 @@
static void AddFmtpLine(const T& codec, std::string* message);
static void BuildMediaDescription(const ContentInfo* content_info,
const TransportInfo* transport_info,
- const MediaType media_type,
+ const cricket::MediaType media_type,
const std::vector<Candidate>& candidates,
int msid_signaling,
std::string* message);
@@ -240,11 +241,11 @@
int sctp_port,
bool use_sctpmap);
static void BuildRtpContentAttributes(const MediaContentDescription* media_desc,
- const MediaType media_type,
+ const cricket::MediaType media_type,
int msid_signaling,
std::string* message);
static void BuildRtpMap(const MediaContentDescription* media_desc,
- const MediaType media_type,
+ const cricket::MediaType media_type,
std::string* message);
static void BuildCandidate(const std::vector<Candidate>& candidates,
bool include_ufrag,
@@ -275,7 +276,7 @@
std::vector<JsepIceCandidate*>* candidates,
SdpParseError* error);
static bool ParseContent(const std::string& message,
- const MediaType media_type,
+ const cricket::MediaType media_type,
int mline_index,
const std::string& protocol,
const std::vector<int>& payload_types,
@@ -298,12 +299,12 @@
MediaContentDescription* media_desc,
SdpParseError* error);
static bool ParseRtpmapAttribute(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
const std::vector<int>& payload_types,
MediaContentDescription* media_desc,
SdpParseError* error);
static bool ParseFmtpAttributes(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
MediaContentDescription* media_desc,
SdpParseError* error);
static bool ParseFmtpParam(const std::string& line,
@@ -315,7 +316,7 @@
SdpParseError* error,
bool is_raw);
static bool ParseRtcpFbAttribute(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
MediaContentDescription* media_desc,
SdpParseError* error);
static bool ParseIceOptions(const std::string& line,
@@ -1243,7 +1244,7 @@
void BuildMediaDescription(const ContentInfo* content_info,
const TransportInfo* transport_info,
- const MediaType media_type,
+ const cricket::MediaType media_type,
const std::vector<Candidate>& candidates,
int msid_signaling,
std::string* message) {
@@ -1477,7 +1478,7 @@
}
void BuildRtpContentAttributes(const MediaContentDescription* media_desc,
- const MediaType media_type,
+ const cricket::MediaType media_type,
int msid_signaling,
std::string* message) {
std::ostringstream os;
@@ -1767,7 +1768,7 @@
}
void BuildRtpMap(const MediaContentDescription* media_desc,
- const MediaType media_type,
+ const cricket::MediaType media_type,
std::string* message) {
RTC_DCHECK(message != NULL);
RTC_DCHECK(media_desc != NULL);
@@ -2328,7 +2329,7 @@
template <class C>
static C* ParseContentDescription(const std::string& message,
- const MediaType media_type,
+ const cricket::MediaType media_type,
int mline_index,
const std::string& protocol,
const std::vector<int>& payload_types,
@@ -2709,7 +2710,7 @@
}
bool ParseContent(const std::string& message,
- const MediaType media_type,
+ const cricket::MediaType media_type,
int mline_index,
const std::string& protocol,
const std::vector<int>& payload_types,
@@ -3198,7 +3199,7 @@
}
bool ParseRtpmapAttribute(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
const std::vector<int>& payload_types,
MediaContentDescription* media_desc,
SdpParseError* error) {
@@ -3281,7 +3282,7 @@
}
bool ParseFmtpAttributes(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
MediaContentDescription* media_desc,
SdpParseError* error) {
if (media_type != cricket::MEDIA_TYPE_AUDIO &&
@@ -3345,7 +3346,7 @@
}
bool ParseRtcpFbAttribute(const std::string& line,
- const MediaType media_type,
+ const cricket::MediaType media_type,
MediaContentDescription* media_desc,
SdpParseError* error) {
if (media_type != cricket::MEDIA_TYPE_AUDIO &&