diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/ipc/MFMediaEngineParent.cpp | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/ipc/MFMediaEngineParent.cpp')
-rw-r--r-- | dom/media/ipc/MFMediaEngineParent.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/dom/media/ipc/MFMediaEngineParent.cpp b/dom/media/ipc/MFMediaEngineParent.cpp index 5ed1b71160..3a9670f330 100644 --- a/dom/media/ipc/MFMediaEngineParent.cpp +++ b/dom/media/ipc/MFMediaEngineParent.cpp @@ -338,17 +338,17 @@ mozilla::ipc::IPCResult MFMediaEngineParent::RecvInitMediaEngine( // TODO : really need this? Unused << mMediaEngine->SetPreload(MF_MEDIA_ENGINE_PRELOAD_AUTOMATIC); } + RETURN_PARAM_IF_FAILED(SetMediaInfo(aInfo.mediaInfo()), IPC_OK()); aResolver(mMediaEngineId); return IPC_OK(); } -mozilla::ipc::IPCResult MFMediaEngineParent::RecvNotifyMediaInfo( - const MediaInfoIPDL& aInfo) { +HRESULT MFMediaEngineParent::SetMediaInfo(const MediaInfoIPDL& aInfo) { AssertOnManagerThread(); MOZ_ASSERT(mIsCreatedMediaEngine, "Hasn't created media engine?"); MOZ_ASSERT(!mMediaSource); - LOG("RecvNotifyMediaInfo"); + LOG("SetMediaInfo"); auto errorExit = MakeScopeExit([&] { MediaResult error(NS_ERROR_DOM_MEDIA_FATAL_ERR, @@ -378,9 +378,8 @@ mozilla::ipc::IPCResult MFMediaEngineParent::RecvNotifyMediaInfo( if (aInfo.videoInfo()) { ComPtr<IMFMediaEngineEx> mediaEngineEx; - RETURN_PARAM_IF_FAILED(mMediaEngine.As(&mediaEngineEx), IPC_OK()); - RETURN_PARAM_IF_FAILED(mediaEngineEx->EnableWindowlessSwapchainMode(true), - IPC_OK()); + RETURN_IF_FAILED(mMediaEngine.As(&mediaEngineEx)); + RETURN_IF_FAILED(mediaEngineEx->EnableWindowlessSwapchainMode(true)); LOG("Enabled dcomp swap chain mode"); ENGINE_MARKER("MFMediaEngineParent,EnabledSwapChain"); } @@ -392,7 +391,7 @@ mozilla::ipc::IPCResult MFMediaEngineParent::RecvNotifyMediaInfo( #ifdef MOZ_WMF_CDM if (isEncryted && !mContentProtectionManager) { // We will set the source later when the CDM proxy is ready. - return IPC_OK(); + return S_OK; } if (isEncryted && mContentProtectionManager) { @@ -403,7 +402,7 @@ mozilla::ipc::IPCResult MFMediaEngineParent::RecvNotifyMediaInfo( #endif SetMediaSourceOnEngine(); - return IPC_OK(); + return S_OK; } void MFMediaEngineParent::SetMediaSourceOnEngine() { |