Commit 9e773cc7 authored by Bryan Clark's avatar Bryan Clark Committed by Commit Bot

Create a video plane in the cast desktop media library.

This allows callers to deference the result of
CastMediaShlib::GetVideoPlane() without crashing cast_shell.

Change-Id: I09b8a761359736195e42bec1708174a4e939a69f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854186Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: Bryan Clark <bryanclark@google.com>
Cr-Commit-Position: refs/heads/master@{#704876}
parent e48e8eb9
...@@ -5,16 +5,26 @@ ...@@ -5,16 +5,26 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "base/no_destructor.h"
#include "chromecast/public/cast_media_shlib.h" #include "chromecast/public/cast_media_shlib.h"
#include "chromecast/public/media/media_capabilities_shlib.h" #include "chromecast/public/media/media_capabilities_shlib.h"
#include "chromecast/public/video_plane.h"
namespace chromecast { namespace chromecast {
namespace media { namespace media {
class DesktopVideoPlane : public VideoPlane {
public:
~DesktopVideoPlane() override = default;
void SetGeometry(const RectF& display_rect, Transform transform) override {}
};
void CastMediaShlib::Initialize(const std::vector<std::string>& argv) {} void CastMediaShlib::Initialize(const std::vector<std::string>& argv) {}
VideoPlane* CastMediaShlib::GetVideoPlane() { VideoPlane* CastMediaShlib::GetVideoPlane() {
return nullptr; static base::NoDestructor<DesktopVideoPlane> g_video_plane;
return g_video_plane.get();
} }
bool MediaCapabilitiesShlib::IsSupportedVideoConfig(VideoCodec codec, bool MediaCapabilitiesShlib::IsSupportedVideoConfig(VideoCodec codec,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment