// media/mojo/mojom/webrtc_video_perf.mojom-send-validation.h is auto generated by mojom_bindings_generator.py, do not edit

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

#ifndef MEDIA_MOJO_MOJOM_WEBRTC_VIDEO_PERF_MOJOM_SEND_VALIDATION_H_
#define MEDIA_MOJO_MOJOM_WEBRTC_VIDEO_PERF_MOJOM_SEND_VALIDATION_H_

#include "media/mojo/mojom/webrtc_video_perf.mojom-shared-internal.h"
#include "media/mojo/mojom/media_types.mojom-shared.h"

#include "media/mojo/mojom/webrtc_video_perf.mojom-data-view.h"

#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization_send_validation.h"

namespace mojo::internal {

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::media::mojom::WebrtcPredictionFeaturesDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::media::mojom::WebrtcPredictionFeaturesDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::media::mojom::internal::WebrtcPredictionFeatures_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      fragment->is_decode_stats = Traits::is_decode_stats(input);

      
      mojo::internal::Serialize<::media::mojom::VideoCodecProfile>(
        Traits::profile(input),
        &fragment->profile);

      fragment->video_pixels = Traits::video_pixels(input);

      fragment->hardware_accelerated = Traits::hardware_accelerated(input);
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::media::mojom::WebrtcVideoStatsDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::media::mojom::WebrtcVideoStatsDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::media::mojom::internal::WebrtcVideoStats_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      fragment->frames_processed = Traits::frames_processed(input);

      fragment->key_frames_processed = Traits::key_frames_processed(input);

      fragment->p99_processing_time_ms = Traits::p99_processing_time_ms(input);
  }
};

}  // namespace mojo::internal

#endif  // MEDIA_MOJO_MOJOM_WEBRTC_VIDEO_PERF_MOJOM_SEND_VALIDATION_H_