PGMPVideoEncoder.ipdl (1766B)
1 /* -*- Mode: C++; tab-width: 2; 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 include protocol PGMPContent; 7 include GMPTypes; 8 9 using GMPVideoCodec from "gmp-video-codec.h"; 10 using GMPVideoFrameType from "gmp-video-frame-encoded.h"; 11 using GMPErr from "gmp-errors.h"; 12 13 include "GMPMessageUtils.h"; 14 include "GMPVideoEncoderChild.h"; 15 16 namespace mozilla { 17 namespace gmp { 18 19 [ChildImpl="GMPVideoEncoderChild", ParentImpl=virtual] 20 async protocol PGMPVideoEncoder 21 { 22 manager PGMPContent; 23 child: 24 async InitEncode(GMPVideoCodec aCodecSettings, 25 uint8_t[] aCodecSpecific, 26 int32_t aNumberOfCores, 27 uint32_t aMaxPayloadSize); 28 async GiveShmem(Shmem aOutputShmem); 29 async Encode(GMPVideoi420FrameData aInputFrame, 30 Shmem aInputShmem, 31 uint8_t[] aCodecSpecificInfo, 32 GMPVideoFrameType[] aFrameTypes); 33 async SetChannelParameters(uint32_t aPacketLoss, uint32_t aRTT); 34 async SetRates(uint32_t aNewBitRate, uint32_t aFrameRate); 35 async SetPeriodicKeyFrames(bool aEnable); 36 async __delete__(); 37 38 parent: 39 async ReturnShmem(Shmem aInputShmem); 40 async EncodedShmem(GMPVideoEncodedFrameData aEncodedFrame, 41 Shmem aEncodedShmem, 42 uint8_t[] aCodecSpecificInfo); 43 async EncodedData(GMPVideoEncodedFrameData aEncodedFrame, 44 uint8_t[] aEncodedData, 45 uint8_t[] aCodecSpecificInfo); 46 async DroppedFrame(uint64_t aTimestamp); 47 async Error(GMPErr aErr); 48 async Shutdown(); 49 }; 50 51 } // namespace gmp 52 } // namespace mozilla