mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
* Add Cedar HW video decoder support * Add sunxifbsink gstreamer plugin * sunxifbsink: remove warning log gst-omx: remove resolution check after crop * Add gstreamer scripts * review comments fixes * ffmpeg: enable h264_omx encoder * add missing hashes and use defined git commit for libcedar * mv miyoo specific patches to board * make `gst-omx.mk` less platform specfic * Add header python interpreter to gst-raw.py * Add videoscale with nearest-neighbour to play video with higher resolutions fluently * Use HW scaler * libcedarc: fix crash when playing 640x480 video * kernel: Add patch to increase VRAM * Add fast gstreamer player * fix gst-play hangs * Add matroska plugin * remove target --------- Co-authored-by: Apaczer <94932128+Apaczer@users.noreply.github.com>
72 lines
2.7 KiB
Diff
72 lines
2.7 KiB
Diff
From c8cb9db356cb7edba473ecf58ddad1209b6fd5e2 Mon Sep 17 00:00:00 2001
|
|
From: tiopxyz <tiopxyz@gmail.com>
|
|
Date: Thu, 10 Jul 2025 15:08:29 +0200
|
|
Subject: [PATCH] sunxifbsink: infer input width/height from upstream caps if
|
|
not set manually
|
|
|
|
---
|
|
src/gstframebuffersink.c | 47 +++++++++++++++++++++++++---------------
|
|
1 file changed, 30 insertions(+), 17 deletions(-)
|
|
|
|
diff --git a/src/gstframebuffersink.c b/src/gstframebuffersink.c
|
|
index a967cdb..9d43c24 100644
|
|
--- a/src/gstframebuffersink.c
|
|
+++ b/src/gstframebuffersink.c
|
|
@@ -1144,23 +1144,36 @@ gst_framebuffersink_caps_set_preferences (GstFramebufferSink *framebuffersink,
|
|
/* If hardware scaling is supported, and a specific video size is requested,
|
|
allow any reasonable size (except when the width/height_before_scaler
|
|
properties are set) and use the scaler. */
|
|
- if (framebuffersink->use_hardware_overlay &&
|
|
- (framebuffersink->requested_video_width != 0 ||
|
|
- framebuffersink->requested_video_height != 0)) {
|
|
- if (framebuffersink->width_before_scaling != 0)
|
|
- gst_caps_set_simple (caps, "width", G_TYPE_INT,
|
|
- framebuffersink->width_before_scaling, NULL);
|
|
- else
|
|
- gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1,
|
|
- GST_VIDEO_INFO_WIDTH (&framebuffersink->screen_info), NULL);
|
|
- if (framebuffersink->height_before_scaling != 0)
|
|
- gst_caps_set_simple (caps, "height", G_TYPE_INT,
|
|
- framebuffersink->height_before_scaling, NULL);
|
|
- else
|
|
- gst_caps_set_simple (caps, "height", GST_TYPE_INT_RANGE, 1,
|
|
- GST_VIDEO_INFO_HEIGHT (&framebuffersink->screen_info), NULL);
|
|
- goto skip_video_size_request;
|
|
- }
|
|
+ if (framebuffersink->use_hardware_overlay &&
|
|
+ (framebuffersink->requested_video_width != 0 ||
|
|
+ framebuffersink->requested_video_height != 0)) {
|
|
+
|
|
+ gint upstream_width = 0;
|
|
+ gint upstream_height = 0;
|
|
+
|
|
+ GstStructure *structure = gst_caps_get_structure(caps, 0);
|
|
+ gst_structure_get_int(structure, "width", &upstream_width);
|
|
+ gst_structure_get_int(structure, "height", &upstream_height);
|
|
+
|
|
+ // width
|
|
+ if (framebuffersink->width_before_scaling != 0) {
|
|
+ gst_caps_set_simple(caps, "width", G_TYPE_INT,
|
|
+ framebuffersink->width_before_scaling, NULL);
|
|
+ } else if (upstream_width > 0) {
|
|
+ gst_caps_set_simple(caps, "width", G_TYPE_INT, upstream_width, NULL);
|
|
+ }
|
|
+
|
|
+ // height
|
|
+ if (framebuffersink->height_before_scaling != 0) {
|
|
+ gst_caps_set_simple(caps, "height", G_TYPE_INT,
|
|
+ framebuffersink->height_before_scaling, NULL);
|
|
+ } else if (upstream_height > 0) {
|
|
+ gst_caps_set_simple(caps, "height", G_TYPE_INT, upstream_height, NULL);
|
|
+ }
|
|
+
|
|
+ goto skip_video_size_request;
|
|
+ }
|
|
+
|
|
|
|
/* Honour video size requests, otherwise set the allowable range up to the
|
|
screen size. */
|
|
--
|
|
2.34.1
|
|
|