зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9fd259ee61
Коммит
58ec457e76
|
@ -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."
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче