| Index: media/mojo/services/mojo_decryptor_service.h
|
| diff --git a/media/mojo/services/mojo_decryptor_service.h b/media/mojo/services/mojo_decryptor_service.h
|
| index bb68f61f154c5cae993da1ea9be1328fbb0000b1..68ca2b5bcd30d0beead4e6ceaf542032b92ad99e 100644
|
| --- a/media/mojo/services/mojo_decryptor_service.h
|
| +++ b/media/mojo/services/mojo_decryptor_service.h
|
| @@ -29,6 +29,9 @@ class MojoDecoderBufferWriter;
|
| // and uses a weak binding across the mojo interface.
|
| class MojoDecryptorService : public mojom::Decryptor {
|
| public:
|
| + using StreamType = media::Decryptor::StreamType;
|
| + using Status = media::Decryptor::Status;
|
| +
|
| // Constructs a MojoDecryptorService and binds it to the |request|. Keeps a
|
| // copy of |cdm| to prevent it from being deleted as long as it is needed.
|
| // |error_handler| will be called if a connection error occurs.
|
| @@ -41,10 +44,10 @@ class MojoDecryptorService : public mojom::Decryptor {
|
| // mojom::Decryptor implementation.
|
| void Initialize(mojo::ScopedDataPipeConsumerHandle receive_pipe,
|
| mojo::ScopedDataPipeProducerHandle transmit_pipe) final;
|
| - void Decrypt(mojom::DemuxerStream::Type stream_type,
|
| + void Decrypt(StreamType stream_type,
|
| mojom::DecoderBufferPtr encrypted,
|
| const DecryptCallback& callback) final;
|
| - void CancelDecrypt(mojom::DemuxerStream::Type stream_type) final;
|
| + void CancelDecrypt(StreamType stream_type) final;
|
| void InitializeAudioDecoder(
|
| mojom::AudioDecoderConfigPtr config,
|
| const InitializeAudioDecoderCallback& callback) final;
|
| @@ -57,15 +60,15 @@ class MojoDecryptorService : public mojom::Decryptor {
|
| void DecryptAndDecodeVideo(
|
| mojom::DecoderBufferPtr encrypted,
|
| const DecryptAndDecodeVideoCallback& callback) final;
|
| - void ResetDecoder(mojom::DemuxerStream::Type stream_type) final;
|
| - void DeinitializeDecoder(mojom::DemuxerStream::Type stream_type) final;
|
| + void ResetDecoder(StreamType stream_type) final;
|
| + void DeinitializeDecoder(StreamType stream_type) final;
|
| void ReleaseSharedBuffer(mojo::ScopedSharedBufferHandle buffer,
|
| uint64_t buffer_size) final;
|
|
|
| private:
|
| // Callback executed once Decrypt() is done.
|
| void OnDecryptDone(const DecryptCallback& callback,
|
| - media::Decryptor::Status status,
|
| + Status status,
|
| const scoped_refptr<DecoderBuffer>& buffer);
|
|
|
| // Callbacks executed once decoder initialized.
|
| @@ -76,10 +79,10 @@ class MojoDecryptorService : public mojom::Decryptor {
|
|
|
| // Callbacks executed when DecryptAndDecode are done.
|
| void OnAudioDecoded(const DecryptAndDecodeAudioCallback& callback,
|
| - media::Decryptor::Status status,
|
| + Status status,
|
| const media::Decryptor::AudioFrames& frames);
|
| void OnVideoDecoded(const DecryptAndDecodeVideoCallback& callback,
|
| - media::Decryptor::Status status,
|
| + Status status,
|
| const scoped_refptr<VideoFrame>& frame);
|
|
|
| // A weak binding is used to connect to the MojoDecryptor.
|
|
|