chromium/media/mojo/mojom/video_encode_accelerator_mojom_traits.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/mojo/mojom/video_encode_accelerator_mojom_traits.h"

#include <optional>

#include "base/notreached.h"
#include "media/base/video_bitrate_allocation.h"
#include "media/mojo/mojom/video_encode_accelerator.mojom.h"
#include "media/video/video_encode_accelerator.h"
#include "mojo/public/cpp/base/time_mojom_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"

namespace mojo {

// static
media::mojom::VideoEncodeAcceleratorSupportedRateControlMode
EnumTraits<media::mojom::VideoEncodeAcceleratorSupportedRateControlMode,
           media::VideoEncodeAccelerator::SupportedRateControlMode>::
    ToMojom(media::VideoEncodeAccelerator::SupportedRateControlMode mode) {}

// static
bool EnumTraits<media::mojom::VideoEncodeAcceleratorSupportedRateControlMode,
                media::VideoEncodeAccelerator::SupportedRateControlMode>::
    FromMojom(media::mojom::VideoEncodeAcceleratorSupportedRateControlMode mode,
              media::VideoEncodeAccelerator::SupportedRateControlMode* out) {}

// static
bool StructTraits<media::mojom::VideoEncodeAcceleratorSupportedProfileDataView,
                  media::VideoEncodeAccelerator::SupportedProfile>::
    Read(media::mojom::VideoEncodeAcceleratorSupportedProfileDataView data,
         media::VideoEncodeAccelerator::SupportedProfile* out) {}

// static
bool StructTraits<media::mojom::VariableBitratePeakDataView, uint32_t>::Read(
    media::mojom::VariableBitratePeakDataView data,
    uint32_t* out_peak_bps) {}

// static
std::vector<uint32_t> StructTraits<media::mojom::VideoBitrateAllocationDataView,
                                   media::VideoBitrateAllocation>::
    bitrates(const media::VideoBitrateAllocation& bitrate_allocation) {}

// static
bool StructTraits<media::mojom::VideoBitrateAllocationDataView,
                  media::VideoBitrateAllocation>::
    Read(media::mojom::VideoBitrateAllocationDataView data,
         media::VideoBitrateAllocation* out_bitrate_allocation) {}

// static
bool StructTraits<media::mojom::VideoEncodeOptionsDataView,
                  media::VideoEncoder::EncodeOptions>::
    Read(media::mojom::VideoEncodeOptionsDataView data,
         media::VideoEncoder::EncodeOptions* out_options) {}

// static
bool UnionTraits<media::mojom::OptionalMetadataDataView,
                 media::BitstreamBufferMetadata>::
    Read(media::mojom::OptionalMetadataDataView data,
         media::BitstreamBufferMetadata* out) {}

// static
bool StructTraits<media::mojom::BitstreamBufferMetadataDataView,
                  media::BitstreamBufferMetadata>::
    Read(media::mojom::BitstreamBufferMetadataDataView data,
         media::BitstreamBufferMetadata* metadata) {}

// static
bool StructTraits<media::mojom::DropFrameMetadataDataView,
                  media::DropFrameMetadata>::
    Read(media::mojom::DropFrameMetadataDataView data,
         media::DropFrameMetadata* out_metadata) {}

// static
bool StructTraits<media::mojom::H264MetadataDataView, media::H264Metadata>::
    Read(media::mojom::H264MetadataDataView data,
         media::H264Metadata* out_metadata) {}

// static
bool StructTraits<media::mojom::H265MetadataDataView, media::H265Metadata>::
    Read(media::mojom::H265MetadataDataView data,
         media::H265Metadata* out_metadata) {}

// static
bool StructTraits<media::mojom::Vp8MetadataDataView, media::Vp8Metadata>::Read(
    media::mojom::Vp8MetadataDataView data,
    media::Vp8Metadata* out_metadata) {}

// static
bool StructTraits<media::mojom::Vp9MetadataDataView, media::Vp9Metadata>::Read(
    media::mojom::Vp9MetadataDataView data,
    media::Vp9Metadata* out_metadata) {}

// static
bool StructTraits<media::mojom::Av1MetadataDataView, media::Av1Metadata>::Read(
    media::mojom::Av1MetadataDataView data,
    media::Av1Metadata* out_metadata) {}

// static
media::mojom::VideoEncodeAcceleratorConfig_StorageType
EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_StorageType,
           media::VideoEncodeAccelerator::Config::StorageType>::
    ToMojom(media::VideoEncodeAccelerator::Config::StorageType input) {}

// static
bool EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_StorageType,
                media::VideoEncodeAccelerator::Config::StorageType>::
    FromMojom(media::mojom::VideoEncodeAcceleratorConfig_StorageType input,
              media::VideoEncodeAccelerator::Config::StorageType* output) {}

// static
media::mojom::VideoEncodeAcceleratorConfig_EncoderType
EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_EncoderType,
           media::VideoEncodeAccelerator::Config::EncoderType>::
    ToMojom(media::VideoEncodeAccelerator::Config::EncoderType input) {}

// static
bool EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_EncoderType,
                media::VideoEncodeAccelerator::Config::EncoderType>::
    FromMojom(media::mojom::VideoEncodeAcceleratorConfig_EncoderType input,
              media::VideoEncodeAccelerator::Config::EncoderType* output) {}

// static
media::mojom::VideoEncodeAcceleratorConfig_ContentType
EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_ContentType,
           media::VideoEncodeAccelerator::Config::ContentType>::
    ToMojom(media::VideoEncodeAccelerator::Config::ContentType input) {}

// static
bool EnumTraits<media::mojom::VideoEncodeAcceleratorConfig_ContentType,
                media::VideoEncodeAccelerator::Config::ContentType>::
    FromMojom(media::mojom::VideoEncodeAcceleratorConfig_ContentType input,
              media::VideoEncodeAccelerator::Config::ContentType* output) {}

// static
bool StructTraits<media::mojom::SpatialLayerDataView,
                  media::VideoEncodeAccelerator::Config::SpatialLayer>::
    Read(media::mojom::SpatialLayerDataView input,
         media::VideoEncodeAccelerator::Config::SpatialLayer* output) {}

// static
bool StructTraits<media::mojom::ConstantBitrateDataView, media::Bitrate>::Read(
    media::mojom::ConstantBitrateDataView input,
    media::Bitrate* output) {}

// static
bool StructTraits<media::mojom::VariableBitrateDataView, media::Bitrate>::Read(
    media::mojom::VariableBitrateDataView input,
    media::Bitrate* output) {}

// static
bool StructTraits<media::mojom::ExternalBitrateDataView, media::Bitrate>::Read(
    media::mojom::ExternalBitrateDataView input,
    media::Bitrate* output) {}

// static
media::mojom::BitrateDataView::Tag
UnionTraits<media::mojom::BitrateDataView, media::Bitrate>::GetTag(
    const media::Bitrate& input) {}

// static
bool UnionTraits<media::mojom::BitrateDataView, media::Bitrate>::Read(
    media::mojom::BitrateDataView input,
    media::Bitrate* output) {}

// static
bool StructTraits<media::mojom::VideoEncodeAcceleratorConfigDataView,
                  media::VideoEncodeAccelerator::Config>::
    Read(media::mojom::VideoEncodeAcceleratorConfigDataView input,
         media::VideoEncodeAccelerator::Config* output) {}

}  // namespace mojo