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

Side by Side Diff: chromecast/media/cdm/browser_cdm_cast.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 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 CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ 5 #ifndef CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_
6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ 6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 10 matching lines...) Expand all
21 namespace base { 21 namespace base {
22 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
23 } 23 }
24 24
25 namespace media { 25 namespace media {
26 class PlayerTrackerImpl; 26 class PlayerTrackerImpl;
27 } 27 }
28 28
29 namespace chromecast { 29 namespace chromecast {
30 namespace media { 30 namespace media {
31 class DecryptContext; 31 class DecryptContextImpl;
32 32
33 // BrowserCdmCast is an extension of BrowserCdm that provides common 33 // BrowserCdmCast is an extension of BrowserCdm that provides common
34 // functionality across CDM implementations. 34 // functionality across CDM implementations.
35 // All these additional functions are synchronous so: 35 // All these additional functions are synchronous so:
36 // - either both the CDM and the media pipeline must be running on the same 36 // - either both the CDM and the media pipeline must be running on the same
37 // thread, 37 // thread,
38 // - or BrowserCdmCast implementations must use some locks. 38 // - or BrowserCdmCast implementations must use some locks.
39 // 39 //
40 class BrowserCdmCast : public ::media::BrowserCdm { 40 class BrowserCdmCast : public ::media::BrowserCdm {
41 public: 41 public:
(...skipping 11 matching lines...) Expand all
53 int RegisterPlayer(const base::Closure& new_key_cb, 53 int RegisterPlayer(const base::Closure& new_key_cb,
54 const base::Closure& cdm_unset_cb) override; 54 const base::Closure& cdm_unset_cb) override;
55 void UnregisterPlayer(int registration_id) override; 55 void UnregisterPlayer(int registration_id) override;
56 56
57 // ::media::BrowserCdm implementation: 57 // ::media::BrowserCdm implementation:
58 ::media::CdmContext* GetCdmContext() override; 58 ::media::CdmContext* GetCdmContext() override;
59 59
60 // Returns the decryption context needed to decrypt frames encrypted with 60 // Returns the decryption context needed to decrypt frames encrypted with
61 // |key_id|. 61 // |key_id|.
62 // Returns null if |key_id| is not available. 62 // Returns null if |key_id| is not available.
63 virtual scoped_refptr<DecryptContext> GetDecryptContext( 63 virtual scoped_ptr<DecryptContextImpl> GetDecryptContext(
64 const std::string& key_id) const = 0; 64 const std::string& key_id) const = 0;
65 65
66 protected: 66 protected:
67 void OnSessionMessage(const std::string& session_id, 67 void OnSessionMessage(const std::string& session_id,
68 const std::vector<uint8_t>& message, 68 const std::vector<uint8_t>& message,
69 const GURL& destination_url, 69 const GURL& destination_url,
70 ::media::MediaKeys::MessageType message_type); 70 ::media::MediaKeys::MessageType message_type);
71 void OnSessionClosed(const std::string& session_id); 71 void OnSessionClosed(const std::string& session_id);
72 void OnSessionKeysChange(const std::string& session_id, 72 void OnSessionKeysChange(const std::string& session_id,
73 const ::media::KeyIdAndKeyPairs& keys); 73 const ::media::KeyIdAndKeyPairs& keys);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 base::ThreadChecker thread_checker_; 137 base::ThreadChecker thread_checker_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCastUi); 139 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCastUi);
140 }; 140 };
141 141
142 } // namespace media 142 } // namespace media
143 } // namespace chromecast 143 } // namespace chromecast
144 144
145 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ 145 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698