Bug 1858509 add thread-safety annotations around MediaSourceDemuxer::mMonitor r=alwu
[gecko.git] / ipc / glue / UtilityAudioDecoderParent.h
blob8c741e52eeec8be05502e498134f9a2122044558
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef _include_ipc_glue_UtilityAudioDecoderParent_h_
7 #define _include_ipc_glue_UtilityAudioDecoderParent_h_
9 #include "mozilla/PRemoteDecoderManagerParent.h"
10 #include "mozilla/ProfilerMarkers.h"
11 #include "mozilla/UniquePtr.h"
13 #include "mozilla/ipc/Endpoint.h"
14 #include "mozilla/ipc/PUtilityAudioDecoderParent.h"
16 #include "mozilla/ipc/UtilityProcessSandboxing.h"
18 #include "nsThreadManager.h"
20 namespace mozilla::ipc {
22 // This is in charge of handling the utility child process side to perform
23 // audio decoding
24 class UtilityAudioDecoderParent final : public PUtilityAudioDecoderParent {
25 public:
26 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UtilityAudioDecoderParent, override);
28 UtilityAudioDecoderParent();
30 static void GenericPreloadForSandbox();
31 static void WMFPreloadForSandbox();
33 void Start(Endpoint<PUtilityAudioDecoderParent>&& aEndpoint);
35 mozilla::ipc::IPCResult RecvNewContentRemoteDecoderManager(
36 Endpoint<PRemoteDecoderManagerParent>&& aEndpoint);
38 #ifdef MOZ_WMF_MEDIA_ENGINE
39 mozilla::ipc::IPCResult RecvInitVideoBridge(
40 Endpoint<PVideoBridgeChild>&& aEndpoint,
41 nsTArray<mozilla::gfx::GfxVarUpdate>&& aUpdates,
42 const ContentDeviceData& aContentDeviceData);
44 IPCResult RecvUpdateVar(const mozilla::gfx::GfxVarUpdate& aUpdate);
45 #endif
47 private:
48 ~UtilityAudioDecoderParent();
50 const SandboxingKind mKind;
51 TimeStamp mAudioDecoderParentStart;
54 } // namespace mozilla::ipc
56 #endif // _include_ipc_glue_UtilityAudioDecoderParent_h_