#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "media/mojo/mojom/audio_encoder.mojom-blink.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/audio_encoder.mojom-params-data.h"
#include "media/mojo/mojom/audio_encoder.mojom-shared-message-ids.h"
#include "media/mojo/mojom/audio_encoder.mojom-blink-import-headers.h"
#include "media/mojo/mojom/audio_encoder.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace media::mojom::blink {
AacAudioEncoderConfig::AacAudioEncoderConfig()
: … { … }
AacAudioEncoderConfig::AacAudioEncoderConfig(
AacOutputFormat format_in)
: … { … }
AacAudioEncoderConfig::~AacAudioEncoderConfig() = default;
size_t AacAudioEncoderConfig::Hash(size_t seed) const { … }
void AacAudioEncoderConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool AacAudioEncoderConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
AudioEncoderConfig::AudioEncoderConfig()
: … { … }
AudioEncoderConfig::AudioEncoderConfig(
::media::mojom::blink::AudioCodec codec_in,
uint8_t channel_count_in,
uint32_t sample_rate_in,
uint32_t bitrate_in,
AacAudioEncoderConfigPtr aac_in)
: … { … }
AudioEncoderConfig::~AudioEncoderConfig() = default;
size_t AudioEncoderConfig::Hash(size_t seed) const { … }
void AudioEncoderConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool AudioEncoderConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
EncodedAudioBuffer::EncodedAudioBuffer()
: … { … }
EncodedAudioBuffer::EncodedAudioBuffer(
const ::media::AudioParameters& params_in,
::base::TimeDelta timestamp_in,
::base::TimeDelta duration_in,
WTF::Vector<uint8_t> data_in)
: … { … }
EncodedAudioBuffer::~EncodedAudioBuffer() = default;
void EncodedAudioBuffer::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool EncodedAudioBuffer::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char AudioEncoder::Name_[] = …;
AudioEncoder::IPCStableHashFunction AudioEncoder::MessageToMethodInfo_(mojo::Message& message) { … }
const char* AudioEncoder::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t AudioEncoder::Initialize_Sym::IPCStableHash() { … }
uint32_t AudioEncoder::Encode_Sym::IPCStableHash() { … }
uint32_t AudioEncoder::Flush_Sym::IPCStableHash() { … }
# endif
class AudioEncoder_Initialize_ForwardToCallback
: public mojo::MessageReceiver { … };
class AudioEncoder_Encode_ForwardToCallback
: public mojo::MessageReceiver { … };
class AudioEncoder_Flush_ForwardToCallback
: public mojo::MessageReceiver { … };
AudioEncoderProxy::AudioEncoderProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void AudioEncoderProxy::Initialize(
::mojo::PendingAssociatedRemote<AudioEncoderClient> in_client, AudioEncoderConfigPtr in_config, InitializeCallback callback) { … }
void AudioEncoderProxy::Encode(
::media::mojom::blink::AudioBufferPtr in_buffer, EncodeCallback callback) { … }
void AudioEncoderProxy::Flush(
FlushCallback callback) { … }
class AudioEncoder_Initialize_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AudioEncoder_Initialize_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AudioEncoder_Initialize_ProxyToResponder::Run(
::media::mojom::blink::EncoderStatusPtr in_status) { … }
class AudioEncoder_Encode_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AudioEncoder_Encode_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AudioEncoder_Encode_ProxyToResponder::Run(
::media::mojom::blink::EncoderStatusPtr in_status) { … }
class AudioEncoder_Flush_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AudioEncoder_Flush_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AudioEncoder_Flush_ProxyToResponder::Run(
::media::mojom::blink::EncoderStatusPtr in_status) { … }
bool AudioEncoderStubDispatch::Accept(
AudioEncoder* impl,
mojo::Message* message) { … }
bool AudioEncoderStubDispatch::AcceptWithResponder(
AudioEncoder* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kAudioEncoderValidationInfo[] = …;
bool AudioEncoderRequestValidator::Accept(mojo::Message* message) { … }
bool AudioEncoderResponseValidator::Accept(mojo::Message* message) { … }
const char AudioEncoderClient::Name_[] = …;
AudioEncoderClient::IPCStableHashFunction AudioEncoderClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* AudioEncoderClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t AudioEncoderClient::OnEncodedBufferReady_Sym::IPCStableHash() { … }
# endif
AudioEncoderClientProxy::AudioEncoderClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void AudioEncoderClientProxy::OnEncodedBufferReady(
EncodedAudioBufferPtr in_buffer, const WTF::Vector<uint8_t>& in_description) { … }
bool AudioEncoderClientStubDispatch::Accept(
AudioEncoderClient* impl,
mojo::Message* message) { … }
bool AudioEncoderClientStubDispatch::AcceptWithResponder(
AudioEncoderClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kAudioEncoderClientValidationInfo[] = …;
bool AudioEncoderClientRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::media::mojom::blink::AacAudioEncoderConfig::DataView, ::media::mojom::blink::AacAudioEncoderConfigPtr>::Read(
::media::mojom::blink::AacAudioEncoderConfig::DataView input,
::media::mojom::blink::AacAudioEncoderConfigPtr* output) { … }
bool StructTraits<::media::mojom::blink::AudioEncoderConfig::DataView, ::media::mojom::blink::AudioEncoderConfigPtr>::Read(
::media::mojom::blink::AudioEncoderConfig::DataView input,
::media::mojom::blink::AudioEncoderConfigPtr* output) { … }
bool StructTraits<::media::mojom::blink::EncodedAudioBuffer::DataView, ::media::mojom::blink::EncodedAudioBufferPtr>::Read(
::media::mojom::blink::EncodedAudioBuffer::DataView input,
::media::mojom::blink::EncodedAudioBufferPtr* output) { … }
}
namespace media::mojom::blink {
void AudioEncoderInterceptorForTesting::Initialize(::mojo::PendingAssociatedRemote<AudioEncoderClient> client, AudioEncoderConfigPtr config, InitializeCallback callback) { … }
void AudioEncoderInterceptorForTesting::Encode(::media::mojom::blink::AudioBufferPtr buffer, EncodeCallback callback) { … }
void AudioEncoderInterceptorForTesting::Flush(FlushCallback callback) { … }
AudioEncoderAsyncWaiter::AudioEncoderAsyncWaiter(
AudioEncoder* proxy) : … { … }
AudioEncoderAsyncWaiter::~AudioEncoderAsyncWaiter() = default;
void AudioEncoderAsyncWaiter::Initialize(
::mojo::PendingAssociatedRemote<AudioEncoderClient> client, AudioEncoderConfigPtr config, ::media::mojom::blink::EncoderStatusPtr* out_status) { … }
::media::mojom::blink::EncoderStatusPtr AudioEncoderAsyncWaiter::Initialize(
::mojo::PendingAssociatedRemote<AudioEncoderClient> client, AudioEncoderConfigPtr config) { … }
void AudioEncoderAsyncWaiter::Encode(
::media::mojom::blink::AudioBufferPtr buffer, ::media::mojom::blink::EncoderStatusPtr* out_status) { … }
::media::mojom::blink::EncoderStatusPtr AudioEncoderAsyncWaiter::Encode(
::media::mojom::blink::AudioBufferPtr buffer) { … }
void AudioEncoderAsyncWaiter::Flush(
::media::mojom::blink::EncoderStatusPtr* out_status) { … }
::media::mojom::blink::EncoderStatusPtr AudioEncoderAsyncWaiter::Flush(
) { … }
void AudioEncoderClientInterceptorForTesting::OnEncodedBufferReady(EncodedAudioBufferPtr buffer, const WTF::Vector<uint8_t>& description) { … }
AudioEncoderClientAsyncWaiter::AudioEncoderClientAsyncWaiter(
AudioEncoderClient* proxy) : … { … }
AudioEncoderClientAsyncWaiter::~AudioEncoderClientAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif