Chromium Code Reviews| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 input_buffer->subsamples = &(*subsamples)[0]; | 90 input_buffer->subsamples = &(*subsamples)[0]; |
| 91 } | 91 } |
| 92 | 92 |
| 93 input_buffer->timestamp = encrypted_block_info.tracking_info.timestamp; | 93 input_buffer->timestamp = encrypted_block_info.tracking_info.timestamp; |
| 94 } | 94 } |
| 95 | 95 |
| 96 PP_DecryptResult CdmStatusToPpDecryptResult(cdm::Status status) { | 96 PP_DecryptResult CdmStatusToPpDecryptResult(cdm::Status status) { |
| 97 switch (status) { | 97 switch (status) { |
| 98 case cdm::kSuccess: | 98 case cdm::kSuccess: |
| 99 return PP_DECRYPTRESULT_SUCCESS; | 99 return PP_DECRYPTRESULT_SUCCESS; |
| 100 case cdm::kNeedMoreData: | |
| 101 return PP_DECRYPTRESULT_NEEDMOREDATA; | |
| 100 case cdm::kNoKey: | 102 case cdm::kNoKey: |
| 101 return PP_DECRYPTRESULT_DECRYPT_NOKEY; | 103 return PP_DECRYPTRESULT_DECRYPT_NOKEY; |
| 102 case cdm::kNeedMoreData: | 104 case cdm::kSessionError: |
|
ddorwin
2015/04/23 00:33:42
This also appears to only be used by the Initializ
jrummell
2015/04/23 21:10:15
Fixed.
| |
| 103 return PP_DECRYPTRESULT_NEEDMOREDATA; | 105 return PP_DECRYPTRESULT_SESSION_ERROR; |
| 104 case cdm::kDecryptError: | 106 case cdm::kDecryptError: |
| 105 return PP_DECRYPTRESULT_DECRYPT_ERROR; | 107 return PP_DECRYPTRESULT_DECRYPT_ERROR; |
| 106 case cdm::kDecodeError: | 108 case cdm::kDecodeError: |
| 107 return PP_DECRYPTRESULT_DECODE_ERROR; | 109 return PP_DECRYPTRESULT_DECODE_ERROR; |
| 110 case cdm::kDeferredInitialization: | |
|
ddorwin
2015/04/23 00:33:42
This is only expected from the Initialize* methods
jrummell
2015/04/23 21:10:15
Fixed.
| |
| 111 return PP_DECRYPTRESULT_DEFERRED_INITIALIZATION; | |
| 108 default: | 112 default: |
| 109 PP_NOTREACHED(); | 113 PP_NOTREACHED(); |
| 110 return PP_DECRYPTRESULT_DECODE_ERROR; | 114 return PP_DECRYPTRESULT_DECODE_ERROR; |
| 111 } | 115 } |
| 112 } | 116 } |
| 113 | 117 |
| 114 PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat( | 118 PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat( |
| 115 cdm::VideoFormat format) { | 119 cdm::VideoFormat format) { |
| 116 switch (format) { | 120 switch (format) { |
| 117 case cdm::kYv12: | 121 case cdm::kYv12: |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1372 } // namespace media | 1376 } // namespace media |
| 1373 | 1377 |
| 1374 namespace pp { | 1378 namespace pp { |
| 1375 | 1379 |
| 1376 // Factory function for your specialization of the Module object. | 1380 // Factory function for your specialization of the Module object. |
| 1377 Module* CreateModule() { | 1381 Module* CreateModule() { |
| 1378 return new media::CdmAdapterModule(); | 1382 return new media::CdmAdapterModule(); |
| 1379 } | 1383 } |
| 1380 | 1384 |
| 1381 } // namespace pp | 1385 } // namespace pp |
| OLD | NEW |