Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/PMFMediaEngineChild.h"
#include "mozilla/MFMediaEngineChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/MediaIPCUtils.h"
#include "mozilla/PRemoteDecoderManagerChild.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 {
MOZ_IMPLICIT PMFMediaEngineChild::PMFMediaEngineChild() :
mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PMFMediaEngineChild);
}
PMFMediaEngineChild::~PMFMediaEngineChild()
{
MOZ_COUNT_DTOR(PMFMediaEngineChild);
}
auto PMFMediaEngineChild::ActorAlloc() -> void
{
}
auto PMFMediaEngineChild::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(kProtocolId, this);
}
}
auto PMFMediaEngineChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PMFMediaEngineChild::OtherChildID() const -> ::GeckoChildID
{
::GeckoChildID childID =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
MOZ_RELEASE_ASSERT(childID != -1);
return childID;
}
auto PMFMediaEngineChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}
auto PMFMediaEngineChild::Manager() const -> PRemoteDecoderManagerChild*
{
return static_cast<PRemoteDecoderManagerChild*>(IProtocol::Manager());
}
auto PMFMediaEngineChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PMFMediaEngineChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PMFMediaEngineChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PMFMediaEngineChild::SendInitMediaEngine(
const MediaEngineInfoIPDL& info,
mozilla::ipc::ResolveCallback<uint64_t>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_InitMediaEngine(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), info);
// Sentinel = 'info'
((&(writer__)))->WriteSentinel(70058413);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_InitMediaEngine", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMFMediaEngine::Reply_InitMediaEngine__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__id = IPC::ReadParam<uint64_t>(aReader);
if (!maybe__id) {
(aReader)->FatalError("Error deserializing 'uint64_t'");
return MsgValueError;
}
auto& id = *maybe__id;
// Sentinel = 'id'
if ((!((aReader)->ReadSentinel(20447438)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(id));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMFMediaEngineChild::SendInitMediaEngine(const MediaEngineInfoIPDL& info) -> RefPtr<InitMediaEnginePromise>
{
RefPtr<MozPromise<uint64_t, ResponseRejectReason, true>::Private> promise__ = new MozPromise<uint64_t, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendInitMediaEngine(std::move(info), [promise__](uint64_t&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMFMediaEngineChild::SendPlay() -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_Play(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_Play", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendPause() -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_Pause(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_Pause", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendSeek(const double& targetTimeInSecond) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_Seek(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), targetTimeInSecond);
// Sentinel = 'targetTimeInSecond'
((&(writer__)))->WriteSentinel(1154352938);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_Seek", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendSetCDMProxyId(const uint64_t& type) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_SetCDMProxyId(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), type);
// Sentinel = 'type'
((&(writer__)))->WriteSentinel(75760067);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_SetCDMProxyId", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendSetVolume(const double& volume) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_SetVolume(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), volume);
// Sentinel = 'volume'
((&(writer__)))->WriteSentinel(155386521);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_SetVolume", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendSetPlaybackRate(const double& playbackRate) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_SetPlaybackRate(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), playbackRate);
// Sentinel = 'playbackRate'
((&(writer__)))->WriteSentinel(533923028);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_SetPlaybackRate", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendSetLooping(const bool& looping) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_SetLooping(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), looping);
// Sentinel = 'looping'
((&(writer__)))->WriteSentinel(201196281);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_SetLooping", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendNotifyEndOfStream(const TrackType& type) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_NotifyEndOfStream(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), type);
// Sentinel = 'type'
((&(writer__)))->WriteSentinel(75760067);
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_NotifyEndOfStream", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::SendShutdown() -> bool
{
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg_Shutdown(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_Shutdown", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFMediaEngineChild::Send__delete__(PMFMediaEngineChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PMFMediaEngine::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PMFMediaEngineChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PMFMediaEngineChild::OnMessageReceived(const Message& msg__) -> PMFMediaEngineChild::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 PMFMediaEngine::Reply_InitMediaEngine__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_InitMediaEngine", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMFMediaEngine::Reply___delete____ID:
{
return MsgProcessed;
}
case PMFMediaEngine::Msg_NotifyEvent__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_NotifyEvent", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__event = IPC::ReadParam<MFMediaEngineEvent>((&(reader__)));
if (!maybe__event) {
FatalError("Error deserializing 'MFMediaEngineEvent'");
return MsgValueError;
}
auto& event = *maybe__event;
// Sentinel = 'event'
if ((!(((&(reader__)))->ReadSentinel(106234403)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MFMediaEngineEvent'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvNotifyEvent(std::move(event));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFMediaEngine::Msg_NotifyError__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_NotifyError", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__error = IPC::ReadParam<MediaResult>((&(reader__)));
if (!maybe__error) {
FatalError("Error deserializing 'MediaResult'");
return MsgValueError;
}
auto& error = *maybe__error;
// Sentinel = 'error'
if ((!(((&(reader__)))->ReadSentinel(107741739)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MediaResult'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvNotifyError(std::move(error));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFMediaEngine::Msg_UpdateCurrentTime__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_UpdateCurrentTime", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__currentTimeInSecond = IPC::ReadParam<double>((&(reader__)));
if (!maybe__currentTimeInSecond) {
FatalError("Error deserializing 'double'");
return MsgValueError;
}
auto& currentTimeInSecond = *maybe__currentTimeInSecond;
// Sentinel = 'currentTimeInSecond'
if ((!(((&(reader__)))->ReadSentinel(1304102822)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'double'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvUpdateCurrentTime(std::move(currentTimeInSecond));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFMediaEngine::Msg_RequestSample__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_RequestSample", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__type = IPC::ReadParam<TrackType>((&(reader__)));
if (!maybe__type) {
FatalError("Error deserializing 'TrackType'");
return MsgValueError;
}
auto& type = *maybe__type;
// Sentinel = 'type'
if ((!(((&(reader__)))->ReadSentinel(75760067)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'TrackType'");
return MsgValueError;
}
auto maybe__isEnough = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__isEnough) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& isEnough = *maybe__isEnough;
// Sentinel = 'isEnough'
if ((!(((&(reader__)))->ReadSentinel(243925827)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvRequestSample(std::move(type), std::move(isEnough));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFMediaEngine::Msg_UpdateStatisticData__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_UpdateStatisticData", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__data = IPC::ReadParam<StatisticData>((&(reader__)));
if (!maybe__data) {
FatalError("Error deserializing 'StatisticData'");
return MsgValueError;
}
auto& data = *maybe__data;
// Sentinel = 'data'
if ((!(((&(reader__)))->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'StatisticData'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvUpdateStatisticData(std::move(data));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFMediaEngine::Msg_NotifyResizing__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFMediaEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFMediaEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFMediaEngine::Msg_NotifyResizing", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__width = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__width) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& width = *maybe__width;
// Sentinel = 'width'
if ((!(((&(reader__)))->ReadSentinel(108528161)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__height = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__height) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& height = *maybe__height;
// Sentinel = 'height'
if ((!(((&(reader__)))->ReadSentinel(143393402)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<MFMediaEngineChild*>(this))->RecvNotifyResizing(std::move(width), std::move(height));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PMFMediaEngineChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PMFMediaEngineChild::Result
{
return MsgNotKnown;
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::PMFMediaEngineChild*>::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::PMFMediaEngineChild*>::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, "PMFMediaEngine", PMFMediaEngineMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::PMFMediaEngineChild*>(actor.ref());
}
return {};
}
} // namespace IPC