gstreamer/tests/Makefile.am
Víctor Manuel Jáquez Leal be40a1d479 tests: add simple-encoder program
This patch adds a simple-encoder test program that uses libgstvaapi for video
encoding to elementary (raw) streams. Input stream is raw YUV in the Y4M
format. That can be from a regular file or standard input when the input
filename is "-".

Usage: simple-encoder [options]* <source>

Options:
--output|-o     output file name
--codec|-c      codec to use for video encoding
--bitrate|-b    desired bitrate (kbps)

By default, and as an initial patch, the encoded stream shall conform to the
minimally supported profile. That is "Constrained Baseline Profile" for H.264
and "Simple Profile" for MPEG-2. Though, those are the defaults to be
generated by libgstvaapi.

You can find Y4M sample files here http://samples.mplayerhq.hu/yuv4mpeg2/

Original-patch-by: Changzhi Wei <changzhix.wei@intel.com>
* general code clean-up
* removed the yuv reader thread
* re-wrote the y4m file parser
* updated used API fixed some wrong usage
* fixed a lot of memory leaks
* added the bitrate setting
* keep fps' numerator and denominator
* simplified the thread control
* removed custom logging and use glib

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=719528
2015-05-12 11:24:41 +02:00

140 lines
3.7 KiB
Makefile

noinst_PROGRAMS = \
simple-decoder \
test-decode \
test-display \
test-filter \
test-surfaces \
test-windows \
test-subpicture \
simple-encoder \
$(NULL)
if USE_GLX
noinst_PROGRAMS += \
test-textures \
$(NULL)
endif
TEST_CFLAGS = \
-DGST_USE_UNSTABLE_API \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
$(LIBVA_CFLAGS) \
$(GST_CFLAGS) \
$(GST_VIDEO_CFLAGS) \
$(NULL)
TEST_LIBS = \
$(LIBVA_LIBS) \
$(GST_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-$(GST_API_VERSION).la
if USE_DRM
TEST_CFLAGS += $(LIBVA_DRM_CFLAGS)
TEST_LIBS += \
$(LIBVA_DRM_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-drm-$(GST_API_VERSION).la
endif
if USE_X11
TEST_CFLAGS += $(X11_CFLAGS)
TEST_LIBS += \
$(LIBVA_X11_LIBS) \
$(X11_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-x11-$(GST_API_VERSION).la
endif
if USE_GLX
TEST_CFLAGS += $(X11_CFLAGS) $(GL_CFLAGS)
TEST_LIBS += \
$(LIBVA_GLX_LIBS) \
$(X11_LIBS) \
$(GL_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx-$(GST_API_VERSION).la
endif
if USE_EGL
TEST_CFLAGS += $(EGL_CFLAGS)
TEST_LIBS += \
$(LIBVA_EGL_LIBS) \
$(EGL_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-egl-$(GST_API_VERSION).la
endif
if USE_WAYLAND
TEST_CFLAGS += $(WAYLAND_CFLAGS)
TEST_LIBS += \
$(LIBVA_WAYLAND_LIBS) \
$(WAYLAND_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-wayland-$(GST_API_VERSION).la
endif
test_utils_dec_source_c = \
decoder.c \
test-h264.c \
test-jpeg.c \
test-mpeg2.c \
test-mpeg4.c \
test-vc1.c \
$(NULL)
test_utils_dec_source_h = $(test_utils_dec_source_c:%.c=%.h) test-decode.h
test_utils_source_c = codec.c image.c output.c
test_utils_source_h = codec.h image.h output.h
noinst_LTLIBRARIES = libutils.la libutils_dec.la
libutils_la_SOURCES = $(test_utils_source_c)
libutils_la_CFLAGS = $(TEST_CFLAGS)
libutils_dec_la_SOURCES = $(test_utils_dec_source_c)
libutils_dec_la_CFLAGS = $(TEST_CFLAGS)
test_decode_SOURCES = test-decode.c
test_decode_CFLAGS = $(TEST_CFLAGS)
test_decode_LDADD = libutils.la libutils_dec.la $(TEST_LIBS)
test_display_SOURCES = test-display.c
test_display_CFLAGS = $(TEST_CFLAGS)
test_display_LDADD = libutils.la $(TEST_LIBS)
test_filter_SOURCES = test-filter.c
test_filter_CFLAGS = $(TEST_CFLAGS)
test_filter_LDADD = libutils.la $(TEST_LIBS) $(GST_VIDEO_LIBS)
test_surfaces_SOURCES = test-surfaces.c
test_surfaces_CFLAGS = $(TEST_CFLAGS) $(GST_VIDEO_CFLAGS)
test_surfaces_LDADD = libutils.la $(TEST_LIBS) $(GST_VIDEO_LIBS)
test_subpicture_SOURCES = test-subpicture.c test-subpicture-data.c
test_subpicture_CFLAGS = $(TEST_CFLAGS) $(GST_VIDEO_CFLAGS)
test_subpicture_LDADD = libutils.la libutils_dec.la $(TEST_LIBS) \
$(GST_VIDEO_LIBS)
test_windows_SOURCES = test-windows.c
test_windows_CFLAGS = $(TEST_CFLAGS)
test_windows_LDADD = libutils.la $(TEST_LIBS)
test_textures_SOURCES = test-textures.c
test_textures_CFLAGS = $(TEST_CFLAGS)
test_textures_LDADD = libutils.la $(TEST_LIBS)
simple_decoder_source_c = simple-decoder.c
simple_decoder_source_h =
simple_decoder_SOURCES = $(simple_decoder_source_c)
simple_decoder_CFLAGS = $(TEST_CFLAGS) $(GST_VIDEO_CFLAGS)
simple_decoder_LDADD = libutils.la $(TEST_LIBS) $(GST_VIDEO_LIBS)
simple_encoder_source_c = simple-encoder.c y4mreader.c
simple_encoder_source_h = y4mreader.h
simple_encoder_SOURCES = $(simple_encoder_source_c)
simple_encoder_CFLAGS = $(TEST_CFLAGS) $(GST_VIDEO_CFLAGS)
simple_encoder_LDADD = libutils.la $(TEST_LIBS) $(GST_VIDEO_LIBS)
EXTRA_DIST = \
test-subpicture-data.h \
$(simple_decoder_source_h) \
$(test_utils_dec_source_h) \
$(test_utils_source_h) \
$(NULL)
# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in