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

Side by Side Diff: chromecast/media/base/cast_media_default.cc

Issue 1372393007: [Chromecast] Upgrade to new CMA backend API (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address alokp@ comments Created 5 years, 2 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chromecast/media/audio/cast_audio_output_stream_unittest.cc ('k') | chromecast/media/cma/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698