media: Use PassInterface to pass InterfacePtr to another thread. |
|||
Issue descriptionSee discussion here: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/DJ7-iHUnzdo Today for mojo media services, we get the InterfacePtr on the main thread (using MediaInterfaceProvider which lives solely on the main thread), and then pass it to the media thread to use. This works because InterfacePtr is lazily bound to a thread, i.e. it's only bound to a thread the first time it is used, e.g. when Initialize() is called. However, lazy bounding is a mojo implementation detail. We should not rely on it. Also, the current code is hard to understand because it is very tricky. We should fix the code by using PassInterface() which is safer and more readable.
,
Mar 22 2016
It's seems the change is pretty trivial. I'll fix it this week.
,
Mar 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ac9ee0c8ef4c20df609f7d34c068d9a97363160e commit ac9ee0c8ef4c20df609f7d34c068d9a97363160e Author: xhwang <xhwang@chromium.org> Date: Tue Mar 22 22:18:01 2016 media: Use PassInterface() in mojo media classes This is the preferred way to bind an InterfacePtr on one thread and then use it on another thread. BUG= 596925 TEST=Manually tested. Review URL: https://codereview.chromium.org/1821153004 Cr-Commit-Position: refs/heads/master@{#382708} [modify] https://crrev.com/ac9ee0c8ef4c20df609f7d34c068d9a97363160e/media/mojo/services/mojo_audio_decoder.cc [modify] https://crrev.com/ac9ee0c8ef4c20df609f7d34c068d9a97363160e/media/mojo/services/mojo_audio_decoder.h [modify] https://crrev.com/ac9ee0c8ef4c20df609f7d34c068d9a97363160e/media/mojo/services/mojo_renderer_impl.cc [modify] https://crrev.com/ac9ee0c8ef4c20df609f7d34c068d9a97363160e/media/mojo/services/mojo_renderer_impl.h
,
Mar 22 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by xhw...@chromium.org
, Mar 22 2016