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

Unified Diff: content/renderer/media/android/stream_texture_factory.h

Issue 2192823004: Update StreamTextureProxy to accept a base::Closure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 4 years, 5 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 | content/renderer/media/android/stream_texture_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/stream_texture_factory.h
diff --git a/content/renderer/media/android/stream_texture_factory.h b/content/renderer/media/android/stream_texture_factory.h
index cf1d874d8337c041680c2dc8595fe7187316703c..c52358fc7c148470081b24eb8a8af1ec9c6a278e 100644
--- a/content/renderer/media/android/stream_texture_factory.h
+++ b/content/renderer/media/android/stream_texture_factory.h
@@ -36,12 +36,13 @@ class StreamTextureProxy : public StreamTextureHost::Listener {
public:
~StreamTextureProxy() override;
- // Initialize and bind to the loop, which becomes the thread that
- // a connected client will receive callbacks on. This can be called
- // on any thread, but must be called with the same loop every time.
- void BindToLoop(int32_t stream_id,
- cc::VideoFrameProvider::Client* client,
- scoped_refptr<base::SingleThreadTaskRunner> loop);
+ // Initialize and bind to |task_runner|, which becomes the thread that the
+ // provided callback will be run on. This can be called on any thread, but
+ // must be called with the same |task_runner| every time.
+ void BindToTaskRunner(
+ int32_t stream_id,
+ const base::Closure& received_frame_cb,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner);
// StreamTextureHost::Listener implementation:
void OnFrameAvailable() override;
@@ -58,10 +59,10 @@ class StreamTextureProxy : public StreamTextureHost::Listener {
const std::unique_ptr<StreamTextureHost> host_;
- // Protects access to |client_| and |loop_|.
+ // Protects access to |received_frame_cb_| and |task_runner_|.
base::Lock lock_;
- cc::VideoFrameProvider::Client* client_;
- scoped_refptr<base::SingleThreadTaskRunner> loop_;
+ base::Closure received_frame_cb_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureProxy);
};
« no previous file with comments | « no previous file | content/renderer/media/android/stream_texture_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698