mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-04 07:26:33 +00:00
783e58fc48
One big restriction of the OMX buffer pool has always been that the GstMemory objects were flagged with NO_SHARE. This was because the buffer pool needed to be sure that when a buffer returned to the pool, it would be safe to release the OMX buffer back to OpenMAX. With this change, this is no longer a restriction. What this commit introduces is a new allocator that allows us to track the GstMemory objects independently. Now, when a buffer returns to the pool, it is not necessary for the memory to be released as well. We simply track the memory's ref count in the allocator and we return the OMX buffer back when the memory's ref count drops to 0. The reason for doing this is to allow implementing zero-copy transfers in situations where we may need to copy or map a certain region of the buffer. For instance, omxh264enc ! h264parse should be possible to be zero-copy by using an OMX buffer pool between them.
116 lines
2.2 KiB
Makefile
116 lines
2.2 KiB
Makefile
plugin_LTLIBRARIES = libgstomx.la
|
|
|
|
if HAVE_VP8
|
|
VP8_C_FILES=gstomxvp8dec.c
|
|
VP8_H_FILES=gstomxvp8dec.h
|
|
endif
|
|
|
|
if HAVE_THEORA
|
|
THEORA_C_FILES=gstomxtheoradec.c
|
|
THEORA_H_FILES=gstomxtheoradec.h
|
|
endif
|
|
|
|
if HAVE_HEVC
|
|
H265_C_FILES = \
|
|
gstomxh265dec.c \
|
|
gstomxh265enc.c \
|
|
gstomxh265utils.c
|
|
H265_H_FILES = \
|
|
gstomxh265dec.h \
|
|
gstomxh265enc.h \
|
|
gstomxh265utils.h
|
|
endif
|
|
|
|
libgstomx_la_SOURCES = \
|
|
gstomx.c \
|
|
gstomxallocator.c \
|
|
gstomxbufferpool.c \
|
|
gstomxvideo.c \
|
|
gstomxvideodec.c \
|
|
gstomxvideoenc.c \
|
|
gstomxaudiodec.c \
|
|
gstomxaudioenc.c \
|
|
gstomxmjpegdec.c \
|
|
gstomxmpeg4videodec.c \
|
|
gstomxmpeg2videodec.c \
|
|
gstomxh264dec.c \
|
|
gstomxh264utils.c \
|
|
gstomxh263dec.c \
|
|
gstomxwmvdec.c \
|
|
$(VP8_C_FILES) \
|
|
$(THEORA_C_FILES) \
|
|
$(H265_C_FILES) \
|
|
gstomxmpeg4videoenc.c \
|
|
gstomxh264enc.c \
|
|
gstomxh263enc.c \
|
|
gstomxaacdec.c \
|
|
gstomxmp3dec.c \
|
|
gstomxmp3enc.c \
|
|
gstomxaacenc.c \
|
|
gstomxamrdec.c \
|
|
gstomxaudiosink.c \
|
|
gstomxanalogaudiosink.c \
|
|
gstomxhdmiaudiosink.c
|
|
|
|
noinst_HEADERS = \
|
|
gstomx.h \
|
|
gstomxallocator.h \
|
|
gstomxbufferpool.h \
|
|
gstomxvideo.h \
|
|
gstomxvideodec.h \
|
|
gstomxvideoenc.h \
|
|
gstomxaudiodec.h \
|
|
gstomxaudioenc.h \
|
|
gstomxmjpegdec.h \
|
|
gstomxmpeg2videodec.h \
|
|
gstomxmpeg4videodec.h \
|
|
gstomxh264dec.h \
|
|
gstomxh264utils.h \
|
|
gstomxh263dec.h \
|
|
gstomxwmvdec.h \
|
|
$(VP8_H_FILES) \
|
|
$(THEORA_H_FILES) \
|
|
$(H265_H_FILES) \
|
|
gstomxmpeg4videoenc.h \
|
|
gstomxh264enc.h \
|
|
gstomxh263enc.h \
|
|
gstomxaacdec.h \
|
|
gstomxmp3dec.h \
|
|
gstomxmp3enc.h \
|
|
gstomxaacenc.h \
|
|
gstomxamrdec.h \
|
|
gstomxaudiosink.h \
|
|
gstomxanalogaudiosink.h \
|
|
gstomxhdmiaudiosink.h
|
|
|
|
if !HAVE_EXTERNAL_OMX
|
|
OMX_INCLUDEPATH = -I$(abs_srcdir)/openmax
|
|
endif
|
|
|
|
libgstomx_la_CFLAGS = \
|
|
-DGST_USE_UNSTABLE_API=1 \
|
|
$(OMX_INCLUDEPATH) \
|
|
$(GST_GL_CFLAGS) \
|
|
$(GST_PLUGINS_BASE_CFLAGS) \
|
|
$(GST_BASE_CFLAGS) \
|
|
$(GST_CFLAGS) \
|
|
$(GST_ALLOCATORS_CFLAGS) \
|
|
$(GMODULE_NO_EXPORT_CFLAGS)
|
|
libgstomx_la_LIBADD = \
|
|
$(GST_GL_LIBS) \
|
|
$(GST_PLUGINS_BASE_LIBS) \
|
|
-lgstaudio-@GST_API_VERSION@ \
|
|
-lgstpbutils-@GST_API_VERSION@ \
|
|
-lgstvideo-@GST_API_VERSION@ \
|
|
$(GST_BASE_LIBS) \
|
|
$(GST_LIBS) \
|
|
$(GST_ALLOCATORS_LIBS) \
|
|
$(GMODULE_NO_EXPORT_LIBS)
|
|
libgstomx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
|
|
|
EXTRA_DIST = \
|
|
openmax \
|
|
gstomxvp8dec.c \
|
|
gstomxvp8dec.h \
|
|
gstomxtheoradec.c \
|
|
gstomxtheoradec.h
|