#include "media/mojo/services/mojo_audio_decoder_service.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/types/optional_util.h"
#include "media/base/content_decryption_module.h"
#include "media/mojo/common/media_type_converters.h"
#include "media/mojo/common/mojo_decoder_buffer_converter.h"
#include "media/mojo/services/mojo_cdm_service_context.h"
#include "media/mojo/services/mojo_media_client.h"
#include "media/mojo/services/mojo_media_log.h"
namespace media {
MojoAudioDecoderService::MojoAudioDecoderService(
MojoMediaClient* mojo_media_client,
MojoCdmServiceContext* mojo_cdm_service_context,
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: … { … }
MojoAudioDecoderService::~MojoAudioDecoderService() = default;
void MojoAudioDecoderService::GetSupportedConfigs(
GetSupportedConfigsCallback callback) { … }
void MojoAudioDecoderService::Construct(
mojo::PendingAssociatedRemote<mojom::AudioDecoderClient> client,
mojo::PendingRemote<mojom::MediaLog> media_log) { … }
void MojoAudioDecoderService::Initialize(
const AudioDecoderConfig& config,
const std::optional<base::UnguessableToken>& cdm_id,
InitializeCallback callback) { … }
void MojoAudioDecoderService::SetDataSource(
mojo::ScopedDataPipeConsumerHandle receive_pipe) { … }
void MojoAudioDecoderService::Decode(mojom::DecoderBufferPtr buffer,
DecodeCallback callback) { … }
void MojoAudioDecoderService::Reset(ResetCallback callback) { … }
void MojoAudioDecoderService::OnInitialized(InitializeCallback callback,
DecoderStatus status) { … }
void MojoAudioDecoderService::OnReadDone(DecodeCallback callback,
scoped_refptr<DecoderBuffer> buffer) { … }
void MojoAudioDecoderService::OnReaderFlushDone(ResetCallback callback) { … }
void MojoAudioDecoderService::OnDecodeStatus(DecodeCallback callback,
const DecoderStatus status) { … }
void MojoAudioDecoderService::OnResetDone(ResetCallback callback) { … }
void MojoAudioDecoderService::OnAudioBufferReady(
scoped_refptr<AudioBuffer> audio_buffer) { … }
void MojoAudioDecoderService::OnWaiting(WaitingReason reason) { … }
}