#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "media/mojo/mojom/stable/stable_video_decoder_types.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "media/mojo/mojom/stable/stable_video_decoder_types.mojom-params-data.h"
#include "media/mojo/mojom/stable/stable_video_decoder_types.mojom-shared-message-ids.h"
#include "media/mojo/mojom/stable/stable_video_decoder_types.mojom-import-headers.h"
#include "media/mojo/mojom/stable/stable_video_decoder_types.mojom-test-utils.h"
namespace media::stable::mojom {
SubsampleEntry::SubsampleEntry()
: … { … }
SubsampleEntry::SubsampleEntry(
uint32_t clear_bytes_in,
uint32_t cypher_bytes_in)
: … { … }
SubsampleEntry::~SubsampleEntry() = default;
void SubsampleEntry::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SubsampleEntry::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DecryptConfig::DecryptConfig()
: … { … }
DecryptConfig::DecryptConfig(
::media::EncryptionScheme encryption_scheme_in,
const std::string& key_id_in,
const std::string& iv_in,
std::vector<::media::SubsampleEntry> subsamples_in,
const std::optional<::media::EncryptionPattern>& encryption_pattern_in)
: … { … }
DecryptConfig::~DecryptConfig() = default;
void DecryptConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DecryptConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ColorVolumeMetadata::ColorVolumeMetadata()
: … { … }
ColorVolumeMetadata::ColorVolumeMetadata(
const ::gfx::PointF& primary_r_in,
const ::gfx::PointF& primary_g_in,
const ::gfx::PointF& primary_b_in,
const ::gfx::PointF& white_point_in,
float luminance_max_in,
float luminance_min_in)
: … { … }
ColorVolumeMetadata::~ColorVolumeMetadata() = default;
void ColorVolumeMetadata::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ColorVolumeMetadata::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HDRMetadata::HDRMetadata()
: … { … }
HDRMetadata::HDRMetadata(
const ::gfx::HdrMetadataSmpteSt2086& color_volume_metadata_in,
uint32_t max_content_light_level_in,
uint32_t max_frame_average_light_level_in)
: … { … }
HDRMetadata::~HDRMetadata() = default;
void HDRMetadata::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HDRMetadata::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
VideoDecoderConfig::VideoDecoderConfig()
: … { … }
VideoDecoderConfig::VideoDecoderConfig(
::media::VideoCodec codec_in,
::media::VideoCodecProfile profile_in,
uint32_t level_in,
bool has_alpha_in,
const ::gfx::Size& coded_size_in,
const ::gfx::Rect& visible_rect_in,
const ::gfx::Size& natural_size_in,
std::vector<uint8_t> extra_data_in,
::media::EncryptionScheme encryption_scheme_in,
const ::gfx::ColorSpace& color_space_info_in,
const std::optional<::gfx::HDRMetadata>& hdr_metadata_in)
: … { … }
VideoDecoderConfig::~VideoDecoderConfig() = default;
void VideoDecoderConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool VideoDecoderConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SupportedVideoDecoderConfig::SupportedVideoDecoderConfig()
: … { … }
SupportedVideoDecoderConfig::SupportedVideoDecoderConfig(
::media::VideoCodecProfile profile_min_in,
::media::VideoCodecProfile profile_max_in,
const ::gfx::Size& coded_size_min_in,
const ::gfx::Size& coded_size_max_in,
bool allow_encrypted_in,
bool require_encrypted_in)
: … { … }
SupportedVideoDecoderConfig::~SupportedVideoDecoderConfig() = default;
void SupportedVideoDecoderConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SupportedVideoDecoderConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
StatusData::StatusData()
: … { … }
StatusData::StatusData(
const std::string& group_in,
StatusCode code_in,
const std::string& message_in,
std::vector<::base::Value> frames_in,
const std::optional<::media::internal::StatusData>& cause_in,
::base::Value data_in)
: … { … }
StatusData::~StatusData() = default;
void StatusData::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool StatusData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
Status::Status()
: … { … }
Status::Status(
const std::optional<::media::internal::StatusData>& internal_in)
: … { … }
Status::~Status() = default;
void Status::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool Status::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DecoderBufferSideData::DecoderBufferSideData()
: … { … }
DecoderBufferSideData::DecoderBufferSideData(
std::vector<uint32_t> spatial_layers_in,
std::vector<uint8_t> alpha_data_in,
uint64_t secure_handle_in)
: … { … }
DecoderBufferSideData::~DecoderBufferSideData() = default;
void DecoderBufferSideData::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DecoderBufferSideData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DecoderBuffer::DecoderBuffer()
: … { … }
DecoderBuffer::DecoderBuffer(
::base::TimeDelta timestamp_in,
::base::TimeDelta duration_in,
bool is_end_of_stream_in,
uint32_t data_size_in,
bool is_key_frame_in,
std::vector<uint8_t> raw_side_data_in,
::std::unique_ptr<::media::DecryptConfig> decrypt_config_in,
::base::TimeDelta front_discard_in,
::base::TimeDelta back_discard_in)
: … { … }
DecoderBuffer::DecoderBuffer(
::base::TimeDelta timestamp_in,
::base::TimeDelta duration_in,
bool is_end_of_stream_in,
uint32_t data_size_in,
bool is_key_frame_in,
std::vector<uint8_t> raw_side_data_in,
::std::unique_ptr<::media::DecryptConfig> decrypt_config_in,
::base::TimeDelta front_discard_in,
::base::TimeDelta back_discard_in,
DecoderBufferSideDataPtr side_data_in)
: … { … }
DecoderBuffer::~DecoderBuffer() = default;
void DecoderBuffer::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DecoderBuffer::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ColorSpace::ColorSpace()
: … { … }
ColorSpace::ColorSpace(
::gfx::ColorSpace::PrimaryID primaries_in,
::gfx::ColorSpace::TransferID transfer_in,
::gfx::ColorSpace::MatrixID matrix_in,
::gfx::ColorSpace::RangeID range_in,
std::vector<float> custom_primary_matrix_in,
std::vector<float> transfer_params_in)
: … { … }
ColorSpace::~ColorSpace() = default;
void ColorSpace::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ColorSpace::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
NativeGpuMemoryBufferHandle::NativeGpuMemoryBufferHandle()
: … { … }
NativeGpuMemoryBufferHandle::NativeGpuMemoryBufferHandle(
::gfx::GpuMemoryBufferId id_in,
::gfx::NativePixmapHandle platform_handle_in)
: … { … }
NativeGpuMemoryBufferHandle::~NativeGpuMemoryBufferHandle() = default;
void NativeGpuMemoryBufferHandle::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool NativeGpuMemoryBufferHandle::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
VideoFrameMetadata::VideoFrameMetadata()
: … { … }
VideoFrameMetadata::VideoFrameMetadata(
bool protected_video_in,
bool hw_protected_in)
: … { … }
VideoFrameMetadata::VideoFrameMetadata(
bool protected_video_in,
bool hw_protected_in,
bool needs_detiling_in)
: … { … }
VideoFrameMetadata::~VideoFrameMetadata() = default;
void VideoFrameMetadata::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool VideoFrameMetadata::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
VideoFrame::VideoFrame()
: … { … }
VideoFrame::VideoFrame(
::media::VideoPixelFormat format_in,
const ::gfx::Size& coded_size_in,
const ::gfx::Rect& visible_rect_in,
const ::gfx::Size& natural_size_in,
::base::TimeDelta timestamp_in,
::gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle_in,
const ::media::VideoFrameMetadata& metadata_in,
const ::gfx::ColorSpace& color_space_in,
const std::optional<::gfx::HDRMetadata>& hdr_metadata_in)
: … { … }
VideoFrame::~VideoFrame() = default;
void VideoFrame::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool VideoFrame::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
MediaLogRecord::MediaLogRecord()
: … { … }
MediaLogRecord::MediaLogRecord(
int32_t id_in,
::media::MediaLogRecord::Type type_in,
::base::Value::Dict params_in,
::base::TimeTicks time_in)
: … { … }
MediaLogRecord::~MediaLogRecord() = default;
void MediaLogRecord::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool MediaLogRecord::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
}
namespace mojo {
bool StructTraits<::media::stable::mojom::SubsampleEntry::DataView, ::media::stable::mojom::SubsampleEntryPtr>::Read(
::media::stable::mojom::SubsampleEntry::DataView input,
::media::stable::mojom::SubsampleEntryPtr* output) { … }
bool StructTraits<::media::stable::mojom::DecryptConfig::DataView, ::media::stable::mojom::DecryptConfigPtr>::Read(
::media::stable::mojom::DecryptConfig::DataView input,
::media::stable::mojom::DecryptConfigPtr* output) { … }
bool StructTraits<::media::stable::mojom::ColorVolumeMetadata::DataView, ::media::stable::mojom::ColorVolumeMetadataPtr>::Read(
::media::stable::mojom::ColorVolumeMetadata::DataView input,
::media::stable::mojom::ColorVolumeMetadataPtr* output) { … }
bool StructTraits<::media::stable::mojom::HDRMetadata::DataView, ::media::stable::mojom::HDRMetadataPtr>::Read(
::media::stable::mojom::HDRMetadata::DataView input,
::media::stable::mojom::HDRMetadataPtr* output) { … }
bool StructTraits<::media::stable::mojom::VideoDecoderConfig::DataView, ::media::stable::mojom::VideoDecoderConfigPtr>::Read(
::media::stable::mojom::VideoDecoderConfig::DataView input,
::media::stable::mojom::VideoDecoderConfigPtr* output) { … }
bool StructTraits<::media::stable::mojom::SupportedVideoDecoderConfig::DataView, ::media::stable::mojom::SupportedVideoDecoderConfigPtr>::Read(
::media::stable::mojom::SupportedVideoDecoderConfig::DataView input,
::media::stable::mojom::SupportedVideoDecoderConfigPtr* output) { … }
bool StructTraits<::media::stable::mojom::StatusData::DataView, ::media::stable::mojom::StatusDataPtr>::Read(
::media::stable::mojom::StatusData::DataView input,
::media::stable::mojom::StatusDataPtr* output) { … }
bool StructTraits<::media::stable::mojom::Status::DataView, ::media::stable::mojom::StatusPtr>::Read(
::media::stable::mojom::Status::DataView input,
::media::stable::mojom::StatusPtr* output) { … }
bool StructTraits<::media::stable::mojom::DecoderBufferSideData::DataView, ::media::stable::mojom::DecoderBufferSideDataPtr>::Read(
::media::stable::mojom::DecoderBufferSideData::DataView input,
::media::stable::mojom::DecoderBufferSideDataPtr* output) { … }
bool StructTraits<::media::stable::mojom::DecoderBuffer::DataView, ::media::stable::mojom::DecoderBufferPtr>::Read(
::media::stable::mojom::DecoderBuffer::DataView input,
::media::stable::mojom::DecoderBufferPtr* output) { … }
bool StructTraits<::media::stable::mojom::ColorSpace::DataView, ::media::stable::mojom::ColorSpacePtr>::Read(
::media::stable::mojom::ColorSpace::DataView input,
::media::stable::mojom::ColorSpacePtr* output) { … }
bool StructTraits<::media::stable::mojom::NativeGpuMemoryBufferHandle::DataView, ::media::stable::mojom::NativeGpuMemoryBufferHandlePtr>::Read(
::media::stable::mojom::NativeGpuMemoryBufferHandle::DataView input,
::media::stable::mojom::NativeGpuMemoryBufferHandlePtr* output) { … }
bool StructTraits<::media::stable::mojom::VideoFrameMetadata::DataView, ::media::stable::mojom::VideoFrameMetadataPtr>::Read(
::media::stable::mojom::VideoFrameMetadata::DataView input,
::media::stable::mojom::VideoFrameMetadataPtr* output) { … }
bool StructTraits<::media::stable::mojom::VideoFrame::DataView, ::media::stable::mojom::VideoFramePtr>::Read(
::media::stable::mojom::VideoFrame::DataView input,
::media::stable::mojom::VideoFramePtr* output) { … }
bool StructTraits<::media::stable::mojom::MediaLogRecord::DataView, ::media::stable::mojom::MediaLogRecordPtr>::Read(
::media::stable::mojom::MediaLogRecord::DataView input,
::media::stable::mojom::MediaLogRecordPtr* output) { … }
}
namespace media::stable::mojom {
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif