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

Unified Diff: content/browser/media/android/browser_demuxer_android.h

Issue 1076013002: Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed clang build Created 5 years, 7 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/browser/media/android/browser_demuxer_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/android/browser_demuxer_android.h
diff --git a/content/browser/media/android/browser_demuxer_android.h b/content/browser/media/android/browser_demuxer_android.h
index 407e0b3288663ab1c37541a92a266b6f9a270db5..71ebd7f30b42a8ef627e2fe9660a8322d741463c 100644
--- a/content/browser/media/android/browser_demuxer_android.h
+++ b/content/browser/media/android/browser_demuxer_android.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_DEMUXER_ANDROID_H_
#define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_DEMUXER_ANDROID_H_
+#include <map>
+
#include "base/id_map.h"
#include "content/public/browser/browser_message_filter.h"
#include "media/base/android/demuxer_android.h"
@@ -21,8 +23,9 @@ class CONTENT_EXPORT BrowserDemuxerAndroid : public BrowserMessageFilter {
BrowserDemuxerAndroid();
// BrowserMessageFilter overrides.
- void OverrideThreadForMessage(const IPC::Message& message,
- BrowserThread::ID* thread) override;
+ base::TaskRunner* OverrideTaskRunnerForMessage(
+ const IPC::Message& message) override;
+
bool OnMessageReceived(const IPC::Message& message) override;
// Returns an uninitialized demuxer implementation associated with
@@ -55,6 +58,15 @@ class CONTENT_EXPORT BrowserDemuxerAndroid : public BrowserMessageFilter {
IDMap<media::DemuxerAndroidClient> demuxer_clients_;
+ // When the demuxer client is created on UI thread but demuxer
+ // messages arrive on Media thread their relative order is undefined.
+ // Use |pending_configs_| map to keep the upcoming configurations
+ // until the client is created.
+ typedef std::map<int, media::DemuxerConfigs> ConfigsPerClient;
+ ConfigsPerClient pending_configs_;
+
+ base::SingleThreadTaskRunner* task_runner_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserDemuxerAndroid);
};
« no previous file with comments | « no previous file | content/browser/media/android/browser_demuxer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698