| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MEDIA_BASE_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_BASE_MEDIA_CLIENT_H_ |
| 6 #define MEDIA_BASE_MEDIA_CLIENT_H_ | 6 #define MEDIA_BASE_MEDIA_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "media/base/decode_capabilities.h" |
| 11 #include "media/base/key_system_properties.h" | 12 #include "media/base/key_system_properties.h" |
| 12 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
| 13 #include "media/base/video_codecs.h" | 14 #include "media/base/video_codecs.h" |
| 14 #include "media/base/video_color_space.h" | 15 #include "media/base/video_color_space.h" |
| 15 #include "ui/gfx/color_space.h" | 16 #include "ui/gfx/color_space.h" |
| 16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 17 | 18 |
| 18 namespace media { | 19 namespace media { |
| 19 | 20 |
| 20 class MediaClient; | 21 class MediaClient; |
| 21 | 22 |
| 22 // Setter for the client. If a customized client is needed, it should be set | 23 // Setter for the client. If a customized client is needed, it should be set |
| 23 // early, before the client could possibly be used. | 24 // early, before the client could possibly be used. |
| 24 MEDIA_EXPORT void SetMediaClient(MediaClient* media_client); | 25 MEDIA_EXPORT void SetMediaClient(MediaClient* media_client); |
| 25 | 26 |
| 26 // Media's embedder API should only be used by media. | 27 // Media's embedder API should only be used by media. |
| 27 #if defined(MEDIA_IMPLEMENTATION) || defined(MEDIA_BLINK_IMPLEMENTATION) | 28 #if defined(MEDIA_IMPLEMENTATION) || defined(MEDIA_BLINK_IMPLEMENTATION) |
| 28 // Getter for the client. Returns NULL if no customized client is needed. | 29 // Getter for the client. Returns NULL if no customized client is needed. |
| 29 MEDIA_EXPORT MediaClient* GetMediaClient(); | 30 MEDIA_EXPORT MediaClient* GetMediaClient(); |
| 30 #endif | 31 #endif |
| 31 | 32 |
| 32 struct MEDIA_EXPORT VideoConfig { | |
| 33 VideoCodec codec; | |
| 34 VideoCodecProfile profile; | |
| 35 int level; | |
| 36 media::VideoColorSpace color_space; | |
| 37 }; | |
| 38 | |
| 39 struct MEDIA_EXPORT KeySystemInfoForUMA { | 33 struct MEDIA_EXPORT KeySystemInfoForUMA { |
| 40 KeySystemInfoForUMA(const std::string& key_system, | 34 KeySystemInfoForUMA(const std::string& key_system, |
| 41 const std::string& key_system_name_for_uma); | 35 const std::string& key_system_name_for_uma); |
| 42 ~KeySystemInfoForUMA(); | 36 ~KeySystemInfoForUMA(); |
| 43 | 37 |
| 44 // Concrete key system name; | 38 // Concrete key system name; |
| 45 std::string key_system; | 39 std::string key_system; |
| 46 | 40 |
| 47 // Display name for UMA reporting. For example, the display name for | 41 // Display name for UMA reporting. For example, the display name for |
| 48 // "org.w3.clearkey" is "ClearKey". When providing this value, make sure to | 42 // "org.w3.clearkey" is "ClearKey". When providing this value, make sure to |
| (...skipping 27 matching lines...) Expand all Loading... |
| 76 virtual void RecordRapporURL(const std::string& metric, const GURL& url) = 0; | 70 virtual void RecordRapporURL(const std::string& metric, const GURL& url) = 0; |
| 77 | 71 |
| 78 // Returns true if the given combination of video codec, profile and level is | 72 // Returns true if the given combination of video codec, profile and level is |
| 79 // supported. The |level| value is codec-specific. | 73 // supported. The |level| value is codec-specific. |
| 80 virtual bool IsSupportedVideoConfig(const VideoConfig& config) = 0; | 74 virtual bool IsSupportedVideoConfig(const VideoConfig& config) = 0; |
| 81 }; | 75 }; |
| 82 | 76 |
| 83 } // namespace media | 77 } // namespace media |
| 84 | 78 |
| 85 #endif // MEDIA_BASE_MEDIA_CLIENT_H_ | 79 #endif // MEDIA_BASE_MEDIA_CLIENT_H_ |
| OLD | NEW |