#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "media/mojo/mojom/decryptor.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/decryptor.mojom-params-data.h"
#include "media/mojo/mojom/decryptor.mojom-shared-message-ids.h"
#include "media/mojo/mojom/decryptor.mojom-import-headers.h"
#include "media/mojo/mojom/decryptor.mojom-test-utils.h"
#include "media/mojo/mojom/video_decoder_config_mojom_traits.h"
namespace media::mojom {
const char Decryptor::Name_[] = …;
Decryptor::IPCStableHashFunction Decryptor::MessageToMethodInfo_(mojo::Message& message) { … }
const char* Decryptor::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t Decryptor::Initialize_Sym::IPCStableHash() { … }
uint32_t Decryptor::Decrypt_Sym::IPCStableHash() { … }
uint32_t Decryptor::CancelDecrypt_Sym::IPCStableHash() { … }
uint32_t Decryptor::InitializeAudioDecoder_Sym::IPCStableHash() { … }
uint32_t Decryptor::InitializeVideoDecoder_Sym::IPCStableHash() { … }
uint32_t Decryptor::DecryptAndDecodeAudio_Sym::IPCStableHash() { … }
uint32_t Decryptor::DecryptAndDecodeVideo_Sym::IPCStableHash() { … }
uint32_t Decryptor::ResetDecoder_Sym::IPCStableHash() { … }
uint32_t Decryptor::DeinitializeDecoder_Sym::IPCStableHash() { … }
# endif
class Decryptor_Decrypt_ForwardToCallback
: public mojo::MessageReceiver { … };
class Decryptor_InitializeAudioDecoder_ForwardToCallback
: public mojo::MessageReceiver { … };
class Decryptor_InitializeVideoDecoder_ForwardToCallback
: public mojo::MessageReceiver { … };
class Decryptor_DecryptAndDecodeAudio_ForwardToCallback
: public mojo::MessageReceiver { … };
class Decryptor_DecryptAndDecodeVideo_ForwardToCallback
: public mojo::MessageReceiver { … };
DecryptorProxy::DecryptorProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void DecryptorProxy::Initialize(
::mojo::ScopedDataPipeConsumerHandle in_audio_pipe, ::mojo::ScopedDataPipeConsumerHandle in_video_pipe, ::mojo::ScopedDataPipeConsumerHandle in_decrypt_pipe, ::mojo::ScopedDataPipeProducerHandle in_decrypted_pipe) { … }
void DecryptorProxy::Decrypt(
::media::Decryptor::StreamType in_stream_type, ::media::mojom::DecoderBufferPtr in_encrypted, DecryptCallback callback) { … }
void DecryptorProxy::CancelDecrypt(
::media::Decryptor::StreamType in_stream_type) { … }
void DecryptorProxy::InitializeAudioDecoder(
const ::media::AudioDecoderConfig& in_config, InitializeAudioDecoderCallback callback) { … }
void DecryptorProxy::InitializeVideoDecoder(
const ::media::VideoDecoderConfig& in_config, InitializeVideoDecoderCallback callback) { … }
void DecryptorProxy::DecryptAndDecodeAudio(
::media::mojom::DecoderBufferPtr in_encrypted, DecryptAndDecodeAudioCallback callback) { … }
void DecryptorProxy::DecryptAndDecodeVideo(
::media::mojom::DecoderBufferPtr in_encrypted, DecryptAndDecodeVideoCallback callback) { … }
void DecryptorProxy::ResetDecoder(
::media::Decryptor::StreamType in_stream_type) { … }
void DecryptorProxy::DeinitializeDecoder(
::media::Decryptor::StreamType in_stream_type) { … }
class Decryptor_Decrypt_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Decryptor_Decrypt_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Decryptor_Decrypt_ProxyToResponder::Run(
::media::Decryptor::Status in_status, ::media::mojom::DecoderBufferPtr in_buffer) { … }
class Decryptor_InitializeAudioDecoder_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Decryptor_InitializeAudioDecoder_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Decryptor_InitializeAudioDecoder_ProxyToResponder::Run(
bool in_success) { … }
class Decryptor_InitializeVideoDecoder_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Decryptor_InitializeVideoDecoder_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Decryptor_InitializeVideoDecoder_ProxyToResponder::Run(
bool in_success) { … }
class Decryptor_DecryptAndDecodeAudio_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Decryptor_DecryptAndDecodeAudio_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Decryptor_DecryptAndDecodeAudio_ProxyToResponder::Run(
::media::Decryptor::Status in_status, std::vector<::media::mojom::AudioBufferPtr> in_audio_buffers) { … }
class Decryptor_DecryptAndDecodeVideo_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Decryptor_DecryptAndDecodeVideo_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Decryptor_DecryptAndDecodeVideo_ProxyToResponder::Run(
::media::Decryptor::Status in_status, const ::scoped_refptr<::media::VideoFrame>& in_video_frame, ::mojo::PendingRemote<FrameResourceReleaser> in_releaser) { … }
bool DecryptorStubDispatch::Accept(
Decryptor* impl,
mojo::Message* message) { … }
bool DecryptorStubDispatch::AcceptWithResponder(
Decryptor* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kDecryptorValidationInfo[] = …;
bool DecryptorRequestValidator::Accept(mojo::Message* message) { … }
bool DecryptorResponseValidator::Accept(mojo::Message* message) { … }
const char FrameResourceReleaser::Name_[] = …;
FrameResourceReleaser::IPCStableHashFunction FrameResourceReleaser::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FrameResourceReleaser::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
# endif
FrameResourceReleaserProxy::FrameResourceReleaserProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
bool FrameResourceReleaserStubDispatch::Accept(
FrameResourceReleaser* impl,
mojo::Message* message) { … }
bool FrameResourceReleaserStubDispatch::AcceptWithResponder(
FrameResourceReleaser* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
bool FrameResourceReleaserRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
}
namespace media::mojom {
void DecryptorInterceptorForTesting::Initialize(::mojo::ScopedDataPipeConsumerHandle audio_pipe, ::mojo::ScopedDataPipeConsumerHandle video_pipe, ::mojo::ScopedDataPipeConsumerHandle decrypt_pipe, ::mojo::ScopedDataPipeProducerHandle decrypted_pipe) { … }
void DecryptorInterceptorForTesting::Decrypt(::media::Decryptor::StreamType stream_type, ::media::mojom::DecoderBufferPtr encrypted, DecryptCallback callback) { … }
void DecryptorInterceptorForTesting::CancelDecrypt(::media::Decryptor::StreamType stream_type) { … }
void DecryptorInterceptorForTesting::InitializeAudioDecoder(const ::media::AudioDecoderConfig& config, InitializeAudioDecoderCallback callback) { … }
void DecryptorInterceptorForTesting::InitializeVideoDecoder(const ::media::VideoDecoderConfig& config, InitializeVideoDecoderCallback callback) { … }
void DecryptorInterceptorForTesting::DecryptAndDecodeAudio(::media::mojom::DecoderBufferPtr encrypted, DecryptAndDecodeAudioCallback callback) { … }
void DecryptorInterceptorForTesting::DecryptAndDecodeVideo(::media::mojom::DecoderBufferPtr encrypted, DecryptAndDecodeVideoCallback callback) { … }
void DecryptorInterceptorForTesting::ResetDecoder(::media::Decryptor::StreamType stream_type) { … }
void DecryptorInterceptorForTesting::DeinitializeDecoder(::media::Decryptor::StreamType stream_type) { … }
DecryptorAsyncWaiter::DecryptorAsyncWaiter(
Decryptor* proxy) : … { … }
DecryptorAsyncWaiter::~DecryptorAsyncWaiter() = default;
void DecryptorAsyncWaiter::Decrypt(
::media::Decryptor::StreamType stream_type, ::media::mojom::DecoderBufferPtr encrypted, ::media::Decryptor::Status* out_status, ::media::mojom::DecoderBufferPtr* out_buffer) { … }
void DecryptorAsyncWaiter::InitializeAudioDecoder(
const ::media::AudioDecoderConfig& config, bool* out_success) { … }
bool DecryptorAsyncWaiter::InitializeAudioDecoder(
const ::media::AudioDecoderConfig& config) { … }
void DecryptorAsyncWaiter::InitializeVideoDecoder(
const ::media::VideoDecoderConfig& config, bool* out_success) { … }
bool DecryptorAsyncWaiter::InitializeVideoDecoder(
const ::media::VideoDecoderConfig& config) { … }
void DecryptorAsyncWaiter::DecryptAndDecodeAudio(
::media::mojom::DecoderBufferPtr encrypted, ::media::Decryptor::Status* out_status, std::vector<::media::mojom::AudioBufferPtr>* out_audio_buffers) { … }
void DecryptorAsyncWaiter::DecryptAndDecodeVideo(
::media::mojom::DecoderBufferPtr encrypted, ::media::Decryptor::Status* out_status, ::scoped_refptr<::media::VideoFrame>* out_video_frame, ::mojo::PendingRemote<FrameResourceReleaser>* out_releaser) { … }
FrameResourceReleaserAsyncWaiter::FrameResourceReleaserAsyncWaiter(
FrameResourceReleaser* proxy) : … { … }
FrameResourceReleaserAsyncWaiter::~FrameResourceReleaserAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif