OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_ | |
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/macros.h" | |
12 #include "media/base/eme_constants.h" | |
13 #include "media/base/media_export.h" | |
14 | |
15 namespace media { | |
16 | |
17 // Allows embedders to modify the Android DRM flow. Delegates are registered | |
xhwang
2015/04/24 04:52:24
s/DRM/MediaDrm
gunsch
2015/04/27 23:44:13
Done.
| |
18 // to a specific key system. | |
19 class MEDIA_EXPORT MediaDrmBridgeDelegate { | |
20 public: | |
21 MediaDrmBridgeDelegate(); | |
22 virtual ~MediaDrmBridgeDelegate(); | |
23 | |
24 // Returns the UUID of the DRM scheme that this delegate applies to. | |
25 virtual const std::vector<uint8_t> GetUUID() const = 0; | |
26 | |
27 // Invoked from CreateSession. | |
28 // If |init_data_out| is filled, it replaces |init_data| to send to the | |
29 // DRM plugin. | |
30 // If |optional_parameters_out| is filled, it is expected to be an | |
31 // even-length list of (key, value) pairs to send to the DRM plugin. | |
xhwang
2015/04/24 04:52:24
s/DRM plugin/MediaDrm. We only talk to Android API
gunsch
2015/04/27 23:44:13
Done.
| |
32 // Returns false if the request should be rejected. | |
33 virtual bool OnCreateSession( | |
34 const EmeInitDataType init_data_type, | |
35 const uint8_t* init_data, | |
36 int init_data_length, | |
xhwang
2015/04/24 04:52:24
nit: use std::vector<uint8_t> now.
gunsch
2015/04/27 23:44:13
Done.
| |
37 std::vector<uint8_t>& init_data_out, | |
38 std::vector<std::string>& optional_parameters_out); | |
xhwang
2015/04/24 04:52:24
output parameters should be pointers. We do not us
gunsch
2015/04/27 23:44:13
Done.
| |
39 | |
40 private: | |
41 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridgeDelegate); | |
42 }; | |
43 | |
44 } // namespace media | |
45 | |
46 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_ | |
OLD | NEW |