Commit e6f9ff4e authored by Éloi Bail's avatar Éloi Bail Committed by Gerrit Code Review

daemon: send RGBA frames for direct rendering

Osx manages only RGB color space

Refs #66543

Change-Id: I8474ca044d8b631ee369ed73bf3d6aa7a5de1f52
parent 2a2154e9
......@@ -107,6 +107,7 @@ int libav_pixel_format(int fmt)
{
switch (fmt) {
case video::VIDEO_PIXFMT_BGRA: return PIXEL_FORMAT(BGRA);
case video::VIDEO_PIXFMT_RGBA: return PIXEL_FORMAT(RGBA);
case video::VIDEO_PIXFMT_YUV420P: return PIXEL_FORMAT(YUV420P);
}
return fmt;
......
......@@ -316,7 +316,7 @@ SinkClient::update(Observable<std::shared_ptr<VideoFrame>>* /*obs*/,
VideoScaler scaler;
const int width = f->width();
const int height = f->height();
const int format = VIDEO_PIXFMT_BGRA;
const int format = VIDEO_PIXFMT_RGBA;
const auto bytes = videoFrameSize(format, width, height);
targetData_.resize(bytes);
......
......@@ -58,6 +58,7 @@ namespace ring { namespace video {
enum VideoPixelFormat {
VIDEO_PIXFMT_BGRA = -1,
VIDEO_PIXFMT_YUV420P = -2,
VIDEO_PIXFMT_RGBA = -3,
};
template <typename T> class Observer;
......
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