Bug 1568101 - part2 : use a static pref to control the feature. r=jolin

Use a static pref to control this feature and turn it off by default.

Differential Revision: https://phabricator.services.mozilla.com/D40530

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alastor Wu 2019-08-08 23:38:21 +00:00
Родитель 9fd259ee61
Коммит 58ec457e76
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,7 @@
#include "YuvStamper.h"
#include "mozilla/TemplateLib.h"
#include "mozilla/media/MediaUtils.h"
#include "mozilla/StaticPrefs_media.h"
#include "nsComponentManagerUtils.h"
#include "nsIPrefBranch.h"
#include "nsIGfxInfo.h"
@ -1682,6 +1683,13 @@ std::unique_ptr<webrtc::VideoEncoder> WebrtcVideoConduit::CreateEncoder(
bool enabled = false;
#endif
if (StaticPrefs::media_webrtc_platformencoder()) {
encoder.reset(MediaDataDecoderCodec::CreateEncoder(aType));
if (encoder) {
return encoder;
}
}
switch (aType) {
case webrtc::VideoCodecType::kVideoCodecH264:
// get an external encoder

Просмотреть файл

@ -5727,6 +5727,11 @@
value: false
mirror: always
- name: media.webrtc.platformencoder
type: bool
value: false
mirror: always
#---------------------------------------------------------------------------
# Prefs starting with "mousewheel."
#---------------------------------------------------------------------------