Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/gmp/PGMPVideoDecoderChild.h"
#include "GMPMessageUtils.h"
#include "GMPVideoDecoderChild.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 PGMPVideoDecoderChild::PGMPVideoDecoderChild() :
mozilla::ipc::IRefCountedProtocol(PGMPVideoDecoderMsgStart, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PGMPVideoDecoderChild);
}
PGMPVideoDecoderChild::~PGMPVideoDecoderChild()
{
MOZ_COUNT_DTOR(PGMPVideoDecoderChild);
}
auto PGMPVideoDecoderChild::ActorAlloc() -> void
{
AddRef();
}
auto PGMPVideoDecoderChild::ActorDealloc() -> void
{
Release();
}
auto PGMPVideoDecoderChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PGMPVideoDecoderChild::Manager() const -> PGMPContentChild*
{
return static_cast<PGMPContentChild*>(IProtocol::Manager());
}
auto PGMPVideoDecoderChild::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PGMPVideoDecoderChild::Send__delete__(PGMPVideoDecoderChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PGMPVideoDecoderChild::SendDecoded(const GMPVideoi420FrameData& aDecodedFrame) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Decoded(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aDecodedFrame);
// Sentinel = 'aDecodedFrame'
((&(writer__)))->WriteSentinel(571016437);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Decoded", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendReceivedDecodedReferenceFrame(const uint64_t& aPictureId) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aPictureId);
// Sentinel = 'aPictureId'
((&(writer__)))->WriteSentinel(361694187);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendReceivedDecodedFrame(const uint64_t& aPictureId) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_ReceivedDecodedFrame(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aPictureId);
// Sentinel = 'aPictureId'
((&(writer__)))->WriteSentinel(361694187);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedFrame", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendInputDataExhausted() -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_InputDataExhausted(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InputDataExhausted", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendDrainComplete() -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_DrainComplete(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DrainComplete", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendResetComplete() -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_ResetComplete(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ResetComplete", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendError(const GMPErr& aErr) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Error(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aErr);
// Sentinel = 'aErr'
((&(writer__)))->WriteSentinel(61669771);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Error", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendShutdown() -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Shutdown(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Shutdown", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendParentShmemForPool(Shmem&& aEncodedBuffer) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_ParentShmemForPool(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), std::move(aEncodedBuffer));
// Sentinel = 'aEncodedBuffer'
((&(writer__)))->WriteSentinel(668927342);
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ParentShmemForPool", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PGMPVideoDecoderChild::SendNeedShmem(
const uint32_t& aFrameBufferSize,
Shmem* aMem) -> bool
{
UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_NeedShmem(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aFrameBufferSize);
// Sentinel = 'aFrameBufferSize'
((&(writer__)))->WriteSentinel(871958082);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_NeedShmem", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PGMPVideoDecoder::Msg_NeedShmem", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
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 PGMPVideoDecoderChild::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PGMPVideoDecoderChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PGMPVideoDecoderChild::OnMessageReceived(const Message& msg__) -> PGMPVideoDecoderChild::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 PGMPVideoDecoder::Msg_InitDecode__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InitDecode", 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__aCoreCount = IPC::ReadParam<int32_t>((&(reader__)));
if (!maybe__aCoreCount) {
FatalError("Error deserializing 'int32_t'");
return MsgValueError;
}
auto& aCoreCount = *maybe__aCoreCount;
// Sentinel = 'aCoreCount'
if ((!(((&(reader__)))->ReadSentinel(350028788)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvInitDecode(std::move(aCodecSettings), std::move(aCodecSpecific), std::move(aCoreCount));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Msg_Decode__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Decode", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aInputFrame = IPC::ReadParam<GMPVideoEncodedFrameData>((&(reader__)));
if (!maybe__aInputFrame) {
FatalError("Error deserializing 'GMPVideoEncodedFrameData'");
return MsgValueError;
}
auto& aInputFrame = *maybe__aInputFrame;
// Sentinel = 'aInputFrame'
if ((!(((&(reader__)))->ReadSentinel(434177117)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoEncodedFrameData'");
return MsgValueError;
}
auto maybe__aMissingFrames = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aMissingFrames) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aMissingFrames = *maybe__aMissingFrames;
// Sentinel = 'aMissingFrames'
if ((!(((&(reader__)))->ReadSentinel(695731610)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
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__aRenderTimeMs = IPC::ReadParam<int64_t>((&(reader__)));
if (!maybe__aRenderTimeMs) {
FatalError("Error deserializing 'int64_t'");
return MsgValueError;
}
auto& aRenderTimeMs = *maybe__aRenderTimeMs;
// Sentinel = 'aRenderTimeMs'
if ((!(((&(reader__)))->ReadSentinel(590611729)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvDecode(std::move(aInputFrame), std::move(aMissingFrames), std::move(aCodecSpecificInfo), std::move(aRenderTimeMs));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Msg_Reset__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Reset", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvReset();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Msg_Drain__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Drain", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvDrain();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Msg_DecodingComplete__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DecodingComplete", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvDecodingComplete();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Msg_ChildShmemForPool__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PGMPVideoDecoderChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ChildShmemForPool", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aFrameBuffer = IPC::ReadParam<Shmem>((&(reader__)));
if (!maybe__aFrameBuffer) {
FatalError("Error deserializing 'Shmem'");
return MsgValueError;
}
auto& aFrameBuffer = *maybe__aFrameBuffer;
// Sentinel = 'aFrameBuffer'
if ((!(((&(reader__)))->ReadSentinel(494732455)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvChildShmemForPool(std::move(aFrameBuffer));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PGMPVideoDecoder::Reply___delete____ID:
{
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PGMPVideoDecoderChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PGMPVideoDecoderChild::Result
{
return MsgNotKnown;
}
auto PGMPVideoDecoderChild::DoomSubtree() -> void
{
SetDoomed();
}
auto PGMPVideoDecoderChild::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace gmp
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gmp::PGMPVideoDecoderChild*>::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::PGMPVideoDecoderChild*>::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, "PGMPVideoDecoder", PGMPVideoDecoderMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::gmp::PGMPVideoDecoderChild*>(actor.ref());
}
return {};
}
} // namespace IPC