Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6996)

Unified Diff: chrome/test/data/webrtc/peerconnection.js

Issue 2985263002: Reland of RTCVideoEncoder: Report H264 profile information to WebRTC (Closed)
Patch Set: Add default argument to SetDefaultVideoCodec Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/webrtc/munge_sdp.js ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webrtc/peerconnection.js
diff --git a/chrome/test/data/webrtc/peerconnection.js b/chrome/test/data/webrtc/peerconnection.js
index c51ff1158ea276413502d85c325c3c459836fa90..13441c22be60b96ecd760fab346c6380f3bf1160 100644
--- a/chrome/test/data/webrtc/peerconnection.js
+++ b/chrome/test/data/webrtc/peerconnection.js
@@ -41,6 +41,12 @@ var gDefaultAudioCodec = null;
var gDefaultVideoCodec = null;
/**
+ * Flag to indicate if HW or SW video codec is preferred.
+ * @private
+ */
+var gDefaultPreferHwVideoCodec = null;
+
+/**
* Flag to indicate if Opus Dtx should be enabled.
* @private
*/
@@ -122,9 +128,14 @@ function setDefaultAudioCodec(audioCodec) {
* video codec, e.g. the first one in the list on the 'm=video' SDP offer
* line. |videoCodec| is the case-sensitive codec name, e.g. 'VP8' or
* 'H264'.
+ * @param {bool} preferHwVideoCodec specifies what codec to use from the
+ * 'm=video' line when there are multiple codecs with the name |videoCodec|.
+ * If true, it will return the last codec with that name, and if false, it
+ * will return the first codec with that name.
*/
-function setDefaultVideoCodec(videoCodec) {
+function setDefaultVideoCodec(videoCodec, preferHwVideoCodec) {
gDefaultVideoCodec = videoCodec;
+ gDefaultPreferHwVideoCodec = preferHwVideoCodec;
returnToTest('ok');
}
@@ -156,7 +167,8 @@ function createLocalOffer(constraints) {
}
if (gDefaultVideoCodec !== null) {
localOffer.sdp = setSdpDefaultVideoCodec(localOffer.sdp,
- gDefaultVideoCodec);
+ gDefaultVideoCodec,
+ gDefaultPreferHwVideoCodec);
}
if (gOpusDtx) {
localOffer.sdp = setOpusDtxEnabled(localOffer.sdp);
« no previous file with comments | « chrome/test/data/webrtc/munge_sdp.js ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698