Skip to content

Commit

Permalink
web platform tests for new networkPriority encoding parameter.
Browse files Browse the repository at this point in the history
Bug: webrtc:5008
Change-Id: I867b0811917f0356f05417f6186124d92c3a0622
Reviewed-on: https://chromium-review.googlesource.com/c/1357515
Commit-Queue: Tim Haloun <thaloun@chromium.org>
Reviewed-by: Florent Castelli <orphis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614228}
  • Loading branch information
Tim Haloun authored and chromium-wpt-export-bot committed Dec 6, 2018
1 parent 093a97b commit ee3ec2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webrtc/RTCRtpParameters-encodings.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
RTCPriorityType networkPriority;
unsigned long ptime;
unsigned long maxBitrate;
double maxFramerate;
Expand Down Expand Up @@ -146,6 +147,7 @@
dtx: 'enabled',
active: false,
priority: 'low',
networkPriority: 'low',
ptime: 5,
maxBitrate: 8,
maxFramerate: 25,
Expand All @@ -161,6 +163,7 @@
assert_equals(encoding.dtx, 'enabled');
assert_equals(encoding.active, false);
assert_equals(encoding.priority, 'low');
assert_equals(encoding.networkPriority, 'low');
assert_equals(encoding.ptime, 5);
assert_equals(encoding.maxBitrate, 8);
assert_equals(encoding.maxFramerate, 25);
Expand Down Expand Up @@ -339,6 +342,9 @@
test_modified_encoding('audio', 'priority', 'very-low', 'high',
'setParameters() with modified encoding.priority should succeed');

test_modified_encoding('audio', 'networkPriority', 'very-low', 'high',
'setParameters() with modified encoding.networkPriority should succeed');

test_modified_encoding('audio', 'ptime', 2, 4,
'setParameters() with modified encoding.ptime should succeed');

Expand Down
3 changes: 3 additions & 0 deletions webrtc/RTCRtpParameters-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function validateRtpParameters(param) {
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
RTCPriorityType networkPriority;
unsigned long ptime;
unsigned long maxBitrate;
double maxFramerate;
Expand Down Expand Up @@ -171,6 +172,8 @@ function validateEncodingParameters(encoding) {
assert_optional_boolean_field(encoding, 'active');
assert_optional_enum_field(encoding, 'priority',
['very-low', 'low', 'medium', 'high']);
assert_optional_enum_field(encoding, 'networkPriority',
['very-low', 'low', 'medium', 'high']);

assert_optional_unsigned_int_field(encoding, 'ptime');
assert_optional_unsigned_int_field(encoding, 'maxBitrate');
Expand Down

0 comments on commit ee3ec2e

Please sign in to comment.