Commit 02765c37 authored by Damien Riegel's avatar Damien Riegel Committed by Adrien Béraud

android/video: set display format to RGBA

On Android, ANativeSurface only supports RGBA, set the format
accordingly. This is the only change required in the daemon to be able
to display video.

Issue: #79814
Change-Id: I1c91bf40013e2cf29377824f4c957cc7ca85d52c
parent bc3d8e9f
......@@ -333,10 +333,10 @@ SinkClient::update(Observable<std::shared_ptr<VideoFrame>>* /*obs*/,
VideoScaler scaler;
const int width = f.width();
const int height = f.height();
#ifndef __APPLE__
const int format = VIDEO_PIXFMT_BGRA;
#if (defined(__ANDROID__) || defined(__APPLE__))
const int format = VIDEO_PIXFMT_RGBA;
const int format = VIDEO_PIXFMT_BGRA;
const auto bytes = videoFrameSize(format, width, height);
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