Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Unified Diff: media/mojo/services/mojo_audio_decoder_service.h

Issue 1810293005: Implement MojoAudioDecoderService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spitzer-audio-client-init
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mojo/services/mojo_audio_decoder_service.h
diff --git a/media/mojo/services/mojo_audio_decoder_service.h b/media/mojo/services/mojo_audio_decoder_service.h
index bd5bc739e764c65615626713ea9389460a7db294..0e0c99ee1067ef30011d71b5e86ffe2cd5c1de05 100644
--- a/media/mojo/services/mojo_audio_decoder_service.h
+++ b/media/mojo/services/mojo_audio_decoder_service.h
@@ -33,6 +33,22 @@ class MojoAudioDecoderService : public interfaces::AudioDecoder {
void Reset(const ResetCallback& callback) final;
private:
+ // Called by |decoder_| upon finishing initialization.
+ void OnInitialized(bool success);
+
+ // Called by |decoder_| when DecoderBuffer is accepted or rejected.
+ void OnDecodeStatus(media::AudioDecoder::Status status);
+
+ // Called by |decoder_| when reset sequence is finished.
+ void OnResetDone();
+
+ // Called by |decoder_| for each decoded buffer.
+ void OnAudioBufferReady(const scoped_refptr<AudioBuffer>& audio_buffer);
+
+ // A helper method to read and deserialize DecoderBuffer from data pipe.
+ scoped_refptr<DecoderBuffer> ReadDecoderBuffer(
+ interfaces::DecoderBufferPtr buffer);
+
// A binding represents the association between the service and the
// communication channel, i.e. the pipe.
mojo::StrongBinding<interfaces::AudioDecoder> binding_;
@@ -43,6 +59,11 @@ class MojoAudioDecoderService : public interfaces::AudioDecoder {
// The destination for the decoded buffers.
interfaces::AudioDecoderClientPtr client_;
+ // These callbacks sends info to the Mojo client.
xhwang 2016/03/18 23:01:13 The |client_| has a special meaning. These callbac
Tima Vaisburd 2016/03/19 03:09:05 These variables got removed, the corresponding cal
+ InitializeCallback initialize_callback_;
+ DecodeCallback decode_callback_;
+ ResetCallback reset_callback_;
+
DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService);
};
« no previous file with comments | « no previous file | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | media/mojo/services/mojo_audio_decoder_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698