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

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

Issue 1821153004: media: Use PassInterface() in mojo media classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | media/mojo/services/mojo_audio_decoder.cc » ('j') | media/mojo/services/mojo_renderer_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_audio_decoder.h
diff --git a/media/mojo/services/mojo_audio_decoder.h b/media/mojo/services/mojo_audio_decoder.h
index 3f0d58fa4e1167d5bd878615e884b65e8dbfa549..819372637e9b3ab3bfb9d38957067b72a164b260 100644
--- a/media/mojo/services/mojo_audio_decoder.h
+++ b/media/mojo/services/mojo_audio_decoder.h
@@ -10,6 +10,7 @@
#include "media/base/audio_decoder.h"
#include "media/mojo/interfaces/audio_decoder.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_ptr_info.h"
#include "mojo/public/cpp/system/data_pipe.h"
namespace base {
@@ -63,6 +64,12 @@ class MojoAudioDecoder : public AudioDecoder,
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ // This class is constructed on one thread and used exclusively on another
+ // thread. This member is used to safely pass the AudioDecoderPtr from one
+ // thread to another. It is set in the constructor and is consumed in
+ // Initialize().
+ mojo::InterfacePtrInfo<interfaces::AudioDecoder> remote_decoder_info_;
yzshen1 2016/03/22 19:15:04 optional: you could use interfaces::AudioDecoderPt
xhwang 2016/03/22 19:45:26 Done.
+
interfaces::AudioDecoderPtr remote_decoder_;
// DataPipe for serializing the data section of DecoderBuffer.
« no previous file with comments | « no previous file | media/mojo/services/mojo_audio_decoder.cc » ('j') | media/mojo/services/mojo_renderer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698