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

Unified Diff: media/base/media.cc

Issue 1690063002: Fix mime type mappings when the unified media pipeline is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include MSE fixes. Created 4 years, 10 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/base/media.cc
diff --git a/media/base/media.cc b/media/base/media.cc
index f55d1c437a5bf6e3baee3b23a10355ce635153de..7694505d714de9d870b437b33aff3b0ba3e842f3 100644
--- a/media/base/media.cc
+++ b/media/base/media.cc
@@ -4,13 +4,12 @@
#include "media/base/media.h"
-#include "base/files/file_path.h"
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
-#include "base/path_service.h"
-#include "base/synchronization/lock.h"
+#include "base/metrics/field_trial.h"
#include "base/trace_event/trace_event.h"
-#include "build/build_config.h"
+#include "media/base/media_switches.h"
#include "media/base/yuv_convert.h"
#if !defined(MEDIA_DISABLE_FFMPEG)
@@ -61,4 +60,22 @@ void InitializeMediaLibrary() {
g_media_library.Get();
}
+#if defined(OS_ANDROID)
+bool IsUnifiedMediaPipelineEnabled() {
+ // TODO(dalecurtis): This experiment is temporary and should be removed once
+ // we have enough data to support the primacy of the unified media pipeline;
+ // see http://crbug.com/533190 for details.
+ //
+ // Note: It's important to query the field trial state first, to ensure that
+ // UMA reports the correct group.
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial");
+ const bool enabled_via_cli =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableUnifiedMediaPipeline);
+ return enabled_via_cli ||
+ base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
+}
+#endif
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698