OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chromecast/media/cma/backend/media_pipeline_backend_default.h" | 5 #include "chromecast/media/cma/backend/media_pipeline_backend_default.h" |
6 #include "chromecast/public/cast_media_shlib.h" | 6 #include "chromecast/public/cast_media_shlib.h" |
7 #include "chromecast/public/graphics_types.h" | 7 #include "chromecast/public/graphics_types.h" |
8 #include "chromecast/public/media_codec_support_shlib.h" | 8 #include "chromecast/public/media_codec_support_shlib.h" |
9 #include "chromecast/public/video_plane.h" | 9 #include "chromecast/public/video_plane.h" |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 delete g_video_plane; | 32 delete g_video_plane; |
33 g_video_plane = nullptr; | 33 g_video_plane = nullptr; |
34 } | 34 } |
35 | 35 |
36 VideoPlane* CastMediaShlib::GetVideoPlane() { | 36 VideoPlane* CastMediaShlib::GetVideoPlane() { |
37 return g_video_plane; | 37 return g_video_plane; |
38 } | 38 } |
39 | 39 |
40 MediaPipelineBackend* CastMediaShlib::CreateMediaPipelineBackend( | 40 MediaPipelineBackend* CastMediaShlib::CreateMediaPipelineBackend( |
41 const MediaPipelineDeviceParams& params) { | 41 const MediaPipelineDeviceParams& params) { |
42 return new MediaPipelineBackendDefault(params); | 42 return new MediaPipelineBackendDefault(); |
43 } | 43 } |
44 | 44 |
45 MediaCodecSupportShlib::CodecSupport MediaCodecSupportShlib::IsSupported( | 45 MediaCodecSupportShlib::CodecSupport MediaCodecSupportShlib::IsSupported( |
46 const std::string& codec) { | 46 const std::string& codec) { |
47 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
48 // TODO(servolk): Find a way to reuse IsCodecSupportedOnAndroid. | 48 // TODO(servolk): Find a way to reuse IsCodecSupportedOnAndroid. |
49 | 49 |
50 // Theora is not supported | 50 // Theora is not supported |
51 if (codec == "theora") | 51 if (codec == "theora") |
52 return kNotSupported; | 52 return kNotSupported; |
53 | 53 |
54 // MPEG-2 variants of AAC are not supported on Android. | 54 // MPEG-2 variants of AAC are not supported on Android. |
55 // MPEG2_AAC_MAIN / MPEG2_AAC_LC / MPEG2_AAC_SSR | 55 // MPEG2_AAC_MAIN / MPEG2_AAC_LC / MPEG2_AAC_SSR |
56 if (codec == "mp4a.66" || codec == "mp4a.67" || codec == "mp4a.68") | 56 if (codec == "mp4a.66" || codec == "mp4a.67" || codec == "mp4a.68") |
57 return kNotSupported; | 57 return kNotSupported; |
58 | 58 |
59 // VP9 is guaranteed supported but is often software-decode only. | 59 // VP9 is guaranteed supported but is often software-decode only. |
60 // TODO(gunsch/servolk): look into querying for hardware decode support. | 60 // TODO(gunsch/servolk): look into querying for hardware decode support. |
61 if (codec == "vp9" || codec == "vp9.0") | 61 if (codec == "vp9" || codec == "vp9.0") |
62 return kNotSupported; | 62 return kNotSupported; |
63 #endif | 63 #endif |
64 | 64 |
65 return kDefault; | 65 return kDefault; |
66 } | 66 } |
67 | 67 |
68 } // namespace media | 68 } // namespace media |
69 } // namespace chromecast | 69 } // namespace chromecast |
OLD | NEW |