OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "media/cdm/ppapi/cdm_adapter.h" | 5 #include "media/cdm/ppapi/cdm_adapter.h" |
6 | 6 |
7 #include "media/base/limits.h" | 7 #include "media/base/limits.h" |
8 #include "media/cdm/ppapi/cdm_file_io_impl.h" | 8 #include "media/cdm/ppapi/cdm_file_io_impl.h" |
9 #include "media/cdm/ppapi/cdm_helpers.h" | 9 #include "media/cdm/ppapi/cdm_helpers.h" |
10 #include "media/cdm/ppapi/cdm_logging.h" | 10 #include "media/cdm/ppapi/cdm_logging.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 case cdm::kSuccess: | 98 case cdm::kSuccess: |
99 return PP_DECRYPTRESULT_SUCCESS; | 99 return PP_DECRYPTRESULT_SUCCESS; |
100 case cdm::kNoKey: | 100 case cdm::kNoKey: |
101 return PP_DECRYPTRESULT_DECRYPT_NOKEY; | 101 return PP_DECRYPTRESULT_DECRYPT_NOKEY; |
102 case cdm::kNeedMoreData: | 102 case cdm::kNeedMoreData: |
103 return PP_DECRYPTRESULT_NEEDMOREDATA; | 103 return PP_DECRYPTRESULT_NEEDMOREDATA; |
104 case cdm::kDecryptError: | 104 case cdm::kDecryptError: |
105 return PP_DECRYPTRESULT_DECRYPT_ERROR; | 105 return PP_DECRYPTRESULT_DECRYPT_ERROR; |
106 case cdm::kDecodeError: | 106 case cdm::kDecodeError: |
107 return PP_DECRYPTRESULT_DECODE_ERROR; | 107 return PP_DECRYPTRESULT_DECODE_ERROR; |
108 default: | 108 case cdm::kSessionError: |
109 PP_NOTREACHED(); | 109 case cdm::kDeferredInitialization: |
110 return PP_DECRYPTRESULT_DECODE_ERROR; | 110 // kSessionError and kDeferredInitialization are only used by the |
111 // Initialize* methods internally and never returned. DecodeAndDecrypt* | |
ddorwin
2015/04/27 22:43:24
Deliver* should never use....
jrummell
2015/04/27 23:02:25
Done.
| |
112 // methods should never return these values. | |
113 break; | |
111 } | 114 } |
115 | |
116 PP_NOTREACHED(); | |
117 return PP_DECRYPTRESULT_DECODE_ERROR; | |
ddorwin
2015/04/27 22:43:24
DECRYPT? This call can result from just Decrypt()
jrummell
2015/04/27 23:02:25
This is what was in the original, and content_decr
| |
112 } | 118 } |
113 | 119 |
114 PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat( | 120 PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat( |
115 cdm::VideoFormat format) { | 121 cdm::VideoFormat format) { |
116 switch (format) { | 122 switch (format) { |
117 case cdm::kYv12: | 123 case cdm::kYv12: |
118 return PP_DECRYPTEDFRAMEFORMAT_YV12; | 124 return PP_DECRYPTEDFRAMEFORMAT_YV12; |
119 case cdm::kI420: | 125 case cdm::kI420: |
120 return PP_DECRYPTEDFRAMEFORMAT_I420; | 126 return PP_DECRYPTEDFRAMEFORMAT_I420; |
121 default: | 127 default: |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1372 } // namespace media | 1378 } // namespace media |
1373 | 1379 |
1374 namespace pp { | 1380 namespace pp { |
1375 | 1381 |
1376 // Factory function for your specialization of the Module object. | 1382 // Factory function for your specialization of the Module object. |
1377 Module* CreateModule() { | 1383 Module* CreateModule() { |
1378 return new media::CdmAdapterModule(); | 1384 return new media::CdmAdapterModule(); |
1379 } | 1385 } |
1380 | 1386 |
1381 } // namespace pp | 1387 } // namespace pp |
OLD | NEW |