Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PRemoteDecoderManager_h
#define PRemoteDecoderManager_h
#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"
// Headers for typedefs
#include "MediaInfo.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/layers/LayersSurfaces.h"
#include "mozilla/PMediaDecoderParams.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct VideoDecoderInfoIPDL|
//
namespace mozilla {
class VideoDecoderInfoIPDL final
{
private:
typedef ::mozilla::VideoInfo VideoInfo;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
VideoDecoderInfoIPDL() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT VideoDecoderInfoIPDL(
const VideoInfo& _videoInfo,
const float& _framerate) :
videoInfo_(_videoInfo),
framerate_(_framerate)
{
}
MOZ_IMPLICIT VideoDecoderInfoIPDL(
VideoInfo&& _videoInfo,
float&& _framerate) :
videoInfo_(std::move(_videoInfo)),
framerate_(std::move(_framerate))
{
}
VideoInfo&
videoInfo()
{
return videoInfo_;
}
const VideoInfo&
videoInfo() const
{
return videoInfo_;
}
float&
framerate()
{
return framerate_;
}
const float&
framerate() const
{
return framerate_;
}
private:
::mozilla::ipc::IPDLStructMember<VideoInfo> videoInfo_;
::mozilla::ipc::IPDLStructMember<float> framerate_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::VideoDecoderInfoIPDL>
{
typedef ::mozilla::VideoDecoderInfoIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union RemoteDecoderInfoIPDL|
//
namespace mozilla {
class RemoteDecoderInfoIPDL final
{
public:
enum Type {
T__None,
TAudioInfo = 1,
TVideoDecoderInfoIPDL,
T__Last = TVideoDecoderInfoIPDL
};
private:
typedef ::mozilla::AudioInfo AudioInfo;
typedef ::mozilla::VideoDecoderInfoIPDL VideoDecoderInfoIPDL;
typedef AudioInfo AudioInfo__tdef;
typedef VideoDecoderInfoIPDL VideoDecoderInfoIPDL__tdef;
AudioInfo*
ptr_AudioInfo()
{
return (&(mVAudioInfo));
}
const AudioInfo*
constptr_AudioInfo() const
{
return (&(mVAudioInfo));
}
VideoDecoderInfoIPDL*
ptr_VideoDecoderInfoIPDL()
{
return (&(mVVideoDecoderInfoIPDL));
}
const VideoDecoderInfoIPDL*
constptr_VideoDecoderInfoIPDL() const
{
return (&(mVVideoDecoderInfoIPDL));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT RemoteDecoderInfoIPDL() :
mType(T__None)
{
}
MOZ_IMPLICIT RemoteDecoderInfoIPDL(const AudioInfo& aOther);
MOZ_IMPLICIT RemoteDecoderInfoIPDL(AudioInfo&& aOther);
MOZ_IMPLICIT RemoteDecoderInfoIPDL(const VideoDecoderInfoIPDL& aOther);
MOZ_IMPLICIT RemoteDecoderInfoIPDL(VideoDecoderInfoIPDL&& aOther);
MOZ_IMPLICIT RemoteDecoderInfoIPDL(const RemoteDecoderInfoIPDL& aOther);
MOZ_IMPLICIT RemoteDecoderInfoIPDL(RemoteDecoderInfoIPDL&& aOther);
~RemoteDecoderInfoIPDL();
Type
type() const
{
return mType;
}
RemoteDecoderInfoIPDL&
operator=(const AudioInfo& aRhs);
RemoteDecoderInfoIPDL&
operator=(AudioInfo&& aRhs);
RemoteDecoderInfoIPDL&
operator=(const VideoDecoderInfoIPDL& aRhs);
RemoteDecoderInfoIPDL&
operator=(VideoDecoderInfoIPDL&& aRhs);
RemoteDecoderInfoIPDL&
operator=(const RemoteDecoderInfoIPDL& aRhs);
RemoteDecoderInfoIPDL&
operator=(RemoteDecoderInfoIPDL&& aRhs);
AudioInfo&
get_AudioInfo()
{
AssertSanity(TAudioInfo);
return (*(ptr_AudioInfo()));
}
const AudioInfo&
get_AudioInfo() const
{
AssertSanity(TAudioInfo);
return (*(constptr_AudioInfo()));
}
operator AudioInfo&()
{
return get_AudioInfo();
}
operator const AudioInfo&() const
{
return get_AudioInfo();
}
VideoDecoderInfoIPDL&
get_VideoDecoderInfoIPDL()
{
AssertSanity(TVideoDecoderInfoIPDL);
return (*(ptr_VideoDecoderInfoIPDL()));
}
const VideoDecoderInfoIPDL&
get_VideoDecoderInfoIPDL() const
{
AssertSanity(TVideoDecoderInfoIPDL);
return (*(constptr_VideoDecoderInfoIPDL()));
}
operator VideoDecoderInfoIPDL&()
{
return get_VideoDecoderInfoIPDL();
}
operator const VideoDecoderInfoIPDL&() const
{
return get_VideoDecoderInfoIPDL();
}
private:
union {
AudioInfo mVAudioInfo;
VideoDecoderInfoIPDL mVVideoDecoderInfoIPDL;
};
Type mType;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteDecoderInfoIPDL>
{
typedef ::mozilla::RemoteDecoderInfoIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
class PRemoteDecoderManagerParent;
} // namespace mozilla
namespace mozilla {
class PRemoteDecoderManagerChild;
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PRemoteDecoderManagerChild and PRemoteDecoderManagerParent
//
namespace mozilla {
namespace PRemoteDecoderManager {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::PRemoteDecoderManagerParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::PRemoteDecoderManagerChild>* aChild);
enum MessageType {
PRemoteDecoderManagerStart = PRemoteDecoderManagerMsgStart << 16,
Msg_PRemoteDecoderConstructor__ID,
Reply_PRemoteDecoderConstructor__ID,
Msg_Readback__ID,
Reply_Readback__ID,
Msg_DeallocateSurfaceDescriptorGPUVideo__ID,
PRemoteDecoderManagerEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_PRemoteDecoderConstructor(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PRemoteDecoderConstructor(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_Readback(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Readback(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_DeallocateSurfaceDescriptorGPUVideo(int32_t routingId);
} // namespace PRemoteDecoderManager
} // namespace mozilla
#endif // ifndef PRemoteDecoderManager_h