//
// 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/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 {


auto PGMPVideoDecoderChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

MOZ_IMPLICIT PGMPVideoDecoderChild::PGMPVideoDecoderChild() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, 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::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

auto PGMPVideoDecoderChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
    return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}

auto PGMPVideoDecoderChild::Manager() const -> PGMPContentChild*
{
    return static_cast<PGMPContentChild*>(IProtocol::Manager());
}

auto PGMPVideoDecoderChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    return {};
}

auto PGMPVideoDecoderChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    default:
        return nullptr;
    }
}

auto PGMPVideoDecoderChild::SendReturnShmem(Shmem&& aInputShmem) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_ReturnShmem(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aInputShmem));
    // Sentinel = 'aInputShmem'
    ((&(writer__)))->WriteSentinel(437650540);


    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_ReturnShmem", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGMPVideoDecoderChild::SendDecodedData(
        const GMPVideoi420FrameData& aDecodedFrame,
        mozilla::Span<uint8_t const> aDecodedData) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_DecodedData(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDecodedFrame);
    // Sentinel = 'aDecodedFrame'
    ((&(writer__)))->WriteSentinel(571016437);
    IPC::WriteParam((&(writer__)), aDecodedData);
    // Sentinel = 'aDecodedData'
    ((&(writer__)))->WriteSentinel(485688452);


    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_DecodedData", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PGMPVideoDecoderChild::SendDecodedShmem(
        const GMPVideoi420FrameData& aDecodedFrame,
        Shmem&& aDecodedShmem) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_DecodedShmem(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDecodedFrame);
    // Sentinel = 'aDecodedFrame'
    ((&(writer__)))->WriteSentinel(571016437);
    IPC::WriteParam((&(writer__)), std::move(aDecodedShmem));
    // Sentinel = 'aDecodedShmem'
    ((&(writer__)))->WriteSentinel(574489860);


    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_DecodedShmem", 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::DeallocManagee(
        mozilla::ipc::ProtocolId 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_GiveShmem__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_GiveShmem", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aOutputShmem = IPC::ReadParam<Shmem>((&(reader__)));
            if (!maybe__aOutputShmem) {
                FatalError("Error deserializing 'Shmem'");
                return MsgValueError;

            }
            auto& aOutputShmem = *maybe__aOutputShmem;
            // Sentinel = 'aOutputShmem'
            if ((!(((&(reader__)))->ReadSentinel(533398765)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->RecvGiveShmem(std::move(aOutputShmem));
            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__aInputShmem = IPC::ReadParam<Shmem>((&(reader__)));
            if (!maybe__aInputShmem) {
                FatalError("Error deserializing 'Shmem'");
                return MsgValueError;

            }
            auto& aInputShmem = *maybe__aInputShmem;
            // Sentinel = 'aInputShmem'
            if ((!(((&(reader__)))->ReadSentinel(437650540)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
                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(aInputShmem), 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___delete____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___delete__", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<GMPVideoDecoderChild*>(this))->Recv__delete__();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }


            this->ActorDisconnected(Deletion);

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PGMPVideoDecoderChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PGMPVideoDecoderChild::Result
{
    return MsgNotKnown;
}



} // namespace gmp
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gmp::PGMPVideoDecoderChild*>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
    // Sentinel = 'PGMPVideoDecoder'
    (aWriter)->WriteSentinel(792987106);
}

auto ParamTraits<::mozilla::gmp::PGMPVideoDecoderChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
    if (!maybe__actor) {
        aReader->FatalError("Error deserializing managed PGMPVideoDecoder actor");
        return {};

    }
    auto& actor = *maybe__actor;
    // Sentinel = 'PGMPVideoDecoder'
    if ((!((aReader)->ReadSentinel(792987106)))) {
        mozilla::ipc::SentinelReadError("Error deserializing managed PGMPVideoDecoder actor");
        return {};
    }

    if (actor && actor->GetProtocolId() != PGMPVideoDecoderMsgStart) {
        aReader->FatalError("Unexpected actor type (expected PGMPVideoDecoder)");

        return {};
    }
    return static_cast<::mozilla::gmp::PGMPVideoDecoderChild*>(actor);
}

} // namespace IPC
