//
// 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/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 PGMPVideoEncoderChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

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

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

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

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

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

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

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


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

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

auto PGMPVideoEncoderChild::SendEncodedShmem(
        const GMPVideoEncodedFrameData& aEncodedFrame,
        Shmem&& aEncodedShmem,
        mozilla::Span<uint8_t const> aCodecSpecificInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_EncodedShmem(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aEncodedFrame);
    // Sentinel = 'aEncodedFrame'
    ((&(writer__)))->WriteSentinel(578290943);
    IPC::WriteParam((&(writer__)), std::move(aEncodedShmem));
    // Sentinel = 'aEncodedShmem'
    ((&(writer__)))->WriteSentinel(581764366);
    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_EncodedShmem", OTHER);

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

auto PGMPVideoEncoderChild::SendEncodedData(
        const GMPVideoEncodedFrameData& aEncodedFrame,
        mozilla::Span<uint8_t const> aEncodedData,
        mozilla::Span<uint8_t const> aCodecSpecificInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_EncodedData(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aEncodedFrame);
    // Sentinel = 'aEncodedFrame'
    ((&(writer__)))->WriteSentinel(578290943);
    IPC::WriteParam((&(writer__)), aEncodedData);
    // Sentinel = 'aEncodedData'
    ((&(writer__)))->WriteSentinel(492307598);
    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_EncodedData", OTHER);

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

auto PGMPVideoEncoderChild::SendDroppedFrame(const uint64_t& aTimestamp) -> bool
{
    UniquePtr<IPC::Message> msg__ = PGMPVideoEncoder::Msg_DroppedFrame(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTimestamp);
    // Sentinel = 'aTimestamp'
    ((&(writer__)))->WriteSentinel(367330326);


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

auto PGMPVideoEncoderChild::OnMessageReceived(const Message& msg__) -> PGMPVideoEncoderChild::Result
{
    if (!CanSend()) {
        if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoder", mozilla::ipc::ChildSide)) {
            mozilla::ipc::LogMessageForProtocol(
                "PGMPVideoEncoderChild",
                this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                "Ignored message for dead actor",
                (&(msg__))->type(),
                mozilla::ipc::MessageDirection::eSending);
        }
        return MsgProcessed;

    }
    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<::mozilla::gmp::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_GiveShmem__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_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<::mozilla::gmp::GMPVideoEncoderChild*>(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 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__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__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<::mozilla::gmp::GMPVideoEncoderChild*>(this))->RecvEncode(std::move(aInputFrame), std::move(aInputShmem), 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<::mozilla::gmp::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<::mozilla::gmp::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<::mozilla::gmp::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___delete____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___delete__", OTHER);

            DoomSubtree();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::gmp::GMPVideoEncoderChild*>(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 PGMPVideoEncoderChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PGMPVideoEncoderChild::Result
{
    if (!CanSend()) {
        return MsgDropped;

    }
    return MsgNotKnown;
}



} // namespace gmp
} // namespace mozilla
