Roll src/third_party/WebKit 6b63e20:35e1984 (svn 201060:201061)
[chromium-blink-merge.git] / chromecast / media / base / cast_media_default.cc
blob703cb4e9752770c58e6d6de950ff5e446c5d2a6d
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
3 // found in the LICENSE file.
5 #include "chromecast/media/cma/backend/media_pipeline_backend_default.h"
6 #include "chromecast/public/cast_media_shlib.h"
7 #include "chromecast/public/graphics_types.h"
8 #include "chromecast/public/media_codec_support_shlib.h"
9 #include "chromecast/public/video_plane.h"
11 namespace chromecast {
12 namespace media {
13 namespace {
15 class DefaultVideoPlane : public VideoPlane {
16 public:
17 ~DefaultVideoPlane() override {}
19 Size GetScreenResolution() override {
20 return Size(1920, 1080);
23 void SetGeometry(const RectF& display_rect,
24 CoordinateType coordinate_type,
25 Transform transform) override {}
27 void OnScreenResolutionChanged(const Size& screen_res) override {}
30 DefaultVideoPlane* g_video_plane = nullptr;
32 } // namespace
34 void CastMediaShlib::Initialize(const std::vector<std::string>& argv) {
35 g_video_plane = new DefaultVideoPlane();
38 void CastMediaShlib::Finalize() {
39 delete g_video_plane;
40 g_video_plane = nullptr;
43 VideoPlane* CastMediaShlib::GetVideoPlane() {
44 return g_video_plane;
47 MediaPipelineBackend* CastMediaShlib::CreateMediaPipelineBackend(
48 const MediaPipelineDeviceParams& params) {
49 return new MediaPipelineBackendDefault(params);
52 MediaCodecSupportShlib::CodecSupport MediaCodecSupportShlib::IsSupported(
53 const std::string& codec) {
54 return kDefault;
57 } // namespace media
58 } // namespace chromecast