PRemoteMediaManager.ipdl (2310B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifdef MOZ_WMF_MEDIA_ENGINE 7 include protocol PMFMediaEngine; 8 #endif 9 #ifdef MOZ_WMF_CDM 10 include protocol PMFCDM; 11 #endif 12 13 include protocol PTexture; 14 include protocol PRemoteCDM; 15 include protocol PRemoteDecoder; 16 include protocol PRemoteEncoder; 17 include LayersSurfaces; 18 include PMediaDecoderParams; 19 include "mozilla/dom/MediaIPCUtils.h"; 20 include "mozilla/layers/LayersMessageUtils.h"; 21 22 using mozilla::VideoInfo from "MediaInfo.h"; 23 using mozilla::AudioInfo from "MediaInfo.h"; 24 using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h"; 25 using mozilla::CreateDecoderParams::OptionSet from "PlatformDecoderModule.h"; 26 using mozilla::DecoderDoctorDiagnostics from "DecoderDoctorDiagnostics.h"; 27 using mozilla::TrackingId from "PerformanceRecorder.h"; 28 using mozilla::EncoderConfig from "EncoderConfig.h"; 29 30 namespace mozilla { 31 32 struct VideoDecoderInfoIPDL 33 { 34 VideoInfo videoInfo; 35 float framerate; 36 }; 37 38 union RemoteDecoderInfoIPDL 39 { 40 AudioInfo; 41 VideoDecoderInfoIPDL; 42 }; 43 44 [NeedsOtherPid, ParentProc=any, ChildProc=anydom] 45 sync protocol PRemoteMediaManager 46 { 47 manages PRemoteCDM; 48 manages PRemoteDecoder; 49 manages PRemoteEncoder; 50 #ifdef MOZ_WMF_MEDIA_ENGINE 51 manages PMFMediaEngine; 52 #endif 53 #ifdef MOZ_WMF_CDM 54 manages PMFCDM; 55 #endif 56 57 parent: 58 #ifdef MOZ_WMF_MEDIA_ENGINE 59 async PMFMediaEngine(); 60 #endif 61 #ifdef MOZ_WMF_CDM 62 async PMFCDM(nsString keySystem); 63 #endif 64 async PRemoteDecoder(RemoteDecoderInfoIPDL info, 65 OptionSet options, 66 TextureFactoryIdentifier? identifier, 67 uint64_t? mediaEngineId, 68 TrackingId? trackingId, 69 nullable PRemoteCDM cdm); 70 async PRemoteEncoder(EncoderConfig config); 71 async PRemoteCDM(nsString keySystem); 72 73 sync Readback(SurfaceDescriptorGPUVideo sd) returns (SurfaceDescriptor aResult); 74 75 async DeallocateSurfaceDescriptorGPUVideo(SurfaceDescriptorGPUVideo sd); 76 77 async OnSetCurrent(SurfaceDescriptorGPUVideo sd); 78 }; 79 80 } // namespace mozilla