mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
d7bddb0c51
This reduces the complexity of having a custom buffer pool, as we don't really need it. We only need the custom allocation part. And since the wl_buffer is no longer saved in a GstMeta, we can create it and add it on the buffers in the sink's render() function, which removes the reference cycle caused by the pool holding a reference to the display and also allows more generic scenarios (the allocator being used in another pool, or buffers being allocated without a pool [if anything stupid does that]). This commit also simplifies the propose_allocation() function, which doesn't really need to do all these complicated checks, since there is always a correct buffer pool available, created in set_caps(). The other side effect of this commit is that a new wl_shm_pool is now created for every GstMemory, which means that we use as much shm memory as we actually need and no more. Previously, the created wl_shm_pool would allocate space for 15 buffers, no matter if they were being used or not.
48 lines
1.2 KiB
Makefile
48 lines
1.2 KiB
Makefile
plugin_LTLIBRARIES = libgstwaylandsink.la
|
|
|
|
libgstwaylandsink_la_SOURCES = \
|
|
gstwaylandsink.c \
|
|
wlshmallocator.c \
|
|
wlbuffer.c \
|
|
wldisplay.c \
|
|
wlwindow.c \
|
|
wlvideoformat.c \
|
|
scaler-protocol.c
|
|
|
|
libgstwaylandsink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
|
|
$(WAYLAND_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS)
|
|
libgstwaylandsink_la_LIBADD = \
|
|
$(GST_PLUGINS_BASE_LIBS) \
|
|
-lgstvideo-$(GST_API_VERSION) \
|
|
$(WAYLAND_LIBS) \
|
|
$(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la
|
|
libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
|
libgstwaylandsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
|
|
|
noinst_HEADERS = \
|
|
gstwaylandsink.h \
|
|
wlshmallocator.h \
|
|
wlbuffer.h \
|
|
wldisplay.h \
|
|
wlwindow.h \
|
|
wlvideoformat.h \
|
|
scaler-client-protocol.h
|
|
|
|
EXTRA_DIST = scaler.xml
|
|
CLEANFILES = scaler-protocol.c scaler-client-protocol.h
|
|
|
|
%-protocol.c : %.xml
|
|
$(wayland_scanner) code < $< > $@
|
|
|
|
%-client-protocol.h : %.xml
|
|
$(wayland_scanner) client-header < $< > $@
|
|
|
|
gstwaylandsink.c: scaler-client-protocol.h
|
|
|
|
wlshmallocator.c: scaler-client-protocol.h
|
|
|
|
wlbuffer.c: scaler-client-protocol.h
|
|
|
|
wldisplay.c: scaler-client-protocol.h
|
|
|
|
wlwindow.c: scaler-client-protocol.h
|