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/. */
5 include "mozilla/dom/MediaIPCUtils.h";
7 include protocol PRemoteDecoderManager;
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";
18 struct MediaEngineInfoIPDL
31 uint64_t renderedFrames;
32 uint64_t droppedFrames;
36 async protocol PMFMediaEngine
38 manager PRemoteDecoderManager;
40 // Return 0 if media engine can't be created.
41 async InitMediaEngine(MediaEngineInfoIPDL info) returns (uint64_t id);
42 async NotifyMediaInfo(MediaInfoIPDL info);
45 async Seek(double targetTimeInSecond);
46 async SetCDMProxyId(uint64_t type);
47 async SetVolume(double volume);
48 async SetPlaybackRate(double playbackRate);
49 async SetLooping(bool looping);
50 async NotifyEndOfStream(TrackType type);
55 async NotifyEvent(MFMediaEngineEvent event);
56 async NotifyError(MediaResult error);
57 async UpdateCurrentTime(double currentTimeInSecond);
58 async RequestSample(TrackType type, bool isEnough);
59 async UpdateStatisticData(StatisticData data);
62 } // namespace mozilla