| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMECAST_COMMON_MEDIA_CAST_MEDIA_CLIENT_H_ | |
| 6 #define CHROMECAST_COMMON_MEDIA_CAST_MEDIA_CLIENT_H_ | |
| 7 | |
| 8 #include "base/lazy_instance.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "chromecast/media/base/supported_codec_profile_levels_memo.h" | |
| 11 #include "media/base/media_client.h" | |
| 12 | |
| 13 namespace chromecast { | |
| 14 namespace media { | |
| 15 | |
| 16 // Forwards MediaClient::IsSupportedVideoConfig calls to MediaCapabilitiesShlib | |
| 17 // and the rest of the calls to the default content media client (i.e. | |
| 18 // content::RenderMediaClient). | |
| 19 class CastMediaClient : public ::media::MediaClient { | |
| 20 public: | |
| 21 // Initialize CastMediaClient and SetMediaClient(). Note that the instance | |
| 22 // is not exposed because no content code needs to directly access it. | |
| 23 static void Initialize(SupportedCodecProfileLevelsMemo* memo); | |
| 24 | |
| 25 // MediaClient implementation | |
| 26 void AddKeySystemsInfoForUMA(std::vector<::media::KeySystemInfoForUMA>* | |
| 27 key_systems_info_for_uma) override; | |
| 28 bool IsKeySystemsUpdateNeeded() override; | |
| 29 void AddSupportedKeySystems( | |
| 30 std::vector<std::unique_ptr<::media::KeySystemProperties>>* | |
| 31 key_systems_properties) override; | |
| 32 void RecordRapporURL(const std::string& metric, const GURL& url) override; | |
| 33 bool IsSupportedAudioConfig(const ::media::AudioConfig& config) override; | |
| 34 bool IsSupportedVideoConfig(const ::media::VideoConfig& config) override; | |
| 35 | |
| 36 private: | |
| 37 friend struct base::LazyInstanceTraitsBase<CastMediaClient>; | |
| 38 | |
| 39 CastMediaClient(::media::MediaClient* content_media_client, | |
| 40 SupportedCodecProfileLevelsMemo* supported_profiles); | |
| 41 ~CastMediaClient() override; | |
| 42 | |
| 43 ::media::MediaClient* content_media_client_; | |
| 44 SupportedCodecProfileLevelsMemo* supported_profiles_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(CastMediaClient); | |
| 47 }; | |
| 48 | |
| 49 } // namespace media | |
| 50 } // namespace chromecast | |
| 51 | |
| 52 #endif // CHROMECAST_COMMON_MEDIA_CAST_MEDIA_CLIENT_H_ | |
| OLD | NEW |