#include "media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h"
#include "base/time/time.h"
#include "media/base/timestamp_constants.h"
#include "mojo/public/cpp/bindings/optional_as_pointer.h"
#if BUILDFLAG(USE_V4L2_CODEC)
#include "media/gpu/v4l2/v4l2_status.h"
#elif BUILDFLAG(USE_VAAPI)
#include "media/gpu/vaapi/vaapi_status.h"
#endif
namespace mojo {
gfx::ColorSpace::PrimaryID
StructTraits<media::stable::mojom::ColorSpaceDataView,
gfx::ColorSpace>::primaries(const gfx::ColorSpace& input) { … }
gfx::ColorSpace::TransferID
StructTraits<media::stable::mojom::ColorSpaceDataView,
gfx::ColorSpace>::transfer(const gfx::ColorSpace& input) { … }
gfx::ColorSpace::MatrixID
StructTraits<media::stable::mojom::ColorSpaceDataView, gfx::ColorSpace>::matrix(
const gfx::ColorSpace& input) { … }
gfx::ColorSpace::RangeID
StructTraits<media::stable::mojom::ColorSpaceDataView, gfx::ColorSpace>::range(
const gfx::ColorSpace& input) { … }
base::span<const float> StructTraits<
media::stable::mojom::ColorSpaceDataView,
gfx::ColorSpace>::custom_primary_matrix(const gfx::ColorSpace& input) { … }
base::span<const float>
StructTraits<media::stable::mojom::ColorSpaceDataView,
gfx::ColorSpace>::transfer_params(const gfx::ColorSpace& input) { … }
bool StructTraits<media::stable::mojom::ColorSpaceDataView, gfx::ColorSpace>::
Read(media::stable::mojom::ColorSpaceDataView input,
gfx::ColorSpace* output) { … }
gfx::PointF StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
primary_r(const gfx::HdrMetadataSmpteSt2086& input) { … }
gfx::PointF StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
primary_g(const gfx::HdrMetadataSmpteSt2086& input) { … }
gfx::PointF StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
primary_b(const gfx::HdrMetadataSmpteSt2086& input) { … }
gfx::PointF StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
white_point(const gfx::HdrMetadataSmpteSt2086& input) { … }
float StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
luminance_max(const gfx::HdrMetadataSmpteSt2086& input) { … }
float StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
luminance_min(const gfx::HdrMetadataSmpteSt2086& input) { … }
bool StructTraits<media::stable::mojom::ColorVolumeMetadataDataView,
gfx::HdrMetadataSmpteSt2086>::
Read(media::stable::mojom::ColorVolumeMetadataDataView data,
gfx::HdrMetadataSmpteSt2086* output) { … }
base::TimeDelta StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
timestamp(const scoped_refptr<media::DecoderBuffer>& input) { … }
base::TimeDelta StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
duration(const scoped_refptr<media::DecoderBuffer>& input) { … }
bool StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
is_end_of_stream(const scoped_refptr<media::DecoderBuffer>& input) { … }
uint32_t StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
data_size(const scoped_refptr<media::DecoderBuffer>& input) { … }
bool StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
is_key_frame(const scoped_refptr<media::DecoderBuffer>& input) { … }
std::vector<uint8_t> StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
raw_side_data(const scoped_refptr<media::DecoderBuffer>& input) { … }
std::unique_ptr<media::DecryptConfig>
StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
decrypt_config(const scoped_refptr<media::DecoderBuffer>& input) { … }
base::TimeDelta StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
front_discard(const scoped_refptr<media::DecoderBuffer>& input) { … }
base::TimeDelta StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
back_discard(const scoped_refptr<media::DecoderBuffer>& input) { … }
std::optional<media::DecoderBufferSideData>
StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
side_data(const scoped_refptr<media::DecoderBuffer>& input) { … }
bool StructTraits<media::stable::mojom::DecoderBufferDataView,
scoped_refptr<media::DecoderBuffer>>::
Read(media::stable::mojom::DecoderBufferDataView input,
scoped_refptr<media::DecoderBuffer>* output) { … }
uint64_t StructTraits<media::stable::mojom::DecoderBufferSideDataDataView,
media::DecoderBufferSideData>::
secure_handle(media::DecoderBufferSideData input) { … }
std::vector<uint32_t> StructTraits<
media::stable::mojom::DecoderBufferSideDataDataView,
media::DecoderBufferSideData>::spatial_layers(media::DecoderBufferSideData
input) { … }
std::vector<uint8_t> StructTraits<
media::stable::mojom::DecoderBufferSideDataDataView,
media::DecoderBufferSideData>::alpha_data(media::DecoderBufferSideData
input) { … }
bool StructTraits<media::stable::mojom::DecoderBufferSideDataDataView,
media::DecoderBufferSideData>::
Read(media::stable::mojom::DecoderBufferSideDataDataView input,
media::DecoderBufferSideData* output) { … }
media::EncryptionScheme
StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
encryption_scheme(const std::unique_ptr<media::DecryptConfig>& input) { … }
const std::string& StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
key_id(const std::unique_ptr<media::DecryptConfig>& input) { … }
const std::string& StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
iv(const std::unique_ptr<media::DecryptConfig>& input) { … }
const std::vector<media::SubsampleEntry>&
StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
subsamples(const std::unique_ptr<media::DecryptConfig>& input) { … }
const std::optional<media::EncryptionPattern>&
StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
encryption_pattern(const std::unique_ptr<media::DecryptConfig>& input) { … }
bool StructTraits<media::stable::mojom::DecryptConfigDataView,
std::unique_ptr<media::DecryptConfig>>::
Read(media::stable::mojom::DecryptConfigDataView input,
std::unique_ptr<media::DecryptConfig>* output) { … }
uint32_t StructTraits<
media::stable::mojom::HDRMetadataDataView,
gfx::HDRMetadata>::max_content_light_level(const gfx::HDRMetadata& input) { … }
uint32_t
StructTraits<media::stable::mojom::HDRMetadataDataView, gfx::HDRMetadata>::
max_frame_average_light_level(const gfx::HDRMetadata& input) { … }
gfx::HdrMetadataSmpteSt2086 StructTraits<
media::stable::mojom::HDRMetadataDataView,
gfx::HDRMetadata>::color_volume_metadata(const gfx::HDRMetadata& input) { … }
bool StructTraits<media::stable::mojom::HDRMetadataDataView, gfx::HDRMetadata>::
Read(media::stable::mojom::HDRMetadataDataView data,
gfx::HDRMetadata* output) { … }
int32_t
StructTraits<media::stable::mojom::MediaLogRecordDataView,
media::MediaLogRecord>::id(const media::MediaLogRecord& input) { … }
media::MediaLogRecord::Type
StructTraits<media::stable::mojom::MediaLogRecordDataView,
media::MediaLogRecord>::type(const media::MediaLogRecord& input) { … }
const base::Value::Dict& StructTraits<
media::stable::mojom::MediaLogRecordDataView,
media::MediaLogRecord>::params(const media::MediaLogRecord& input) { … }
base::TimeTicks
StructTraits<media::stable::mojom::MediaLogRecordDataView,
media::MediaLogRecord>::time(const media::MediaLogRecord& input) { … }
bool StructTraits<media::stable::mojom::MediaLogRecordDataView,
media::MediaLogRecord>::
Read(media::stable::mojom::MediaLogRecordDataView data,
media::MediaLogRecord* output) { … }
const gfx::GpuMemoryBufferId& StructTraits<
media::stable::mojom::NativeGpuMemoryBufferHandleDataView,
gfx::GpuMemoryBufferHandle>::id(const gfx::GpuMemoryBufferHandle& input) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
gfx::NativePixmapHandle StructTraits<
media::stable::mojom::NativeGpuMemoryBufferHandleDataView,
gfx::GpuMemoryBufferHandle>::platform_handle(gfx::GpuMemoryBufferHandle&
input) { … }
#endif
bool StructTraits<media::stable::mojom::NativeGpuMemoryBufferHandleDataView,
gfx::GpuMemoryBufferHandle>::
Read(media::stable::mojom::NativeGpuMemoryBufferHandleDataView data,
gfx::GpuMemoryBufferHandle* output) { … }
media::stable::mojom::StatusCode StructTraits<
media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::code(const media::internal::StatusData&
input) { … }
std::string StructTraits<media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::
group(const media::internal::StatusData& input) { … }
std::string StructTraits<media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::
message(const media::internal::StatusData& input) { … }
const base::Value::List& StructTraits<media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::
frames(const media::internal::StatusData& input) { … }
std::optional<media::internal::StatusData> StructTraits<
media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::cause(const media::internal::StatusData&
input) { … }
const base::Value& StructTraits<media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::
data(const media::internal::StatusData& input) { … }
bool StructTraits<media::stable::mojom::StatusDataDataView,
media::internal::StatusData>::
Read(media::stable::mojom::StatusDataDataView data,
media::internal::StatusData* output) { … }
mojo::OptionalAsPointer<const media::internal::StatusData> StructTraits<
media::stable::mojom::StatusDataView,
media::DecoderStatus>::internal(const media::DecoderStatus& input) { … }
bool StructTraits<media::stable::mojom::StatusDataView, media::DecoderStatus>::
Read(media::stable::mojom::StatusDataView data,
media::DecoderStatus* output) { … }
media::VideoCodecProfile
StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
profile_min(const media::SupportedVideoDecoderConfig& input) { … }
media::VideoCodecProfile
StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
profile_max(const media::SupportedVideoDecoderConfig& input) { … }
const gfx::Size&
StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
coded_size_min(const media::SupportedVideoDecoderConfig& input) { … }
const gfx::Size&
StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
coded_size_max(const media::SupportedVideoDecoderConfig& input) { … }
bool StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
allow_encrypted(const media::SupportedVideoDecoderConfig& input) { … }
bool StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
require_encrypted(const media::SupportedVideoDecoderConfig& input) { … }
bool StructTraits<media::stable::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
Read(media::stable::mojom::SupportedVideoDecoderConfigDataView input,
media::SupportedVideoDecoderConfig* output) { … }
uint32_t StructTraits<
media::stable::mojom::SubsampleEntryDataView,
media::SubsampleEntry>::clear_bytes(const ::media::SubsampleEntry& input) { … }
uint32_t StructTraits<
media::stable::mojom::SubsampleEntryDataView,
media::SubsampleEntry>::cypher_bytes(const ::media::SubsampleEntry& input) { … }
bool StructTraits<media::stable::mojom::SubsampleEntryDataView,
media::SubsampleEntry>::
Read(media::stable::mojom::SubsampleEntryDataView input,
media::SubsampleEntry* output) { … }
media::VideoCodec StructTraits<
media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::codec(const media::VideoDecoderConfig& input) { … }
media::VideoCodecProfile StructTraits<
media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::profile(const media::VideoDecoderConfig&
input) { … }
bool StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
has_alpha(const media::VideoDecoderConfig& input) { … }
const gfx::Size& StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
coded_size(const media::VideoDecoderConfig& input) { … }
const gfx::Rect& StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
visible_rect(const media::VideoDecoderConfig& input) { … }
const gfx::Size& StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
natural_size(const media::VideoDecoderConfig& input) { … }
const std::vector<uint8_t>& StructTraits<
media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::extra_data(const media::VideoDecoderConfig&
input) { … }
media::EncryptionScheme
StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
encryption_scheme(const media::VideoDecoderConfig& input) { … }
const gfx::ColorSpace
StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
color_space_info(const media::VideoDecoderConfig& input) { … }
const std::optional<gfx::HDRMetadata>& StructTraits<
media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::hdr_metadata(const media::VideoDecoderConfig&
input) { … }
uint32_t StructTraits<
media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::level(const media::VideoDecoderConfig& input) { … }
bool StructTraits<media::stable::mojom::VideoDecoderConfigDataView,
media::VideoDecoderConfig>::
Read(media::stable::mojom::VideoDecoderConfigDataView input,
media::VideoDecoderConfig* output) { … }
bool StructTraits<media::stable::mojom::VideoFrameMetadataDataView,
media::VideoFrameMetadata>::
protected_video(const media::VideoFrameMetadata& input) { … }
bool StructTraits<media::stable::mojom::VideoFrameMetadataDataView,
media::VideoFrameMetadata>::
hw_protected(const media::VideoFrameMetadata& input) { … }
bool StructTraits<media::stable::mojom::VideoFrameMetadataDataView,
media::VideoFrameMetadata>::
needs_detiling(const media::VideoFrameMetadata& input) { … }
bool StructTraits<media::stable::mojom::VideoFrameMetadataDataView,
media::VideoFrameMetadata>::
Read(media::stable::mojom::VideoFrameMetadataDataView input,
media::VideoFrameMetadata* output) { … }
}