OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_REMOTING_RPC_PROTO_UTILS_H_ | 5 #ifndef MEDIA_REMOTING_RPC_PROTO_UTILS_H_ |
6 #define MEDIA_REMOTING_RPC_PROTO_UTILS_H_ | 6 #define MEDIA_REMOTING_RPC_PROTO_UTILS_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "media/base/audio_decoder_config.h" | 14 #include "media/base/audio_decoder_config.h" |
15 #include "media/base/cdm_config.h" | 15 #include "media/base/cdm_config.h" |
16 #include "media/base/cdm_key_information.h" | 16 #include "media/base/cdm_key_information.h" |
| 17 #include "media/base/cdm_promise.h" |
17 #include "media/base/decoder_buffer.h" | 18 #include "media/base/decoder_buffer.h" |
18 #include "media/base/demuxer_stream.h" | 19 #include "media/base/demuxer_stream.h" |
19 #include "media/base/eme_constants.h" | 20 #include "media/base/eme_constants.h" |
20 #include "media/base/media_keys.h" | 21 #include "media/base/media_keys.h" |
21 #include "media/base/pipeline_status.h" | 22 #include "media/base/pipeline_status.h" |
22 #include "media/base/video_decoder_config.h" | 23 #include "media/base/video_decoder_config.h" |
23 #include "media/remoting/remoting_rpc_message.pb.h" | 24 #include "media/remoting/remoting_rpc_message.pb.h" |
24 | 25 |
25 namespace media { | 26 namespace media { |
26 namespace remoting { | 27 namespace remoting { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 CdmPromiseResult* result); | 105 CdmPromiseResult* result); |
105 bool ConvertProtoToCdmPromiseWithCdmIdSessionId(const pb::RpcMessage& message, | 106 bool ConvertProtoToCdmPromiseWithCdmIdSessionId(const pb::RpcMessage& message, |
106 CdmPromiseResult* result, | 107 CdmPromiseResult* result, |
107 int* cdm_id, | 108 int* cdm_id, |
108 std::string* session_id); | 109 std::string* session_id); |
109 | 110 |
110 //================================================================== | 111 //================================================================== |
111 class CdmPromiseResult { | 112 class CdmPromiseResult { |
112 public: | 113 public: |
113 CdmPromiseResult(); | 114 CdmPromiseResult(); |
114 CdmPromiseResult(::media::MediaKeys::Exception exception, | 115 CdmPromiseResult(::media::CdmPromise::Exception exception, |
115 uint32_t system_code, | 116 uint32_t system_code, |
116 std::string error_message); | 117 std::string error_message); |
117 CdmPromiseResult(const CdmPromiseResult& other); | 118 CdmPromiseResult(const CdmPromiseResult& other); |
118 ~CdmPromiseResult(); | 119 ~CdmPromiseResult(); |
119 | 120 |
120 static CdmPromiseResult SuccessResult(); | 121 static CdmPromiseResult SuccessResult(); |
121 | 122 |
122 bool success() const { return success_; } | 123 bool success() const { return success_; } |
123 ::media::MediaKeys::Exception exception() const { return exception_; } | 124 ::media::CdmPromise::Exception exception() const { return exception_; } |
124 uint32_t system_code() const { return system_code_; } | 125 uint32_t system_code() const { return system_code_; } |
125 const std::string& error_message() const { return error_message_; } | 126 const std::string& error_message() const { return error_message_; } |
126 | 127 |
127 private: | 128 private: |
128 bool success_; | 129 bool success_; |
129 ::media::MediaKeys::Exception exception_; | 130 ::media::CdmPromise::Exception exception_; |
130 uint32_t system_code_; | 131 uint32_t system_code_; |
131 std::string error_message_; | 132 std::string error_message_; |
132 }; | 133 }; |
133 | 134 |
134 } // namespace remoting | 135 } // namespace remoting |
135 } // namespace media | 136 } // namespace media |
136 | 137 |
137 #endif // MEDIA_REMOTING_RPC_PROTO_UTILS_H_ | 138 #endif // MEDIA_REMOTING_RPC_PROTO_UTILS_H_ |
OLD | NEW |