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

Side by Side Diff: media/base/media.h

Issue 1825763002: media: Enable Unified Media Pipeline for MSE and EME on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Contains code that should be used for initializing, or querying the state 5 // Contains code that should be used for initializing, or querying the state
6 // of the media library as a whole. 6 // of the media library as a whole.
7 7
8 #ifndef MEDIA_BASE_MEDIA_H_ 8 #ifndef MEDIA_BASE_MEDIA_H_
9 #define MEDIA_BASE_MEDIA_H_ 9 #define MEDIA_BASE_MEDIA_H_
10 10
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 } 16 }
17 17
18 namespace media { 18 namespace media {
19 19
20 // Initializes media libraries (e.g. ffmpeg) as well as CPU specific media 20 // Initializes media libraries (e.g. ffmpeg) as well as CPU specific media
21 // features. 21 // features.
22 MEDIA_EXPORT void InitializeMediaLibrary(); 22 MEDIA_EXPORT void InitializeMediaLibrary();
23 23
24 // Returns whether mojo CDM should be selected at runtime. Note that even when
25 // mojo CDM is enabled at compile time, there are cases where we want to choose
26 // other CDM types. For example, on Android when we use WebMediaPlayerAndroid,
27 // we still want to use ProxyMediaKeys. In the future, when we experiment mojo
28 // CDM on desktop, we will choose between mojo CDM and pepper CDM at runtime.
29 // TODO(xhwang): Remove this when we use mojo CDM for all remote CDM cases by
30 // default.
31 MEDIA_EXPORT bool IsMojoCdmEnabled();
32
24 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
25 // Tells the media library it has support for OS level decoders. Should only be 34 // Tells the media library it has support for OS level decoders. Should only be
26 // used for actual decoders (e.g. MediaCodec) and not full-featured players 35 // used for actual decoders (e.g. MediaCodec) and not full-featured players
27 // (e.g. MediaPlayer). 36 // (e.g. MediaPlayer).
28 MEDIA_EXPORT void EnablePlatformDecoderSupport(); 37 MEDIA_EXPORT void EnablePlatformDecoderSupport();
29 MEDIA_EXPORT bool HasPlatformDecoderSupport(); 38 MEDIA_EXPORT bool HasPlatformDecoderSupport();
30 39
31 // Indicates if the platform supports Opus or VP9. Determined *ONLY* by the 40 // Indicates if the platform supports Opus or VP9. Determined *ONLY* by the
32 // platform version, so does not guarantee that either can actually be played. 41 // platform version, so does not guarantee that either can actually be played.
33 MEDIA_EXPORT bool PlatformHasOpusSupport(); 42 MEDIA_EXPORT bool PlatformHasOpusSupport();
34 MEDIA_EXPORT bool PlatformHasVp9Support(); 43 MEDIA_EXPORT bool PlatformHasVp9Support();
35 44
36 // Returns true if the unified media pipeline is enabled; the pipeline may still 45 // Returns true if the unified media pipeline is enabled; the pipeline may still
37 // not work for all codecs if HasPlatformDecoderSupport() is false. Please see 46 // not work for all codecs if HasPlatformDecoderSupport() is false. Please see
38 // MimeUtil for an exhaustive listing of supported codecs. 47 // MimeUtil for an exhaustive listing of supported codecs.
39 // 48 //
40 // TODO(dalecurtis): These methods are temporary and should be removed once the 49 // TODO(dalecurtis): These methods are temporary and should be removed once the
41 // unified media pipeline is supported everywhere. http://crbug.com/580626. 50 // unified media pipeline is supported everywhere. http://crbug.com/580626.
42 MEDIA_EXPORT bool IsUnifiedMediaPipelineEnabled(); 51 MEDIA_EXPORT bool IsUnifiedMediaPipelineEnabled();
43 52
ddorwin 2016/03/24 18:05:11 Do we need a flag so we can selectively enable the
xhwang 2016/03/24 21:26:04 OOC, why do you want this?
44 // Similar to IsUnifiedMediaPipelineEnabled() but will also return true if
45 // MediaCodec is not available (allowing the unified pipeline to take over for
46 // cases where existing pipeline has no support). As above, codecs requiring
47 // platform support may not be available.
48 MEDIA_EXPORT bool IsUnifiedMediaPipelineEnabledForMse();
49
50 // Returns whether the platform decoders are available for use. 53 // Returns whether the platform decoders are available for use.
51 // This includes decoders being available on the platform and accessible, such 54 // This includes decoders being available on the platform and accessible, such
52 // as via the GPU process. Should only be used for actual decoders 55 // as via the GPU process. Should only be used for actual decoders
53 // (e.g. MediaCodec) and not full-featured players (e.g. MediaPlayer). 56 // (e.g. MediaCodec) and not full-featured players (e.g. MediaPlayer).
54 MEDIA_EXPORT bool ArePlatformDecodersAvailable(); 57 MEDIA_EXPORT bool ArePlatformDecodersAvailable();
55 #endif 58 #endif
56 59
57 } // namespace media 60 } // namespace media
58 61
59 #endif // MEDIA_BASE_MEDIA_H_ 62 #endif // MEDIA_BASE_MEDIA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698