PMFMediaEngine.ipdl (1744B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 include "mozilla/dom/MediaIPCUtils.h"; 6 7 include protocol PRemoteMediaManager; 8 9 using mozilla::AudioInfo from "MediaInfo.h"; 10 using mozilla::VideoInfo from "MediaInfo.h"; 11 using mozilla::MediaResult from "MediaResult.h"; 12 using mozilla::TrackInfo::TrackType from "MediaInfo.h"; 13 using mozilla::MFMediaEngineError from "MFMediaEngineUtils.h"; 14 using mozilla::MFMediaEngineEvent from "MFMediaEngineUtils.h"; 15 16 namespace mozilla { 17 18 struct MediaEngineInfoIPDL 19 { 20 MediaInfoIPDL mediaInfo; 21 bool preload; 22 bool encryptedCustomIdent; 23 }; 24 25 struct MediaInfoIPDL 26 { 27 AudioInfo? audioInfo; 28 VideoInfo? videoInfo; 29 }; 30 31 struct StatisticData 32 { 33 uint64_t renderedFrames; 34 uint64_t droppedFrames; 35 }; 36 37 [ManualDealloc] 38 async protocol PMFMediaEngine 39 { 40 manager PRemoteMediaManager; 41 parent: 42 // Return 0 if media engine can't be created. 43 async InitMediaEngine(MediaEngineInfoIPDL info) returns (uint64_t id); 44 async Play(); 45 async Pause(); 46 async Seek(double targetTimeInSecond); 47 async SetCDMProxyId(uint64_t type); 48 async SetVolume(double volume); 49 async SetPlaybackRate(double playbackRate); 50 async SetLooping(bool looping); 51 async NotifyEndOfStream(TrackType type); 52 async Shutdown(); 53 async __delete__(); 54 55 child: 56 async NotifyEvent(MFMediaEngineEvent event); 57 async NotifyError(MediaResult error); 58 async UpdateCurrentTime(double currentTimeInSecond); 59 async RequestSample(TrackType type, bool isEnough); 60 async UpdateStatisticData(StatisticData data); 61 async NotifyResizing(uint32_t width, uint32_t height); 62 }; 63 64 } // namespace mozilla