Bug 1459152 [wpt PR 10841] - Adds a test for basic WebRTC video codec conformance., a=testonly

Automatic update from web-platform-testsAdds a test for basic WebRTC video codec conformance.

This tests that the browser conforms to RFC 7742, "WebRTC Video
Processing and Codec Requrements".

It establishes a new subdirectory for protocol-related WebRTC tests.

Bug: chromium:839753
Change-Id: Ia4795c4532fb74ae76e6a47329a41807479113c5
Reviewed-on: https://chromium-review.googlesource.com/1043886
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556454}

--

wpt-commits: 644351d8f6c20a562f5d34dcbbb4f3ea416fadcf
wpt-pr: 10841
This commit is contained in:
Harald Alvestrand 2018-05-10 18:29:52 +00:00 committed by moz-wptsync-bot
parent ceba72f036
commit a4df01c9b6
3 changed files with 103 additions and 0 deletions

View File

@ -299068,6 +299068,11 @@
{}
]
],
"webrtc/protocol/README.txt": [
[
{}
]
],
"webrtc/tools/.eslintrc.js": [
[
{}
@ -372972,6 +372977,12 @@
{}
]
],
"webrtc/protocol/video-codecs.html": [
[
"/webrtc/protocol/video-codecs.html",
{}
]
],
"webrtc/simplecall.https.html": [
[
"/webrtc/simplecall.https.html",
@ -613957,6 +613968,14 @@
"f0292ca52ee86920d0fdb8bccae2bc40a8ef99af",
"testharness"
],
"webrtc/protocol/README.txt": [
"af7066f4e223c39ff45a095c78acf4ca59a211ba",
"support"
],
"webrtc/protocol/video-codecs.html": [
"60f8a95a3fe3aac9b361e52d2d974cdd2483a46d",
"testharness"
],
"webrtc/simplecall.https.html": [
"146432ca56e487a035df8ad9d5a7fa4a495b5405",
"testharness"

View File

@ -0,0 +1,21 @@
This directory contains files that test for behavior relevant to webrtc,
but which is specified in protocol specifications from the IETF, not in
API recommendations from the W3C.
The main specifications are given in the following internet-drafts:
- draft-ietf-rtcweb-overview
- draft-ietf-rtcweb-transports
- draft-ietf-rtcweb-security-arch
- draft-ietf-rtcweb-security
- draft-ietf-rtcweb-rtp-usage
- draft-ietf-rtcweb-jsep
- draft-ietf-rtcweb-ip-handling
- draft-ietf-rtcweb-fec
- draft-ietf-rtcweb-data-protocol
- draft-ietf-rtcweb-data-channel
- RFC 7742, "WebRTC Video Processing and Codec Requirements"
- RFC 7874, "WebRTC Audio Codec and Processing Requirements"
An overview of the dependencies involved is in draft-jennings-rtcweb-deps

View File

@ -0,0 +1,63 @@
<!doctype html>
<meta charset=utf-8>
<title>RTCPeerConnection.prototype.createOffer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/webrtc/RTCPeerConnection-helper.js"></script>
<script>
'use strict';
// Tests for conformance to RFC 7742,
// "WebRTC Video Processing and Codec Requirements"
// The document was formerly known as draft-ietf-rtcweb-video-codecs.
//
// This tests that the browser is a WebRTC Browser as defined there.
// TODO: Section 3.2: screen capture video MUST be prepared
// to handle resolution changes.
// TODO: Section 4: MUST support generating CVO (orientation)
// Section 5: Browsers MUST implement VP8 and H.264 Constrained Baseline
promise_test(async t => {
const pc = new RTCPeerConnection();
const offer = await pc.createOffer({offerToReceiveVideo: true});
let video_section_found = false;
for (let section of offer.sdp.split(/\r\nm=/)) {
if (section.search('video') != 0) {
continue;
}
video_section_found = true;
// RTPMAP lines have the format a=rtpmap:<pt> <codec>/<clock rate>
let rtpmap_regex = /\r\na=rtpmap:(\d+) (\S+)\/\d+\r\n/g;
let match = rtpmap_regex.exec(offer.sdp);
let payload_type_map = new Array();
while (match) {
payload_type_map[match[1]] = match[2];
match = rtpmap_regex.exec(offer.sdp);
}
assert_true(payload_type_map.indexOf('VP8') > -1,
'VP8 is supported');
assert_true(payload_type_map.indexOf('H264') > -1,
'H.264 is supported');
// TODO: Verify that one of the H.264 PTs supports constrained baseline
}
assert_true(video_section_found);
}, 'H.264 and VP8 should be supported in initial offer');
// TODO: Section 6: Recipients MUST be able to decode 320x240@20 fps
// TODO: Section 6.1: VP8 MUST support RFC 7741 payload formats
// TODO: Section 6.1: VP8 MUST respect max-fr/max-fs
// TODO: Section 6.1: VP8 MUST encode and decode square pixels
// TODO: Section 6.2: H.264 MUST support RFC 6184 payload formats
// TODO: Section 6.2: MUST support Constrained Baseline level 1.2
// TODO: Section 6.2: SHOULD support Constrained High level 1.3
// TODO: Section 6.2: MUST support packetization mode 1.
// TODO: Section 6.2: MUST include profile-level-id
// TODO: Section 6.2: SHOULD interpret max-mbps, max-smbps, max-fs et al
// TODO: Section 6.2: MUST NOT include sprop-parameter-sets
// TODO: Section 6.2: MUST support SEI "filler payload"
// TODO: Section 6.2: MUST support SEI "full frame freeze"
// TODO: Section 6.2: MUST be prepared to receive User Data messages
// TODO: Section 6.2: MUST encode and decode square pixels unless signaled
</script>