From 4f08d52754e84e90302885b9443b9347a626b69e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 27 Dec 2025 15:40:59 -0600 Subject: [PATCH] Enable DRM_PRIME frames for the TH1520 --- app/streaming/video/ffmpeg-renderers/drm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/streaming/video/ffmpeg-renderers/drm.cpp b/app/streaming/video/ffmpeg-renderers/drm.cpp index 3ea9204c..feac9988 100644 --- a/app/streaming/video/ffmpeg-renderers/drm.cpp +++ b/app/streaming/video/ffmpeg-renderers/drm.cpp @@ -261,6 +261,12 @@ bool DrmRenderer::prepareDecoderContext(AVCodecContext* context, AVDictionary** // https://doc-en.rvspace.org/VisionFive2/DG_Multimedia/JH7110_SDK/hevc_omx.html av_dict_set(options, "omx_pix_fmt", "nv12", 0); + // This option controls the pixel format for the h264_omx and hevc_omx decoders + // used on the TH1520 running RevyOS. The decoder will give us software frames + // by default but we can opt in for DRM_PRIME frames to dramatically improve + // streaming performance. + av_dict_set_int(options, "drm_prime", 1, 0); + if (m_HwDeviceType != AV_HWDEVICE_TYPE_NONE) { context->hw_device_ctx = av_buffer_ref(m_HwContext); }