Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: webkit/renderer/media/crypto/ppapi/cdm_video_decoder.cc

Issue 22362007: Relocate last remnants of webkit/renderer/media code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make chromeos crypto dep explicit. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "webkit/renderer/media/crypto/ppapi/cdm/content_decryption_module.h"
8 #include "webkit/renderer/media/crypto/ppapi/cdm_video_decoder.h"
9
10 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
11 #include "webkit/renderer/media/crypto/ppapi/fake_cdm_video_decoder.h"
12 #endif
13
14 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
15 #include "webkit/renderer/media/crypto/ppapi/ffmpeg_cdm_video_decoder.h"
16 #endif
17
18 #if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
19 #include "webkit/renderer/media/crypto/ppapi/libvpx_cdm_video_decoder.h"
20 #endif
21
22 namespace webkit_media {
23
24 scoped_ptr<CdmVideoDecoder> CreateVideoDecoder(
25 cdm::Host* host, const cdm::VideoDecoderConfig& config) {
26 scoped_ptr<CdmVideoDecoder> video_decoder;
27 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
28 video_decoder.reset(new FakeCdmVideoDecoder(host));
29
30 if (!video_decoder->Initialize(config))
31 video_decoder.reset();
32 #else
33
34 #if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
35 if (config.codec == cdm::VideoDecoderConfig::kCodecVp8) {
36 video_decoder.reset(new LibvpxCdmVideoDecoder(host));
37
38 if (!video_decoder->Initialize(config))
39 video_decoder.reset();
40
41 return video_decoder.Pass();
42 }
43 #endif
44
45 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
46 video_decoder.reset(new FFmpegCdmVideoDecoder(host));
47
48 if (!video_decoder->Initialize(config))
49 video_decoder.reset();
50 #endif
51
52 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
53
54 return video_decoder.Pass();
55 }
56
57 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/renderer/media/crypto/ppapi/cdm_video_decoder.h ('k') | webkit/renderer/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698