//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/gmp/PGMPVideoDecoderParent.h"
#include "GMPMessageUtils.h"
#include "GMPVideoDecoderChild.h"
#include "mozilla/ProfilerLabels.h"

#include "mozilla/gmp/PGMPContentParent.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 PGMPVideoDecoderParent::PGMPVideoDecoderParent() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ParentSide)
{
    MOZ_COUNT_CTOR(PGMPVideoDecoderParent);
}

PGMPVideoDecoderParent::~PGMPVideoDecoderParent()
{
    MOZ_COUNT_DTOR(PGMPVideoDecoderParent);
}

auto PGMPVideoDecoderParent::ActorAlloc() -> void
{
    AddRef();
}

auto PGMPVideoDecoderParent::ActorDealloc() -> void
{
    Release();
}

auto PGMPVideoDecoderParent::OtherPid() const -> ::base::ProcessId
{
    ::base::ProcessId pid =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
    MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
    return pid;
}

auto PGMPVideoDecoderParent::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

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

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

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

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

auto PGMPVideoDecoderParent::SendInitDecode(
        const GMPVideoCodec& aCodecSettings,
        mozilla::Span<uint8_t const> aCodecSpecific,
        const int32_t& aCoreCount) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_InitDecode(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aCodecSettings);
    // Sentinel = 'aCodecSettings'
    ((&(writer__)))->WriteSentinel(674629009);
    IPC::WriteParam((&(writer__)), aCodecSpecific);
    // Sentinel = 'aCodecSpecific'
    ((&(writer__)))->WriteSentinel(665847142);
    IPC::WriteParam((&(writer__)), aCoreCount);
    // Sentinel = 'aCoreCount'
    ((&(writer__)))->WriteSentinel(350028788);


    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InitDecode", OTHER);

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

auto PGMPVideoDecoderParent::SendGiveShmem(Shmem&& aOutputShmem) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_GiveShmem(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_GiveShmem", OTHER);

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

auto PGMPVideoDecoderParent::SendDecode(
        const GMPVideoEncodedFrameData& aInputFrame,
        Shmem&& aInputShmem,
        const bool& aMissingFrames,
        mozilla::Span<uint8_t const> aCodecSpecificInfo,
        const int64_t& aRenderTimeMs) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Decode(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aInputFrame);
    // Sentinel = 'aInputFrame'
    ((&(writer__)))->WriteSentinel(434177117);
    IPC::WriteParam((&(writer__)), std::move(aInputShmem));
    // Sentinel = 'aInputShmem'
    ((&(writer__)))->WriteSentinel(437650540);
    IPC::WriteParam((&(writer__)), aMissingFrames);
    // Sentinel = 'aMissingFrames'
    ((&(writer__)))->WriteSentinel(695731610);
    IPC::WriteParam((&(writer__)), aCodecSpecificInfo);
    // Sentinel = 'aCodecSpecificInfo'
    ((&(writer__)))->WriteSentinel(1089537778);
    IPC::WriteParam((&(writer__)), aRenderTimeMs);
    // Sentinel = 'aRenderTimeMs'
    ((&(writer__)))->WriteSentinel(590611729);


    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Decode", OTHER);

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

auto PGMPVideoDecoderParent::SendReset() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Reset(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Reset", OTHER);

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

auto PGMPVideoDecoderParent::SendDrain() -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoDecoder::Msg_Drain(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Drain", OTHER);

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

auto PGMPVideoDecoderParent::Send__delete__(PGMPVideoDecoderParent* 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::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PGMPVideoDecoderParent",
            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 PGMPVideoDecoderParent::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PGMPVideoDecoderParent::OnMessageReceived(const Message& msg__) -> PGMPVideoDecoderParent::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::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_ReturnShmem__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReturnShmem", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            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;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvReturnShmem(std::move(aInputShmem));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_DecodedData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DecodedData", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aDecodedFrame = *maybe__aDecodedFrame;
            // Sentinel = 'aDecodedFrame'
            if ((!(((&(reader__)))->ReadSentinel(571016437)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoi420FrameData'");
                return MsgValueError;
            }
            auto maybe__aDecodedData = IPC::ReadParam<nsTArray<uint8_t>>((&(reader__)));
            if (!maybe__aDecodedData) {
                FatalError("Error deserializing 'uint8_t[]'");
                return MsgValueError;

            }
            auto& aDecodedData = *maybe__aDecodedData;
            // Sentinel = 'aDecodedData'
            if ((!(((&(reader__)))->ReadSentinel(485688452)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvDecodedData(std::move(aDecodedFrame), std::move(aDecodedData));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_DecodedShmem__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DecodedShmem", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aDecodedFrame = *maybe__aDecodedFrame;
            // Sentinel = 'aDecodedFrame'
            if ((!(((&(reader__)))->ReadSentinel(571016437)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoi420FrameData'");
                return MsgValueError;
            }
            auto maybe__aDecodedShmem = IPC::ReadParam<Shmem>((&(reader__)));
            if (!maybe__aDecodedShmem) {
                FatalError("Error deserializing 'Shmem'");
                return MsgValueError;

            }
            auto& aDecodedShmem = *maybe__aDecodedShmem;
            // Sentinel = 'aDecodedShmem'
            if ((!(((&(reader__)))->ReadSentinel(574489860)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvDecodedShmem(std::move(aDecodedFrame), std::move(aDecodedShmem));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aPictureId = *maybe__aPictureId;
            // Sentinel = 'aPictureId'
            if ((!(((&(reader__)))->ReadSentinel(361694187)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvReceivedDecodedReferenceFrame(std::move(aPictureId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_ReceivedDecodedFrame__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedFrame", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aPictureId = *maybe__aPictureId;
            // Sentinel = 'aPictureId'
            if ((!(((&(reader__)))->ReadSentinel(361694187)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvReceivedDecodedFrame(std::move(aPictureId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_InputDataExhausted__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InputDataExhausted", OTHER);

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

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_DrainComplete__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DrainComplete", OTHER);

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

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_ResetComplete__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ResetComplete", OTHER);

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

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_Error__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Error", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aErr = *maybe__aErr;
            // Sentinel = 'aErr'
            if ((!(((&(reader__)))->ReadSentinel(61669771)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPErr'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvError(std::move(aErr));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PGMPVideoDecoder::Msg_Shutdown__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoder", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PGMPVideoDecoderParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Shutdown", OTHER);

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

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

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



} // namespace gmp
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::gmp::PGMPVideoDecoderParent*>::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::PGMPVideoDecoderParent*>::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::PGMPVideoDecoderParent*>(actor);
}

} // namespace IPC
