summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/libwebrtcglue
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webrtc/libwebrtcglue')
-rw-r--r--dom/media/webrtc/libwebrtcglue/AudioConduit.cpp2
-rw-r--r--dom/media/webrtc/libwebrtcglue/VideoConduit.cpp2
-rw-r--r--dom/media/webrtc/libwebrtcglue/WebrtcCallWrapper.cpp17
-rw-r--r--dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h2
-rw-r--r--dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp20
-rw-r--r--dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h2
6 files changed, 22 insertions, 23 deletions
diff --git a/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp b/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
index 49f049cd21..91ad0d848c 100644
--- a/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
+++ b/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
@@ -907,7 +907,7 @@ RtpExtList WebrtcAudioConduit::FilterExtensions(LocalDirection aDirection,
webrtc::SdpAudioFormat WebrtcAudioConduit::CodecConfigToLibwebrtcFormat(
const AudioCodecConfig& aConfig) {
- webrtc::SdpAudioFormat::Parameters parameters;
+ webrtc::CodecParameterMap parameters;
if (aConfig.mName == kOpusCodecName) {
if (aConfig.mChannels == 2) {
parameters[kCodecParamStereo] = kParamValueTrue;
diff --git a/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp b/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
index 73e59f5ee2..5862237711 100644
--- a/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
+++ b/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
@@ -190,7 +190,7 @@ webrtc::VideoCodecType SupportedCodecType(webrtc::VideoCodecType aType) {
rtc::scoped_refptr<webrtc::VideoEncoderConfig::EncoderSpecificSettings>
ConfigureVideoEncoderSettings(const VideoCodecConfig& aConfig,
const WebrtcVideoConduit* aConduit,
- webrtc::SdpVideoFormat::Parameters& aParameters) {
+ webrtc::CodecParameterMap& aParameters) {
bool is_screencast =
aConduit->CodecMode() == webrtc::VideoCodecMode::kScreensharing;
// No automatic resizing when using simulcast or screencast.
diff --git a/dom/media/webrtc/libwebrtcglue/WebrtcCallWrapper.cpp b/dom/media/webrtc/libwebrtcglue/WebrtcCallWrapper.cpp
index 824f1cf6eb..b03c1772c4 100644
--- a/dom/media/webrtc/libwebrtcglue/WebrtcCallWrapper.cpp
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcCallWrapper.cpp
@@ -11,6 +11,8 @@
#include "TaskQueueWrapper.h"
// libwebrtc includes
+#include "api/environment/environment.h"
+#include "api/environment/environment_factory.h"
#include "call/rtp_transport_controller_send_factory.h"
namespace mozilla {
@@ -28,17 +30,16 @@ namespace mozilla {
std::move(eventLog), std::move(taskQueueFactory), aTimestampMaker,
std::move(aShutdownTicket));
+ webrtc::Environment env = CreateEnvironment(
+ wrapper->mEventLog.get(), wrapper->mClock.GetRealTimeClockRaw(),
+ wrapper->mTaskQueueFactory.get(), aSharedState->mTrials.get());
+
wrapper->mCallThread->Dispatch(
- NS_NewRunnableFunction(__func__, [wrapper, aSharedState] {
- webrtc::CallConfig config(wrapper->mEventLog.get());
+ NS_NewRunnableFunction(__func__, [wrapper, aSharedState, env] {
+ webrtc::CallConfig config(env, nullptr);
config.audio_state =
webrtc::AudioState::Create(aSharedState->mAudioStateConfig);
- config.task_queue_factory = wrapper->mTaskQueueFactory.get();
- config.trials = aSharedState->mTrials.get();
- wrapper->SetCall(WrapUnique(webrtc::Call::Create(
- config, &wrapper->mClock,
- webrtc::RtpTransportControllerSendFactory().Create(
- config.ExtractTransportConfig(), &wrapper->mClock)).release()));
+ wrapper->SetCall(WrapUnique(webrtc::Call::Create(config).release()));
}));
return wrapper;
diff --git a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
index 865f9afff0..b8ee44c6b3 100644
--- a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
@@ -289,7 +289,7 @@ class WebrtcGmpVideoEncoder : public GMPVideoEncoderCallbackProxy,
GMPVideoHost* mHost;
GMPVideoCodec mCodecParams;
uint32_t mMaxPayloadSize;
- const webrtc::SdpVideoFormat::Parameters mFormatParams;
+ const webrtc::CodecParameterMap mFormatParams;
webrtc::CodecSpecificInfo mCodecSpecificInfo;
webrtc::H264BitstreamParser mH264BitstreamParser;
// Protects mCallback
diff --git a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp
index 844542cd0d..f5240ffa22 100644
--- a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp
@@ -75,7 +75,7 @@ static const char* PacketModeStr(const webrtc::CodecSpecificInfo& aInfo) {
}
static std::pair<H264_PROFILE, H264_LEVEL> ConvertProfileLevel(
- const webrtc::SdpVideoFormat::Parameters& aParameters) {
+ const webrtc::CodecParameterMap& aParameters) {
const absl::optional<webrtc::H264ProfileLevelId> profileLevel =
webrtc::ParseSdpForH264ProfileLevelId(aParameters);
@@ -143,9 +143,9 @@ WebrtcMediaDataEncoder::~WebrtcMediaDataEncoder() {
}
}
-static void InitCodecSpecficInfo(
- webrtc::CodecSpecificInfo& aInfo, const webrtc::VideoCodec* aCodecSettings,
- const webrtc::SdpVideoFormat::Parameters& aParameters) {
+static void InitCodecSpecficInfo(webrtc::CodecSpecificInfo& aInfo,
+ const webrtc::VideoCodec* aCodecSettings,
+ const webrtc::CodecParameterMap& aParameters) {
MOZ_ASSERT(aCodecSettings);
aInfo.codecType = aCodecSettings->codecType;
@@ -290,13 +290,11 @@ already_AddRefed<MediaDataEncoder> WebrtcMediaDataEncoder::CreateEncoder(
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Unsupported codec type");
}
EncoderConfig config(
- type, {aCodecSettings->width, aCodecSettings->height},
- MediaDataEncoder::Usage::Realtime, MediaDataEncoder::PixelFormat::YUV420P,
- MediaDataEncoder::PixelFormat::YUV420P, aCodecSettings->maxFramerate,
- keyframeInterval, mBitrateAdjuster.GetTargetBitrateBps(),
- MediaDataEncoder::BitrateMode::Variable,
- MediaDataEncoder::HardwarePreference::None,
- MediaDataEncoder::ScalabilityMode::None, specific);
+ type, {aCodecSettings->width, aCodecSettings->height}, Usage::Realtime,
+ dom::ImageBitmapFormat::YUV420P, dom::ImageBitmapFormat::YUV420P,
+ aCodecSettings->maxFramerate, keyframeInterval,
+ mBitrateAdjuster.GetTargetBitrateBps(), BitrateMode::Variable,
+ HardwarePreference::None, ScalabilityMode::None, specific);
return mFactory->CreateEncoder(config, mTaskQueue);
}
diff --git a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
index 9d750e85b2..0c2070f6a9 100644
--- a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
@@ -65,7 +65,7 @@ class WebrtcMediaDataEncoder : public RefCountedWebrtcVideoEncoder {
MediaResult mError = NS_OK;
VideoInfo mInfo;
- webrtc::SdpVideoFormat::Parameters mFormatParams;
+ webrtc::CodecParameterMap mFormatParams;
webrtc::CodecSpecificInfo mCodecSpecific;
webrtc::BitrateAdjuster mBitrateAdjuster;
uint32_t mMaxFrameRate = {0};