Adds test for experimental remote estimate SDP negotiation.
Bug: webrtc:10742 Change-Id: I50d9caecda10c504cb4880c37475eeccd22c0855 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146705 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28670}
This commit is contained in:
parent
463d44a805
commit
97321b687b
@ -32,6 +32,9 @@ class RemoteEstimateSerializer {
|
|||||||
// overhead of the serializer every time RemoteEstimate is created.
|
// overhead of the serializer every time RemoteEstimate is created.
|
||||||
const RemoteEstimateSerializer* GetRemoteEstimateSerializer();
|
const RemoteEstimateSerializer* GetRemoteEstimateSerializer();
|
||||||
|
|
||||||
|
// The RemoteEstimate packet provides network estimation results from the
|
||||||
|
// receive side. This functionality is experimental and subject to change
|
||||||
|
// without notice.
|
||||||
class RemoteEstimate : public App {
|
class RemoteEstimate : public App {
|
||||||
public:
|
public:
|
||||||
RemoteEstimate();
|
RemoteEstimate();
|
||||||
|
|||||||
@ -113,6 +113,8 @@ class MediaContentDescription {
|
|||||||
rtcp_reduced_size_ = reduced_size;
|
rtcp_reduced_size_ = reduced_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Indicates support for the remote network estimate packet type. This
|
||||||
|
// functionality is experimental and subject to change without notice.
|
||||||
virtual bool remote_estimate() const { return remote_estimate_; }
|
virtual bool remote_estimate() const { return remote_estimate_; }
|
||||||
virtual void set_remote_estimate(bool remote_estimate) {
|
virtual void set_remote_estimate(bool remote_estimate) {
|
||||||
remote_estimate_ = remote_estimate;
|
remote_estimate_ = remote_estimate;
|
||||||
|
|||||||
@ -3232,6 +3232,25 @@ TEST_F(WebRtcSdpTest, SerializeSdpWithConferenceFlag) {
|
|||||||
EXPECT_TRUE(video->conference_mode());
|
EXPECT_TRUE(video->conference_mode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(WebRtcSdpTest, SerializeAndDeserializeRemoteNetEstimate) {
|
||||||
|
{
|
||||||
|
// By default remote estimates are disabled.
|
||||||
|
JsepSessionDescription dst(kDummyType);
|
||||||
|
SdpDeserialize(webrtc::SdpSerialize(jdesc_), &dst);
|
||||||
|
EXPECT_FALSE(cricket::GetFirstVideoContentDescription(dst.description())
|
||||||
|
->remote_estimate());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
// When remote estimate is enabled, the setting is propagated via SDP.
|
||||||
|
cricket::GetFirstVideoContentDescription(jdesc_.description())
|
||||||
|
->set_remote_estimate(true);
|
||||||
|
JsepSessionDescription dst(kDummyType);
|
||||||
|
SdpDeserialize(webrtc::SdpSerialize(jdesc_), &dst);
|
||||||
|
EXPECT_TRUE(cricket::GetFirstVideoContentDescription(dst.description())
|
||||||
|
->remote_estimate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(WebRtcSdpTest, DeserializeBrokenSdp) {
|
TEST_F(WebRtcSdpTest, DeserializeBrokenSdp) {
|
||||||
const char kSdpDestroyer[] = "!@#$%^&";
|
const char kSdpDestroyer[] = "!@#$%^&";
|
||||||
const char kSdpEmptyType[] = " =candidate";
|
const char kSdpEmptyType[] = " =candidate";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user