Skip to content
Snippets Groups Projects
Commit 02765c37 authored by Damien Riegel's avatar Damien Riegel Committed by Adrien Béraud
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -333,10 +333,10 @@ SinkClient::update(Observable<std::shared_ptr<VideoFrame>>* /*obs*/, ...@@ -333,10 +333,10 @@ SinkClient::update(Observable<std::shared_ptr<VideoFrame>>* /*obs*/,
VideoScaler scaler; VideoScaler scaler;
const int width = f.width(); const int width = f.width();
const int height = f.height(); const int height = f.height();
#ifndef __APPLE__ #if (defined(__ANDROID__) || defined(__APPLE__))
const int format = VIDEO_PIXFMT_BGRA;
#else
const int format = VIDEO_PIXFMT_RGBA; const int format = VIDEO_PIXFMT_RGBA;
#else
const int format = VIDEO_PIXFMT_BGRA;
#endif #endif
const auto bytes = videoFrameSize(format, width, height); const auto bytes = videoFrameSize(format, width, height);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment