mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
kms: Bump libdrm requirement to 2.4.108
DRM modifier support requires drmModeFormatModifierBlobIterNext() which was added in 2.4.108. See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174#note_2673883 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7991>
This commit is contained in:
parent
de41680f78
commit
75848859f1
3 changed files with 3 additions and 22 deletions
|
@ -57,16 +57,13 @@
|
||||||
#include <xf86drmMode.h>
|
#include <xf86drmMode.h>
|
||||||
#include <drm_fourcc.h>
|
#include <drm_fourcc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "gstkmssink.h"
|
#include "gstkmssink.h"
|
||||||
#include "gstkmsutils.h"
|
#include "gstkmsutils.h"
|
||||||
#include "gstkmsbufferpool.h"
|
#include "gstkmsbufferpool.h"
|
||||||
#include "gstkmsallocator.h"
|
#include "gstkmsallocator.h"
|
||||||
|
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
#include <math.h>
|
|
||||||
#include "gstkmsedid.h"
|
#include "gstkmsedid.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GST_PLUGIN_NAME "kmssink"
|
#define GST_PLUGIN_NAME "kmssink"
|
||||||
#define GST_PLUGIN_DESC "Video sink using the Linux kernel mode setting API"
|
#define GST_PLUGIN_DESC "Video sink using the Linux kernel mode setting API"
|
||||||
|
@ -110,7 +107,6 @@ enum
|
||||||
|
|
||||||
static GParamSpec *g_properties[PROP_N] = { NULL, };
|
static GParamSpec *g_properties[PROP_N] = { NULL, };
|
||||||
|
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
enum hdmi_metadata_type
|
enum hdmi_metadata_type
|
||||||
{
|
{
|
||||||
HDMI_STATIC_METADATA_TYPE1 = 0,
|
HDMI_STATIC_METADATA_TYPE1 = 0,
|
||||||
|
@ -405,7 +401,6 @@ gst_kms_sink_set_hdr10_caps (GstKMSSink * self, GstCaps * caps)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_DRM_HDR */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_kms_sink_set_render_rectangle (GstVideoOverlay * overlay,
|
gst_kms_sink_set_render_rectangle (GstVideoOverlay * overlay,
|
||||||
|
@ -1681,9 +1676,7 @@ gst_kms_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0)
|
if (GST_VIDEO_SINK_WIDTH (self) <= 0 || GST_VIDEO_SINK_HEIGHT (self) <= 0)
|
||||||
goto invalid_size;
|
goto invalid_size;
|
||||||
|
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
gst_kms_sink_set_hdr10_caps (self, caps);
|
gst_kms_sink_set_hdr10_caps (self, caps);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* discard dumb buffer pool */
|
/* discard dumb buffer pool */
|
||||||
if (self->pool) {
|
if (self->pool) {
|
||||||
|
@ -2218,10 +2211,8 @@ retry_set_plane:
|
||||||
src.w = result.w;
|
src.w = result.w;
|
||||||
src.h = result.h;
|
src.h = result.h;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
/* Send the HDR infoframes if appropriate */
|
/* Send the HDR infoframes if appropriate */
|
||||||
gst_kms_push_hdr_infoframe (self, FALSE);
|
gst_kms_push_hdr_infoframe (self, FALSE);
|
||||||
#endif
|
|
||||||
|
|
||||||
GST_TRACE_OBJECT (self,
|
GST_TRACE_OBJECT (self,
|
||||||
"drmModeSetPlane at (%i,%i) %ix%i sourcing at (%i,%i) %ix%i",
|
"drmModeSetPlane at (%i,%i) %ix%i sourcing at (%i,%i) %ix%i",
|
||||||
|
@ -2540,7 +2531,6 @@ gst_kms_sink_init (GstKMSSink * sink)
|
||||||
gst_video_info_dma_drm_init (&sink->vinfo_drm);
|
gst_video_info_dma_drm_init (&sink->vinfo_drm);
|
||||||
sink->skip_vsync = FALSE;
|
sink->skip_vsync = FALSE;
|
||||||
|
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
sink->no_infoframe = FALSE;
|
sink->no_infoframe = FALSE;
|
||||||
sink->has_hdr_info = FALSE;
|
sink->has_hdr_info = FALSE;
|
||||||
sink->has_sent_hdrif = FALSE;
|
sink->has_sent_hdrif = FALSE;
|
||||||
|
@ -2549,7 +2539,6 @@ gst_kms_sink_init (GstKMSSink * sink)
|
||||||
sink->colorimetry = HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
|
sink->colorimetry = HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
|
||||||
gst_video_mastering_display_info_init (&sink->hdr_minfo);
|
gst_video_mastering_display_info_init (&sink->hdr_minfo);
|
||||||
gst_video_content_light_level_init (&sink->hdr_cll);
|
gst_video_content_light_level_init (&sink->hdr_cll);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -99,7 +99,6 @@ struct _GstKMSSink {
|
||||||
gboolean is_internal_fd;
|
gboolean is_internal_fd;
|
||||||
gboolean skip_vsync;
|
gboolean skip_vsync;
|
||||||
|
|
||||||
#ifdef HAVE_DRM_HDR
|
|
||||||
/* HDR mastering related structure */
|
/* HDR mastering related structure */
|
||||||
gboolean no_infoframe;
|
gboolean no_infoframe;
|
||||||
gboolean has_hdr_info;
|
gboolean has_hdr_info;
|
||||||
|
@ -109,7 +108,6 @@ struct _GstKMSSink {
|
||||||
gchar colorimetry;
|
gchar colorimetry;
|
||||||
GstVideoMasteringDisplayInfo hdr_minfo;
|
GstVideoMasteringDisplayInfo hdr_minfo;
|
||||||
GstVideoContentLightLevel hdr_cll;
|
GstVideoContentLightLevel hdr_cll;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstKMSSinkClass {
|
struct _GstKMSSinkClass {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
kmssink_sources = [
|
kmssink_sources = [
|
||||||
'gstkmsallocator.c',
|
'gstkmsallocator.c',
|
||||||
'gstkmsbufferpool.c',
|
'gstkmsbufferpool.c',
|
||||||
|
'gstkmsedid.c',
|
||||||
'gstkmssink.c',
|
'gstkmssink.c',
|
||||||
'gstkmsutils.c',
|
'gstkmsutils.c',
|
||||||
]
|
]
|
||||||
|
@ -10,17 +11,10 @@ if host_system != 'linux'
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libdrm_dep = dependency('libdrm', version : '>= 2.4.98',
|
libdrm_dep = dependency('libdrm', version : '>= 2.4.108',
|
||||||
required : get_option('kms'))
|
required : get_option('kms'))
|
||||||
libdrm_hdr_dep = dependency('libdrm', version : '>= 2.4.104',
|
|
||||||
required : false)
|
|
||||||
mathlib = cc.find_library('m', required : false)
|
mathlib = cc.find_library('m', required : false)
|
||||||
|
|
||||||
if libdrm_hdr_dep.found() and mathlib.found()
|
|
||||||
cdata.set('HAVE_DRM_HDR', 1)
|
|
||||||
kmssink_sources += 'gstkmsedid.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if libdrm_dep.found()
|
if libdrm_dep.found()
|
||||||
gstkmssink = library('gstkms',
|
gstkmssink = library('gstkms',
|
||||||
kmssink_sources,
|
kmssink_sources,
|
||||||
|
|
Loading…
Reference in a new issue