| 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/ppapi_cdm_adapter.h" | 5 #include "media/cdm/ppapi/ppapi_cdm_adapter.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 case PP_VIDEOCODECPROFILE_H264_EXTENDED: | 189 case PP_VIDEOCODECPROFILE_H264_EXTENDED: |
| 190 return cdm::VideoDecoderConfig::kH264ProfileExtended; | 190 return cdm::VideoDecoderConfig::kH264ProfileExtended; |
| 191 case PP_VIDEOCODECPROFILE_H264_HIGH: | 191 case PP_VIDEOCODECPROFILE_H264_HIGH: |
| 192 return cdm::VideoDecoderConfig::kH264ProfileHigh; | 192 return cdm::VideoDecoderConfig::kH264ProfileHigh; |
| 193 case PP_VIDEOCODECPROFILE_H264_HIGH_10: | 193 case PP_VIDEOCODECPROFILE_H264_HIGH_10: |
| 194 return cdm::VideoDecoderConfig::kH264ProfileHigh10; | 194 return cdm::VideoDecoderConfig::kH264ProfileHigh10; |
| 195 case PP_VIDEOCODECPROFILE_H264_HIGH_422: | 195 case PP_VIDEOCODECPROFILE_H264_HIGH_422: |
| 196 return cdm::VideoDecoderConfig::kH264ProfileHigh422; | 196 return cdm::VideoDecoderConfig::kH264ProfileHigh422; |
| 197 case PP_VIDEOCODECPROFILE_H264_HIGH_444_PREDICTIVE: | 197 case PP_VIDEOCODECPROFILE_H264_HIGH_444_PREDICTIVE: |
| 198 return cdm::VideoDecoderConfig::kH264ProfileHigh444Predictive; | 198 return cdm::VideoDecoderConfig::kH264ProfileHigh444Predictive; |
| 199 // TODO(servolk): See crbug.com/592074. We'll need to update this code to |
| 200 // handle different VP9 profiles properly after adding VP9 profiles in |
| 201 // media/cdm/api/content_decryption_module.h in a separate CL. |
| 202 // For now return kProfileNotNeeded to avoid breaking unit tests. |
| 203 case PP_VIDEOCODECPROFILE_VP9_PROFILE0: |
| 204 case PP_VIDEOCODECPROFILE_VP9_PROFILE1: |
| 205 case PP_VIDEOCODECPROFILE_VP9_PROFILE2: |
| 206 case PP_VIDEOCODECPROFILE_VP9_PROFILE3: |
| 207 return cdm::VideoDecoderConfig::kProfileNotNeeded; |
| 199 default: | 208 default: |
| 200 return cdm::VideoDecoderConfig::kUnknownVideoCodecProfile; | 209 return cdm::VideoDecoderConfig::kUnknownVideoCodecProfile; |
| 201 } | 210 } |
| 202 } | 211 } |
| 203 | 212 |
| 204 cdm::VideoFormat PpDecryptedFrameFormatToCdmVideoFormat( | 213 cdm::VideoFormat PpDecryptedFrameFormatToCdmVideoFormat( |
| 205 PP_DecryptedFrameFormat format) { | 214 PP_DecryptedFrameFormat format) { |
| 206 switch (format) { | 215 switch (format) { |
| 207 case PP_DECRYPTEDFRAMEFORMAT_YV12: | 216 case PP_DECRYPTEDFRAMEFORMAT_YV12: |
| 208 return cdm::kYv12; | 217 return cdm::kYv12; |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 } // namespace media | 1326 } // namespace media |
| 1318 | 1327 |
| 1319 namespace pp { | 1328 namespace pp { |
| 1320 | 1329 |
| 1321 // Factory function for your specialization of the Module object. | 1330 // Factory function for your specialization of the Module object. |
| 1322 Module* CreateModule() { | 1331 Module* CreateModule() { |
| 1323 return new media::PpapiCdmAdapterModule(); | 1332 return new media::PpapiCdmAdapterModule(); |
| 1324 } | 1333 } |
| 1325 | 1334 |
| 1326 } // namespace pp | 1335 } // namespace pp |
| OLD | NEW |