Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/gmp/PGMPVideoEncoderChild.h"
#include "GMPMessageUtils.h"
#include "GMPVideoEncoderChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/gmp/PGMPContentChild.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
namespace mozilla {
namespace gmp {
MOZ_IMPLICIT PGMPVideoEncoderChild::PGMPVideoEncoderChild() :
mozilla::ipc::IRefCountedProtocol(PGMPVideoEncoderMsgStart, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PGMPVideoEncoderChild);
}
PGMPVideoEncoderChild::~PGMPVideoEncoderChild()
{
MOZ_COUNT_DTOR(PGMPVideoEncoderChild);
}
auto PGMPVideoEncoderChild::ActorAlloc() -> void
{
AddRef();
}
auto PGMPVideoEncoderChild::ActorDealloc() -> void
{
Release();
}
auto PGMPVideoEncoderChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PGMPVideoEncoderChild::Manager() const -> PGMPContentChild*
{
return static_cast<PGMPContentChild*>(IProtocol::Manager());
}
auto PGMPVideoEncoderChild::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PGMPVideoEncoderChild::Send__delete__(PGMPVideoEncoderChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PGMPVideoEncoderChild::SendEncoded(
const GMPVideoEncodedFrameData& aEncodedFrame,
mozilla::Span<uint8_t const> aCodecSpecificInfo) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_Encoded(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEncodedFrame);
// Sentinel = 'aEncodedFrame'
((&(writer__)))->WriteSentinel(578290943);
IPC::WriteParam((&(writer__)), aCodecSpecificInfo);
// Sentinel = 'aCodecSpecificInfo'
((&(writer__)))->WriteSentinel(1089537778);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Encoded", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoEncoderChild::SendError(const GMPErr& aErr) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_Error(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aErr);
// Sentinel = 'aErr'
((&(writer__)))->WriteSentinel(61669771);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Error", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoEncoderChild::SendShutdown() -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_Shutdown(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Shutdown", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoEncoderChild::SendParentShmemForPool(Shmem&& aFrameBuffer) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_ParentShmemForPool(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), std::move(aFrameBuffer));
// Sentinel = 'aFrameBuffer'
((&(writer__)))->WriteSentinel(494732455);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_ParentShmemForPool", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoEncoderChild::SendNeedShmem(
const uint32_t& aEncodedBufferSize,
Shmem* aMem) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_NeedShmem(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEncodedBufferSize);
// Sentinel = 'aEncodedBufferSize'
((&(writer__)))->WriteSentinel(1098319625);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_NeedShmem", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PGMPVideoEncoder::Msg_NeedShmem", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aMem__reply = IPC::ReadParam<Shmem>((&(reader__)));
if (!maybe__aMem__reply) {
FatalError("Error deserializing 'Shmem'");
return false;
}
auto& aMem__reply = *maybe__aMem__reply;
// Sentinel = 'aMem'
if ((!(((&(reader__)))->ReadSentinel(61211009)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
return false;
}
(*(aMem)) = std::move(aMem__reply);
reader__.EndRead();
return true;
}
auto PGMPVideoEncoderChild::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PGMPVideoEncoderChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PGMPVideoEncoderChild::OnMessageReceived(const Message& msg__) -> PGMPVideoEncoderChild::Result
{
switch (msg__.type()) {
case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
return MsgProcessed;
}
case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
this->ActorDisconnected(ManagedEndpointDropped);
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_InitEncode__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_InitEncode", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aCodecSettings = IPC::ReadParam<GMPVideoCodec>((&(reader__)));
if (!maybe__aCodecSettings) {
FatalError("Error deserializing 'GMPVideoCodec'");
return MsgValueError;
}
auto& aCodecSettings = *maybe__aCodecSettings;
// Sentinel = 'aCodecSettings'
if ((!(((&(reader__)))->ReadSentinel(674629009)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoCodec'");
return MsgValueError;
}
auto maybe__aCodecSpecific = IPC::ReadParam<nsTArray<uint8_t>>((&(reader__)));
if (!maybe__aCodecSpecific) {
FatalError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto& aCodecSpecific = *maybe__aCodecSpecific;
// Sentinel = 'aCodecSpecific'
if ((!(((&(reader__)))->ReadSentinel(665847142)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto maybe__aNumberOfCores = IPC::ReadParam<int32_t>((&(reader__)));
if (!maybe__aNumberOfCores) {
FatalError("Error deserializing 'int32_t'");
return MsgValueError;
}
auto& aNumberOfCores = *maybe__aNumberOfCores;
// Sentinel = 'aNumberOfCores'
if ((!(((&(reader__)))->ReadSentinel(681117052)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
return MsgValueError;
}
auto maybe__aMaxPayloadSize = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aMaxPayloadSize) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aMaxPayloadSize = *maybe__aMaxPayloadSize;
// Sentinel = 'aMaxPayloadSize'
if ((!(((&(reader__)))->ReadSentinel(780076525)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvInitEncode(std::move(aCodecSettings), std::move(aCodecSpecific), std::move(aNumberOfCores), std::move(aMaxPayloadSize));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_Encode__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Encode", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aInputFrame = IPC::ReadParam<GMPVideoi420FrameData>((&(reader__)));
if (!maybe__aInputFrame) {
FatalError("Error deserializing 'GMPVideoi420FrameData'");
return MsgValueError;
}
auto& aInputFrame = *maybe__aInputFrame;
// Sentinel = 'aInputFrame'
if ((!(((&(reader__)))->ReadSentinel(434177117)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoi420FrameData'");
return MsgValueError;
}
auto maybe__aCodecSpecificInfo = IPC::ReadParam<nsTArray<uint8_t>>((&(reader__)));
if (!maybe__aCodecSpecificInfo) {
FatalError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto& aCodecSpecificInfo = *maybe__aCodecSpecificInfo;
// Sentinel = 'aCodecSpecificInfo'
if ((!(((&(reader__)))->ReadSentinel(1089537778)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto maybe__aFrameTypes = IPC::ReadParam<nsTArray<GMPVideoFrameType>>((&(reader__)));
if (!maybe__aFrameTypes) {
FatalError("Error deserializing 'GMPVideoFrameType[]'");
return MsgValueError;
}
auto& aFrameTypes = *maybe__aFrameTypes;
// Sentinel = 'aFrameTypes'
if ((!(((&(reader__)))->ReadSentinel(426378338)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoFrameType[]'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvEncode(std::move(aInputFrame), std::move(aCodecSpecificInfo), std::move(aFrameTypes));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_SetChannelParameters__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetChannelParameters", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aPacketLoss = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aPacketLoss) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aPacketLoss = *maybe__aPacketLoss;
// Sentinel = 'aPacketLoss'
if ((!(((&(reader__)))->ReadSentinel(423363675)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__aRTT = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aRTT) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aRTT = *maybe__aRTT;
// Sentinel = 'aRTT'
if ((!(((&(reader__)))->ReadSentinel(58327388)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvSetChannelParameters(std::move(aPacketLoss), std::move(aRTT));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_SetRates__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetRates", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aNewBitRate = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aNewBitRate) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aNewBitRate = *maybe__aNewBitRate;
// Sentinel = 'aNewBitRate'
if ((!(((&(reader__)))->ReadSentinel(415695927)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__aFrameRate = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aFrameRate) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aFrameRate = *maybe__aFrameRate;
// Sentinel = 'aFrameRate'
if ((!(((&(reader__)))->ReadSentinel(348128217)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvSetRates(std::move(aNewBitRate), std::move(aFrameRate));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_SetPeriodicKeyFrames__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetPeriodicKeyFrames", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEnable = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aEnable) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aEnable = *maybe__aEnable;
// Sentinel = 'aEnable'
if ((!(((&(reader__)))->ReadSentinel(173605545)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvSetPeriodicKeyFrames(std::move(aEnable));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_EncodingComplete__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_EncodingComplete", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvEncodingComplete();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Msg_ChildShmemForPool__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoEncoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_ChildShmemForPool", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEncodedBuffer = IPC::ReadParam<Shmem>((&(reader__)));
if (!maybe__aEncodedBuffer) {
FatalError("Error deserializing 'Shmem'");
return MsgValueError;
}
auto& aEncodedBuffer = *maybe__aEncodedBuffer;
// Sentinel = 'aEncodedBuffer'
if ((!(((&(reader__)))->ReadSentinel(668927342)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoEncoderChild*>(this))->RecvChildShmemForPool(std::move(aEncodedBuffer));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoEncoder::Reply___delete____ID:
{
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PGMPVideoEncoderChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PGMPVideoEncoderChild::Result
{
return MsgNotKnown;
}
auto PGMPVideoEncoderChild::DoomSubtree() -> void
{
SetDoomed();
}
auto PGMPVideoEncoderChild::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace gmp
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gmp::PGMPVideoEncoderChild*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::gmp::PGMPVideoEncoderChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PGMPVideoEncoder", PGMPVideoEncoderMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::gmp::PGMPVideoEncoderChild*>(actor.ref());
}
return {};
}
} // namespace IPC