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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/media.h" 5 #include "media/base/media.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/synchronization/lock.h"
12 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
13 #include "build/build_config.h" 12 #include "media/base/media_switches.h"
14 #include "media/base/yuv_convert.h" 13 #include "media/base/yuv_convert.h"
15 14
16 #if !defined(MEDIA_DISABLE_FFMPEG) 15 #if !defined(MEDIA_DISABLE_FFMPEG)
17 #include "media/ffmpeg/ffmpeg_common.h" 16 #include "media/ffmpeg/ffmpeg_common.h"
18 #endif 17 #endif
19 18
20 namespace media { 19 namespace media {
21 20
22 // Media must only be initialized once, so use a LazyInstance to ensure this. 21 // Media must only be initialized once, so use a LazyInstance to ensure this.
23 class MediaInitializer { 22 class MediaInitializer {
(...skipping 30 matching lines...) Expand all
54 DISALLOW_COPY_AND_ASSIGN(MediaInitializer); 53 DISALLOW_COPY_AND_ASSIGN(MediaInitializer);
55 }; 54 };
56 55
57 static base::LazyInstance<MediaInitializer>::Leaky g_media_library = 56 static base::LazyInstance<MediaInitializer>::Leaky g_media_library =
58 LAZY_INSTANCE_INITIALIZER; 57 LAZY_INSTANCE_INITIALIZER;
59 58
60 void InitializeMediaLibrary() { 59 void InitializeMediaLibrary() {
61 g_media_library.Get(); 60 g_media_library.Get();
62 } 61 }
63 62
63 #if defined(OS_ANDROID)
64 bool IsUnifiedMediaPipelineEnabled() {
65 // TODO(dalecurtis): This experiment is temporary and should be removed once
66 // we have enough data to support the primacy of the unified media pipeline;
67 // see http://crbug.com/533190 for details.
68 //
69 // Note: It's important to query the field trial state first, to ensure that
70 // UMA reports the correct group.
71 const std::string group_name =
72 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial");
73 const bool enabled_via_cli =
74 base::CommandLine::ForCurrentProcess()->HasSwitch(
75 switches::kEnableUnifiedMediaPipeline);
76 return enabled_via_cli ||
77 base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
78 }
79 #endif
80
64 } // namespace media 81 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698