Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/MediaIPCUtils.h"
#include "mozilla/PRemoteDecoderManagerParent.h"
#include "mozilla/PRemoteDecoderManagerChild.h"
#include "mozilla/dom/MediaIPCUtils.h"
#include "gfxipc/ShadowLayerUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/WebRenderMessageUtils.h"
#include "mozilla/PRemoteDecoder.h"
#include "mozilla/PRemoteDecoderParent.h"
#include "mozilla/PRemoteDecoderChild.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 PRemoteDecoder {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::PRemoteDecoderParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::PRemoteDecoderChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestInfo, aChildDestInfo, aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_Construct(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Construct__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Construct(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Construct__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Init(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Init__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Init(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Init__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Decode(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Decode__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Decode(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Decode__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Flush(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Flush__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Flush(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Flush__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Drain(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Drain__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Drain(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Drain__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Shutdown(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Shutdown__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Shutdown(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Shutdown__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_SetSeekThreshold(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_SetSeekThreshold__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
} // namespace PRemoteDecoder
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union DecodedOutputIPDL|
//
namespace mozilla {
auto DecodedOutputIPDL::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TArrayOfRemoteAudioData:
{
(ptr_ArrayOfRemoteAudioData())->~ArrayOfRemoteAudioData__tdef();
break;
}
case TArrayOfRemoteVideoData:
{
(ptr_ArrayOfRemoteVideoData())->~ArrayOfRemoteVideoData__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(ArrayOfRemoteAudioData* aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(aOther);
mType = TArrayOfRemoteAudioData;
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(RefPtr<ArrayOfRemoteAudioData>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(std::move(aOther));
mType = TArrayOfRemoteAudioData;
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(ArrayOfRemoteVideoData* aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(aOther);
mType = TArrayOfRemoteVideoData;
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(RefPtr<ArrayOfRemoteVideoData>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(std::move(aOther));
mType = TArrayOfRemoteVideoData;
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(const DecodedOutputIPDL& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TArrayOfRemoteAudioData:
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>((aOther).get_ArrayOfRemoteAudioData());
break;
}
case TArrayOfRemoteVideoData:
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>((aOther).get_ArrayOfRemoteVideoData());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT DecodedOutputIPDL::DecodedOutputIPDL(DecodedOutputIPDL&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TArrayOfRemoteAudioData:
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(std::move((aOther).get_ArrayOfRemoteAudioData()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfRemoteVideoData:
{
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(std::move((aOther).get_ArrayOfRemoteVideoData()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
DecodedOutputIPDL::~DecodedOutputIPDL()
{
MaybeDestroy();
}
auto DecodedOutputIPDL::operator=(ArrayOfRemoteAudioData* aRhs) -> DecodedOutputIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(aRhs);
mType = TArrayOfRemoteAudioData;
return (*(this));
}
auto DecodedOutputIPDL::operator=(RefPtr<ArrayOfRemoteAudioData>&& aRhs) -> DecodedOutputIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(std::move(aRhs));
mType = TArrayOfRemoteAudioData;
return (*(this));
}
auto DecodedOutputIPDL::operator=(ArrayOfRemoteVideoData* aRhs) -> DecodedOutputIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(aRhs);
mType = TArrayOfRemoteVideoData;
return (*(this));
}
auto DecodedOutputIPDL::operator=(RefPtr<ArrayOfRemoteVideoData>&& aRhs) -> DecodedOutputIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(std::move(aRhs));
mType = TArrayOfRemoteVideoData;
return (*(this));
}
auto DecodedOutputIPDL::operator=(const DecodedOutputIPDL& aRhs) -> DecodedOutputIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TArrayOfRemoteAudioData:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>((aRhs).get_ArrayOfRemoteAudioData());
break;
}
case TArrayOfRemoteVideoData:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>((aRhs).get_ArrayOfRemoteVideoData());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto DecodedOutputIPDL::operator=(DecodedOutputIPDL&& aRhs) -> DecodedOutputIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TArrayOfRemoteAudioData:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteAudioData()) RefPtr<ArrayOfRemoteAudioData>(std::move((aRhs).get_ArrayOfRemoteAudioData()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfRemoteVideoData:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfRemoteVideoData()) RefPtr<ArrayOfRemoteVideoData>(std::move((aRhs).get_ArrayOfRemoteVideoData()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::DecodedOutputIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::DecodedOutputIPDL union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'DecodedOutputIPDL'
(aWriter)->WriteSentinel(984417891);
switch (type) {
case union__::TArrayOfRemoteAudioData:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfRemoteAudioData());
// Sentinel = 'TArrayOfRemoteAudioData'
(aWriter)->WriteSentinel(1771571425);
return;
}
case union__::TArrayOfRemoteVideoData:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfRemoteVideoData());
// Sentinel = 'TArrayOfRemoteVideoData'
(aWriter)->WriteSentinel(1776093414);
return;
}
default:
{
aWriter->FatalError("unknown variant of union DecodedOutputIPDL");
return;
}
}
}
auto ParamTraits<::mozilla::DecodedOutputIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::DecodedOutputIPDL union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union DecodedOutputIPDL");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'DecodedOutputIPDL'
if ((!((aReader)->ReadSentinel(984417891)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union DecodedOutputIPDL");
return {};
}
switch (type) {
case union__::TArrayOfRemoteAudioData:
{
auto maybe__tmp = IPC::ReadParam<RefPtr<::mozilla::ArrayOfRemoteAudioData>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfRemoteAudioData of union DecodedOutputIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfRemoteAudioData'
if ((!((aReader)->ReadSentinel(1771571425)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfRemoteAudioData of union DecodedOutputIPDL");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfRemoteVideoData:
{
auto maybe__tmp = IPC::ReadParam<RefPtr<::mozilla::ArrayOfRemoteVideoData>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfRemoteVideoData of union DecodedOutputIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfRemoteVideoData'
if ((!((aReader)->ReadSentinel(1776093414)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfRemoteVideoData of union DecodedOutputIPDL");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union DecodedOutputIPDL");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct InitCompletionIPDL|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::InitCompletionIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).type());
// Sentinel = 'type'
(aWriter)->WriteSentinel(75760067);
IPC::WriteParam(aWriter, (aVar).decoderDescription());
// Sentinel = 'decoderDescription'
(aWriter)->WriteSentinel(1150093147);
IPC::WriteParam(aWriter, (aVar).decoderProcessName());
// Sentinel = 'decoderProcessName'
(aWriter)->WriteSentinel(1151469367);
IPC::WriteParam(aWriter, (aVar).decoderCodecName());
// Sentinel = 'decoderCodecName'
(aWriter)->WriteSentinel(892929590);
IPC::WriteParam(aWriter, (aVar).hardware());
// Sentinel = 'hardware'
(aWriter)->WriteSentinel(248972111);
IPC::WriteParam(aWriter, (aVar).hardwareReason());
// Sentinel = 'hardwareReason'
(aWriter)->WriteSentinel(717161911);
IPC::WriteParam(aWriter, (aVar).conversion());
// Sentinel = 'conversion'
(aWriter)->WriteSentinel(392430663);
IPC::WriteParam(aWriter, (aVar).shouldDecoderAlwaysBeRecycled());
// Sentinel = 'shouldDecoderAlwaysBeRecycled'
(aWriter)->WriteSentinel(2923760521);
}
auto ParamTraits<::mozilla::InitCompletionIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___type = IPC::ReadParam<::mozilla::TrackInfo::TrackType>(aReader);
if (!maybe___type) {
aReader->FatalError("Error deserializing 'type' (TrackType) member of 'InitCompletionIPDL'");
return {};
}
auto& _type = *maybe___type;
// Sentinel = 'type'
if ((!((aReader)->ReadSentinel(75760067)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'type' (TrackType) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___decoderDescription = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___decoderDescription) {
aReader->FatalError("Error deserializing 'decoderDescription' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto& _decoderDescription = *maybe___decoderDescription;
// Sentinel = 'decoderDescription'
if ((!((aReader)->ReadSentinel(1150093147)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'decoderDescription' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___decoderProcessName = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___decoderProcessName) {
aReader->FatalError("Error deserializing 'decoderProcessName' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto& _decoderProcessName = *maybe___decoderProcessName;
// Sentinel = 'decoderProcessName'
if ((!((aReader)->ReadSentinel(1151469367)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'decoderProcessName' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___decoderCodecName = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___decoderCodecName) {
aReader->FatalError("Error deserializing 'decoderCodecName' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto& _decoderCodecName = *maybe___decoderCodecName;
// Sentinel = 'decoderCodecName'
if ((!((aReader)->ReadSentinel(892929590)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'decoderCodecName' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___hardware = IPC::ReadParam<bool>(aReader);
if (!maybe___hardware) {
aReader->FatalError("Error deserializing 'hardware' (bool) member of 'InitCompletionIPDL'");
return {};
}
auto& _hardware = *maybe___hardware;
// Sentinel = 'hardware'
if ((!((aReader)->ReadSentinel(248972111)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'hardware' (bool) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___hardwareReason = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___hardwareReason) {
aReader->FatalError("Error deserializing 'hardwareReason' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto& _hardwareReason = *maybe___hardwareReason;
// Sentinel = 'hardwareReason'
if ((!((aReader)->ReadSentinel(717161911)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'hardwareReason' (nsCString) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___conversion = IPC::ReadParam<::mozilla::MediaDataDecoder::ConversionRequired>(aReader);
if (!maybe___conversion) {
aReader->FatalError("Error deserializing 'conversion' (ConversionRequired) member of 'InitCompletionIPDL'");
return {};
}
auto& _conversion = *maybe___conversion;
// Sentinel = 'conversion'
if ((!((aReader)->ReadSentinel(392430663)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'conversion' (ConversionRequired) member of 'InitCompletionIPDL'");
return {};
}
auto maybe___shouldDecoderAlwaysBeRecycled = IPC::ReadParam<bool>(aReader);
if (!maybe___shouldDecoderAlwaysBeRecycled) {
aReader->FatalError("Error deserializing 'shouldDecoderAlwaysBeRecycled' (bool) member of 'InitCompletionIPDL'");
return {};
}
auto& _shouldDecoderAlwaysBeRecycled = *maybe___shouldDecoderAlwaysBeRecycled;
// Sentinel = 'shouldDecoderAlwaysBeRecycled'
if ((!((aReader)->ReadSentinel(2923760521)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'shouldDecoderAlwaysBeRecycled' (bool) member of 'InitCompletionIPDL'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_type),
std::move(_decoderDescription),
std::move(_decoderProcessName),
std::move(_decoderCodecName),
std::move(_hardware),
std::move(_hardwareReason),
std::move(_conversion),
std::move(_shouldDecoderAlwaysBeRecycled)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union InitResultIPDL|
//
namespace mozilla {
auto InitResultIPDL::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TMediaResult:
{
(ptr_MediaResult())->~MediaResult__tdef();
break;
}
case TInitCompletionIPDL:
{
(ptr_InitCompletionIPDL())->~InitCompletionIPDL__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(const MediaResult& aOther)
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aOther);
mType = TMediaResult;
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(MediaResult&& aOther)
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aOther));
mType = TMediaResult;
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(const InitCompletionIPDL& aOther)
{
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(aOther);
mType = TInitCompletionIPDL;
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(InitCompletionIPDL&& aOther)
{
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(std::move(aOther));
mType = TInitCompletionIPDL;
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(const InitResultIPDL& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TMediaResult:
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aOther).get_MediaResult());
break;
}
case TInitCompletionIPDL:
{
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL((aOther).get_InitCompletionIPDL());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT InitResultIPDL::InitResultIPDL(InitResultIPDL&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TMediaResult:
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aOther).get_MediaResult()));
(aOther).MaybeDestroy();
break;
}
case TInitCompletionIPDL:
{
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(std::move((aOther).get_InitCompletionIPDL()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
InitResultIPDL::~InitResultIPDL()
{
MaybeDestroy();
}
auto InitResultIPDL::operator=(const MediaResult& aRhs) -> InitResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aRhs);
mType = TMediaResult;
return (*(this));
}
auto InitResultIPDL::operator=(MediaResult&& aRhs) -> InitResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aRhs));
mType = TMediaResult;
return (*(this));
}
auto InitResultIPDL::operator=(const InitCompletionIPDL& aRhs) -> InitResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(aRhs);
mType = TInitCompletionIPDL;
return (*(this));
}
auto InitResultIPDL::operator=(InitCompletionIPDL&& aRhs) -> InitResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(std::move(aRhs));
mType = TInitCompletionIPDL;
return (*(this));
}
auto InitResultIPDL::operator=(const InitResultIPDL& aRhs) -> InitResultIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMediaResult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aRhs).get_MediaResult());
break;
}
case TInitCompletionIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL((aRhs).get_InitCompletionIPDL());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto InitResultIPDL::operator=(InitResultIPDL&& aRhs) -> InitResultIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMediaResult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aRhs).get_MediaResult()));
(aRhs).MaybeDestroy();
break;
}
case TInitCompletionIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitCompletionIPDL()) InitCompletionIPDL(std::move((aRhs).get_InitCompletionIPDL()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::InitResultIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::InitResultIPDL union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'InitResultIPDL'
(aWriter)->WriteSentinel(684328253);
switch (type) {
case union__::TMediaResult:
{
IPC::WriteParam(aWriter, (aVar).get_MediaResult());
// Sentinel = 'TMediaResult'
(aWriter)->WriteSentinel(487326900);
return;
}
case union__::TInitCompletionIPDL:
{
IPC::WriteParam(aWriter, (aVar).get_InitCompletionIPDL());
// Sentinel = 'TInitCompletionIPDL'
(aWriter)->WriteSentinel(1228932908);
return;
}
default:
{
aWriter->FatalError("unknown variant of union InitResultIPDL");
return;
}
}
}
auto ParamTraits<::mozilla::InitResultIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::InitResultIPDL union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union InitResultIPDL");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'InitResultIPDL'
if ((!((aReader)->ReadSentinel(684328253)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union InitResultIPDL");
return {};
}
switch (type) {
case union__::TMediaResult:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::MediaResult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMediaResult of union InitResultIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMediaResult'
if ((!((aReader)->ReadSentinel(487326900)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMediaResult of union InitResultIPDL");
return {};
}
return std::move(tmp);
}
case union__::TInitCompletionIPDL:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::InitCompletionIPDL>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TInitCompletionIPDL of union InitResultIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TInitCompletionIPDL'
if ((!((aReader)->ReadSentinel(1228932908)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TInitCompletionIPDL of union InitResultIPDL");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union InitResultIPDL");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union DecodeResultIPDL|
//
namespace mozilla {
auto DecodeResultIPDL::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TMediaResult:
{
(ptr_MediaResult())->~MediaResult__tdef();
break;
}
case TDecodedOutputIPDL:
{
(ptr_DecodedOutputIPDL())->~DecodedOutputIPDL__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(const MediaResult& aOther)
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aOther);
mType = TMediaResult;
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(MediaResult&& aOther)
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aOther));
mType = TMediaResult;
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(const DecodedOutputIPDL& aOther)
{
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(aOther);
mType = TDecodedOutputIPDL;
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(DecodedOutputIPDL&& aOther)
{
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(std::move(aOther));
mType = TDecodedOutputIPDL;
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(const DecodeResultIPDL& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TMediaResult:
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aOther).get_MediaResult());
break;
}
case TDecodedOutputIPDL:
{
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL((aOther).get_DecodedOutputIPDL());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT DecodeResultIPDL::DecodeResultIPDL(DecodeResultIPDL&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TMediaResult:
{
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aOther).get_MediaResult()));
(aOther).MaybeDestroy();
break;
}
case TDecodedOutputIPDL:
{
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(std::move((aOther).get_DecodedOutputIPDL()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
DecodeResultIPDL::~DecodeResultIPDL()
{
MaybeDestroy();
}
auto DecodeResultIPDL::operator=(const MediaResult& aRhs) -> DecodeResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aRhs);
mType = TMediaResult;
return (*(this));
}
auto DecodeResultIPDL::operator=(MediaResult&& aRhs) -> DecodeResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aRhs));
mType = TMediaResult;
return (*(this));
}
auto DecodeResultIPDL::operator=(const DecodedOutputIPDL& aRhs) -> DecodeResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(aRhs);
mType = TDecodedOutputIPDL;
return (*(this));
}
auto DecodeResultIPDL::operator=(DecodedOutputIPDL&& aRhs) -> DecodeResultIPDL&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(std::move(aRhs));
mType = TDecodedOutputIPDL;
return (*(this));
}
auto DecodeResultIPDL::operator=(const DecodeResultIPDL& aRhs) -> DecodeResultIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMediaResult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aRhs).get_MediaResult());
break;
}
case TDecodedOutputIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL((aRhs).get_DecodedOutputIPDL());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto DecodeResultIPDL::operator=(DecodeResultIPDL&& aRhs) -> DecodeResultIPDL&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMediaResult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aRhs).get_MediaResult()));
(aRhs).MaybeDestroy();
break;
}
case TDecodedOutputIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_DecodedOutputIPDL()) DecodedOutputIPDL(std::move((aRhs).get_DecodedOutputIPDL()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::DecodeResultIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::DecodeResultIPDL union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'DecodeResultIPDL'
(aWriter)->WriteSentinel(865011181);
switch (type) {
case union__::TMediaResult:
{
IPC::WriteParam(aWriter, (aVar).get_MediaResult());
// Sentinel = 'TMediaResult'
(aWriter)->WriteSentinel(487326900);
return;
}
case union__::TDecodedOutputIPDL:
{
IPC::WriteParam(aWriter, (aVar).get_DecodedOutputIPDL());
// Sentinel = 'TDecodedOutputIPDL'
(aWriter)->WriteSentinel(1083573943);
return;
}
default:
{
aWriter->FatalError("unknown variant of union DecodeResultIPDL");
return;
}
}
}
auto ParamTraits<::mozilla::DecodeResultIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::DecodeResultIPDL union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union DecodeResultIPDL");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'DecodeResultIPDL'
if ((!((aReader)->ReadSentinel(865011181)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union DecodeResultIPDL");
return {};
}
switch (type) {
case union__::TMediaResult:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::MediaResult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMediaResult of union DecodeResultIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMediaResult'
if ((!((aReader)->ReadSentinel(487326900)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMediaResult of union DecodeResultIPDL");
return {};
}
return std::move(tmp);
}
case union__::TDecodedOutputIPDL:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::DecodedOutputIPDL>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TDecodedOutputIPDL of union DecodeResultIPDL");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TDecodedOutputIPDL'
if ((!((aReader)->ReadSentinel(1083573943)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TDecodedOutputIPDL of union DecodeResultIPDL");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union DecodeResultIPDL");
return {};
}
}
}
} // namespace IPC