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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "webkit/renderer/media/crypto/ppapi/cdm/content_decryption_module.h" | 7 #include "media/cdm/ppapi/cdm_video_decoder.h" |
8 #include "webkit/renderer/media/crypto/ppapi/cdm_video_decoder.h" | |
9 | 8 |
10 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) | 9 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) |
11 #include "webkit/renderer/media/crypto/ppapi/fake_cdm_video_decoder.h" | 10 #include "media/cdm/ppapi/fake_cdm_video_decoder.h" |
12 #endif | 11 #endif |
13 | 12 |
14 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) | 13 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) |
15 #include "webkit/renderer/media/crypto/ppapi/ffmpeg_cdm_video_decoder.h" | 14 #include "media/cdm/ppapi/ffmpeg_cdm_video_decoder.h" |
16 #endif | 15 #endif |
17 | 16 |
18 #if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER) | 17 #if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER) |
19 #include "webkit/renderer/media/crypto/ppapi/libvpx_cdm_video_decoder.h" | 18 #include "media/cdm/ppapi/libvpx_cdm_video_decoder.h" |
20 #endif | 19 #endif |
21 | 20 |
22 namespace webkit_media { | 21 namespace media { |
23 | 22 |
24 scoped_ptr<CdmVideoDecoder> CreateVideoDecoder( | 23 scoped_ptr<CdmVideoDecoder> CreateVideoDecoder( |
25 cdm::Host* host, const cdm::VideoDecoderConfig& config) { | 24 cdm::Host* host, const cdm::VideoDecoderConfig& config) { |
26 scoped_ptr<CdmVideoDecoder> video_decoder; | 25 scoped_ptr<CdmVideoDecoder> video_decoder; |
27 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) | 26 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) |
28 video_decoder.reset(new FakeCdmVideoDecoder(host)); | 27 video_decoder.reset(new FakeCdmVideoDecoder(host)); |
29 | 28 |
30 if (!video_decoder->Initialize(config)) | 29 if (!video_decoder->Initialize(config)) |
31 video_decoder.reset(); | 30 video_decoder.reset(); |
32 #else | 31 #else |
(...skipping 14 matching lines...) Expand all Loading... |
47 | 46 |
48 if (!video_decoder->Initialize(config)) | 47 if (!video_decoder->Initialize(config)) |
49 video_decoder.reset(); | 48 video_decoder.reset(); |
50 #endif | 49 #endif |
51 | 50 |
52 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER | 51 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER |
53 | 52 |
54 return video_decoder.Pass(); | 53 return video_decoder.Pass(); |
55 } | 54 } |
56 | 55 |
57 } // namespace webkit_media | 56 } // namespace media |
OLD | NEW |