mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
Drop all references to USE_CODEC_PARSERS.
This commit is contained in:
parent
7f47ac3bea
commit
9d440fafb3
5 changed files with 79 additions and 122 deletions
51
configure.ac
51
configure.ac
|
@ -34,10 +34,6 @@ m4_define([gst_plugins_base_micro_version], [31])
|
||||||
m4_define([gst_plugins_base_version],
|
m4_define([gst_plugins_base_version],
|
||||||
[gst_plugins_base_major_version.gst_plugins_base_minor_version.gst_plugins_base_micro_version])
|
[gst_plugins_base_major_version.gst_plugins_base_minor_version.gst_plugins_base_micro_version])
|
||||||
|
|
||||||
# VA-API minimum version number
|
|
||||||
m4_define([va_api_x11_version], [0.31.0])
|
|
||||||
m4_define([va_api_glx_version], [0.32.0])
|
|
||||||
|
|
||||||
# gst plugins-bad version number
|
# gst plugins-bad version number
|
||||||
m4_define([gst_plugins_bad_major_version], [0])
|
m4_define([gst_plugins_bad_major_version], [0])
|
||||||
m4_define([gst_plugins_bad_minor_version], [10])
|
m4_define([gst_plugins_bad_minor_version], [10])
|
||||||
|
@ -45,6 +41,10 @@ m4_define([gst_plugins_bad_micro_version], [22])
|
||||||
m4_define([gst_plugins_bad_version],
|
m4_define([gst_plugins_bad_version],
|
||||||
[gst_plugins_bad_major_version.gst_plugins_bad_minor_version.gst_plugins_bad_micro_version])
|
[gst_plugins_bad_major_version.gst_plugins_bad_minor_version.gst_plugins_bad_micro_version])
|
||||||
|
|
||||||
|
# VA-API minimum version number
|
||||||
|
m4_define([va_api_x11_version], [0.31.0])
|
||||||
|
m4_define([va_api_glx_version], [0.32.0])
|
||||||
|
|
||||||
# libva package version number
|
# libva package version number
|
||||||
m4_define([libva_x11_package_version], [1.0.3])
|
m4_define([libva_x11_package_version], [1.0.3])
|
||||||
m4_define([libva_glx_package_version], [1.0.9])
|
m4_define([libva_glx_package_version], [1.0.9])
|
||||||
|
@ -113,11 +113,6 @@ AC_ARG_ENABLE(vaapisink-glx,
|
||||||
[enable OpenGL/X11 to vaapisink @<:@default=yes@:>@]),
|
[enable OpenGL/X11 to vaapisink @<:@default=yes@:>@]),
|
||||||
[], [enable_vaapisink_glx="no"])
|
[], [enable_vaapisink_glx="no"])
|
||||||
|
|
||||||
AC_ARG_ENABLE(codecparsers,
|
|
||||||
AS_HELP_STRING([--enable-codecparsers],
|
|
||||||
[enable adhoc bitstream parsers from GStreamer @<:@default=yes@:>@]),
|
|
||||||
[], [enable_codecparsers="yes"])
|
|
||||||
|
|
||||||
dnl Check for __attribute__((visibility()))
|
dnl Check for __attribute__((visibility()))
|
||||||
AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
|
AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
|
||||||
vaapi_cv_visibility_attribute,
|
vaapi_cv_visibility_attribute,
|
||||||
|
@ -233,21 +228,13 @@ PKG_CHECK_MODULES([GST_BASEVIDEO],
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Check for GStreamer codec parsers
|
dnl Check for GStreamer codec parsers
|
||||||
USE_CODEC_PARSERS=0
|
USE_CODEC_PARSERS=1
|
||||||
if test "$enable_codecparsers" = "yes"; then
|
|
||||||
PKG_CHECK_MODULES([GST_CODEC_PARSERS],
|
|
||||||
[gstreamer-codecparsers-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED],
|
|
||||||
[enable_codecparsers="yes" USE_CODEC_PARSERS=1],
|
|
||||||
[enable_codecparsers="no" USE_CODEC_PARSERS=0]
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(USE_CODEC_PARSERS, $USE_CODEC_PARSERS,
|
|
||||||
[Defined to 1 if GStreamer codec parsers are used])
|
|
||||||
AM_CONDITIONAL(USE_CODEC_PARSERS, test $USE_CODEC_PARSERS -eq 1)
|
|
||||||
|
|
||||||
USE_LOCAL_CODEC_PARSERS=0
|
USE_LOCAL_CODEC_PARSERS=0
|
||||||
if test "$enable_codecparsers" = "yes"; then
|
|
||||||
|
PKG_CHECK_MODULES([GST_CODEC_PARSERS],
|
||||||
|
[gstreamer-codecparsers-$GST_MAJORMINOR >= $GST_PLUGINS_BAD_VERSION_REQUIRED]
|
||||||
|
)
|
||||||
|
|
||||||
AC_CACHE_CHECK([for GstH264SliceHdr::n_emulation_prevention_bytes],
|
AC_CACHE_CHECK([for GstH264SliceHdr::n_emulation_prevention_bytes],
|
||||||
ac_cv_have_gst_h264_slice_hdr_epb_count, [
|
ac_cv_have_gst_h264_slice_hdr_epb_count, [
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
@ -266,6 +253,11 @@ AC_CACHE_CHECK([for GstH264SliceHdr::n_emulation_prevention_bytes],
|
||||||
LIBS="$saved_LIBS"
|
LIBS="$saved_LIBS"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if test "$ac_cv_have_gst_h264_slice_hdr_epb_count" = "yes"; then
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_GST_H264_SLICE_HDR_EPB_COUNT, 1,
|
||||||
|
[Defined to 1 if GstH264SliceHdr::n_emulation_prevention_bytes exists.])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([for JPEG parser],
|
AC_CACHE_CHECK([for JPEG parser],
|
||||||
ac_cv_have_gst_jpeg_parser, [
|
ac_cv_have_gst_jpeg_parser, [
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
@ -282,12 +274,6 @@ AC_CACHE_CHECK([for JPEG parser],
|
||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
LIBS="$saved_LIBS"
|
LIBS="$saved_LIBS"
|
||||||
])
|
])
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$ac_cv_have_gst_h264_slice_hdr_epb_count" = "yes"; then
|
|
||||||
AC_DEFINE_UNQUOTED(HAVE_GST_H264_SLICE_HDR_EPB_COUNT, 1,
|
|
||||||
[Defined to 1 if GstH264SliceHdr::n_emulation_prevention_bytes exists.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$ac_cv_have_gst_jpeg_parser" = "yes"; then
|
if test "$ac_cv_have_gst_jpeg_parser" = "yes"; then
|
||||||
AC_DEFINE_UNQUOTED(HAVE_GST_JPEG_PARSER, 1,
|
AC_DEFINE_UNQUOTED(HAVE_GST_JPEG_PARSER, 1,
|
||||||
|
@ -407,7 +393,6 @@ AC_SUBST(LIBVA_EXTRA_LIBS)
|
||||||
|
|
||||||
dnl Check for JPEG decoding API (0.33+)
|
dnl Check for JPEG decoding API (0.33+)
|
||||||
USE_JPEG_DECODER=0
|
USE_JPEG_DECODER=0
|
||||||
if test "$enable_codecparsers" = "yes"; then
|
|
||||||
AC_CACHE_CHECK([for JPEG decoding API],
|
AC_CACHE_CHECK([for JPEG decoding API],
|
||||||
ac_cv_have_jpeg_decoding_api, [
|
ac_cv_have_jpeg_decoding_api, [
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
@ -428,7 +413,6 @@ AC_CACHE_CHECK([for JPEG decoding API],
|
||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
LIBS="$saved_LIBS"
|
LIBS="$saved_LIBS"
|
||||||
])
|
])
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
|
AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
|
||||||
[Defined to 1 if JPEG decoder is used])
|
[Defined to 1 if JPEG decoder is used])
|
||||||
|
@ -441,10 +425,6 @@ else
|
||||||
USE_VAAPISINK_GLX=0
|
USE_VAAPISINK_GLX=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$enable_codecparsers" = "no"; then
|
|
||||||
AC_MSG_ERROR([Found no suitable GStreamer bitstream parsers])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
|
AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX,
|
||||||
[Defined to 1 if GLX is enabled])
|
[Defined to 1 if GLX is enabled])
|
||||||
AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
|
AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
|
||||||
|
@ -518,5 +498,4 @@ echo VA-API version ................... : $VA_VERSION_STR
|
||||||
echo GLX support ...................... : $(yesno $USE_GLX)
|
echo GLX support ...................... : $(yesno $USE_GLX)
|
||||||
echo VA/GLX support ................... : $(yesno $USE_VAAPI_GLX)
|
echo VA/GLX support ................... : $(yesno $USE_VAAPI_GLX)
|
||||||
echo VaapiSink/GL ..................... : $(yesno $USE_VAAPISINK_GLX)
|
echo VaapiSink/GL ..................... : $(yesno $USE_VAAPISINK_GLX)
|
||||||
echo GStreamer bitstream parsers ...... : $(yesno $USE_CODEC_PARSERS)
|
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -17,6 +17,7 @@ libgstvaapi_cflags = \
|
||||||
$(GST_BASEVIDEO_CFLAGS) \
|
$(GST_BASEVIDEO_CFLAGS) \
|
||||||
$(GST_VIDEO_CFLAGS) \
|
$(GST_VIDEO_CFLAGS) \
|
||||||
$(GST_CFLAGS) \
|
$(GST_CFLAGS) \
|
||||||
|
$(GST_CODEC_PARSERS_CFLAGS) \
|
||||||
$(LIBVA_CFLAGS) \
|
$(LIBVA_CFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -25,12 +26,20 @@ libgstvaapi_libs = \
|
||||||
$(GST_BASEVIDEO_LIBS) \
|
$(GST_BASEVIDEO_LIBS) \
|
||||||
$(GST_LIBS) \
|
$(GST_LIBS) \
|
||||||
$(GST_VIDEO_LIBS) \
|
$(GST_VIDEO_LIBS) \
|
||||||
|
$(GST_CODEC_PARSERS_LIBS) \
|
||||||
$(LIBVA_LIBS) \
|
$(LIBVA_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_source_c = \
|
libgstvaapi_source_c = \
|
||||||
|
gstvaapicodec_objects.c \
|
||||||
gstvaapicontext.c \
|
gstvaapicontext.c \
|
||||||
gstvaapidecoder.c \
|
gstvaapidecoder.c \
|
||||||
|
gstvaapidecoder_dpb.c \
|
||||||
|
gstvaapidecoder_h264.c \
|
||||||
|
gstvaapidecoder_mpeg2.c \
|
||||||
|
gstvaapidecoder_mpeg4.c \
|
||||||
|
gstvaapidecoder_objects.c \
|
||||||
|
gstvaapidecoder_vc1.c \
|
||||||
gstvaapidisplay.c \
|
gstvaapidisplay.c \
|
||||||
gstvaapidisplaycache.c \
|
gstvaapidisplaycache.c \
|
||||||
gstvaapiimage.c \
|
gstvaapiimage.c \
|
||||||
|
@ -55,6 +64,10 @@ libgstvaapi_source_c = \
|
||||||
libgstvaapi_source_h = \
|
libgstvaapi_source_h = \
|
||||||
gstvaapicontext.h \
|
gstvaapicontext.h \
|
||||||
gstvaapidecoder.h \
|
gstvaapidecoder.h \
|
||||||
|
gstvaapidecoder_h264.h \
|
||||||
|
gstvaapidecoder_mpeg2.h \
|
||||||
|
gstvaapidecoder_mpeg4.h \
|
||||||
|
gstvaapidecoder_vc1.h \
|
||||||
gstvaapidisplay.h \
|
gstvaapidisplay.h \
|
||||||
gstvaapidisplaycache.h \
|
gstvaapidisplaycache.h \
|
||||||
gstvaapiimage.h \
|
gstvaapiimage.h \
|
||||||
|
@ -78,8 +91,11 @@ libgstvaapi_source_h = \
|
||||||
libgstvaapi_source_priv_h = \
|
libgstvaapi_source_priv_h = \
|
||||||
glibcompat.h \
|
glibcompat.h \
|
||||||
gstvaapi_priv.h \
|
gstvaapi_priv.h \
|
||||||
|
gstvaapicodec_objects.h \
|
||||||
gstvaapicompat.h \
|
gstvaapicompat.h \
|
||||||
gstvaapidebug.h \
|
gstvaapidebug.h \
|
||||||
|
gstvaapidecoder_dpb.h \
|
||||||
|
gstvaapidecoder_objects.h \
|
||||||
gstvaapidecoder_priv.h \
|
gstvaapidecoder_priv.h \
|
||||||
gstvaapidisplay_priv.h \
|
gstvaapidisplay_priv.h \
|
||||||
gstvaapiobject_priv.h \
|
gstvaapiobject_priv.h \
|
||||||
|
@ -137,35 +153,10 @@ libgstvaapi_glx_source_priv_h = \
|
||||||
gstvaapiutils_x11.h \
|
gstvaapiutils_x11.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if USE_CODEC_PARSERS
|
|
||||||
libgstvaapi_source_c += \
|
|
||||||
gstvaapicodec_objects.c \
|
|
||||||
gstvaapidecoder_dpb.c \
|
|
||||||
gstvaapidecoder_h264.c \
|
|
||||||
gstvaapidecoder_mpeg2.c \
|
|
||||||
gstvaapidecoder_mpeg4.c \
|
|
||||||
gstvaapidecoder_objects.c \
|
|
||||||
gstvaapidecoder_vc1.c \
|
|
||||||
$(NULL)
|
|
||||||
libgstvaapi_source_h += \
|
|
||||||
gstvaapidecoder_h264.h \
|
|
||||||
gstvaapidecoder_mpeg2.h \
|
|
||||||
gstvaapidecoder_mpeg4.h \
|
|
||||||
gstvaapidecoder_vc1.h \
|
|
||||||
$(NULL)
|
|
||||||
libgstvaapi_source_priv_h += \
|
|
||||||
gstvaapicodec_objects.h \
|
|
||||||
gstvaapidecoder_dpb.h \
|
|
||||||
gstvaapidecoder_objects.h \
|
|
||||||
$(NULL)
|
|
||||||
libgstvaapi_cflags += $(GST_CODEC_PARSERS_CFLAGS)
|
|
||||||
libgstvaapi_libs += $(GST_CODEC_PARSERS_LIBS)
|
|
||||||
|
|
||||||
if USE_JPEG_DECODER
|
if USE_JPEG_DECODER
|
||||||
libgstvaapi_source_c += gstvaapidecoder_jpeg.c
|
libgstvaapi_source_c += gstvaapidecoder_jpeg.c
|
||||||
libgstvaapi_source_h += gstvaapidecoder_jpeg.h
|
libgstvaapi_source_h += gstvaapidecoder_jpeg.h
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_LOCAL_CODEC_PARSERS
|
if USE_LOCAL_CODEC_PARSERS
|
||||||
libgstvaapi_libs += \
|
libgstvaapi_libs += \
|
||||||
|
|
|
@ -44,13 +44,11 @@
|
||||||
#include "gstvaapidecode.h"
|
#include "gstvaapidecode.h"
|
||||||
#include "gstvaapipluginutil.h"
|
#include "gstvaapipluginutil.h"
|
||||||
|
|
||||||
#if USE_CODEC_PARSERS
|
#include <gst/vaapi/gstvaapidecoder_h264.h>
|
||||||
# include <gst/vaapi/gstvaapidecoder_h264.h>
|
#include <gst/vaapi/gstvaapidecoder_jpeg.h>
|
||||||
# include <gst/vaapi/gstvaapidecoder_jpeg.h>
|
#include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
||||||
# include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
#include <gst/vaapi/gstvaapidecoder_mpeg4.h>
|
||||||
# include <gst/vaapi/gstvaapidecoder_mpeg4.h>
|
#include <gst/vaapi/gstvaapidecoder_vc1.h>
|
||||||
# include <gst/vaapi/gstvaapidecoder_vc1.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GST_PLUGIN_NAME "vaapidecode"
|
#define GST_PLUGIN_NAME "vaapidecode"
|
||||||
#define GST_PLUGIN_DESC "A VA-API based video decoder"
|
#define GST_PLUGIN_DESC "A VA-API based video decoder"
|
||||||
|
@ -302,6 +300,7 @@ gst_vaapidecode_create(GstVaapiDecode *decode, GstCaps *caps)
|
||||||
|
|
||||||
if (!gst_vaapi_ensure_display(decode, &decode->display))
|
if (!gst_vaapi_ensure_display(decode, &decode->display))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
dpy = decode->display;
|
||||||
|
|
||||||
decode->decoder_mutex = g_mutex_new();
|
decode->decoder_mutex = g_mutex_new();
|
||||||
if (!decode->decoder_mutex)
|
if (!decode->decoder_mutex)
|
||||||
|
@ -311,31 +310,29 @@ gst_vaapidecode_create(GstVaapiDecode *decode, GstCaps *caps)
|
||||||
if (!decode->decoder_ready)
|
if (!decode->decoder_ready)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
dpy = decode->display;
|
structure = gst_caps_get_structure(caps, 0);
|
||||||
#if USE_CODEC_PARSERS
|
if (!structure)
|
||||||
structure = gst_caps_get_structure(caps, 0);
|
return FALSE;
|
||||||
if (!structure)
|
|
||||||
|
if (gst_structure_has_name(structure, "video/x-h264"))
|
||||||
|
decode->decoder = gst_vaapi_decoder_h264_new(dpy, caps);
|
||||||
|
else if (gst_structure_has_name(structure, "video/mpeg")) {
|
||||||
|
if (!gst_structure_get_int(structure, "mpegversion", &version))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (gst_structure_has_name(structure, "video/x-h264"))
|
if (version == 2)
|
||||||
decode->decoder = gst_vaapi_decoder_h264_new(dpy, caps);
|
decode->decoder = gst_vaapi_decoder_mpeg2_new(dpy, caps);
|
||||||
else if (gst_structure_has_name(structure, "video/mpeg")) {
|
else if (version == 4)
|
||||||
if (!gst_structure_get_int(structure, "mpegversion", &version))
|
|
||||||
return FALSE;
|
|
||||||
if (version == 2)
|
|
||||||
decode->decoder = gst_vaapi_decoder_mpeg2_new(dpy, caps);
|
|
||||||
else if (version == 4)
|
|
||||||
decode->decoder = gst_vaapi_decoder_mpeg4_new(dpy, caps);
|
|
||||||
}
|
|
||||||
else if (gst_structure_has_name(structure, "video/x-wmv"))
|
|
||||||
decode->decoder = gst_vaapi_decoder_vc1_new(dpy, caps);
|
|
||||||
else if (gst_structure_has_name(structure, "video/x-h263") ||
|
|
||||||
gst_structure_has_name(structure, "video/x-divx") ||
|
|
||||||
gst_structure_has_name(structure, "video/x-xvid"))
|
|
||||||
decode->decoder = gst_vaapi_decoder_mpeg4_new(dpy, caps);
|
decode->decoder = gst_vaapi_decoder_mpeg4_new(dpy, caps);
|
||||||
|
}
|
||||||
|
else if (gst_structure_has_name(structure, "video/x-wmv"))
|
||||||
|
decode->decoder = gst_vaapi_decoder_vc1_new(dpy, caps);
|
||||||
|
else if (gst_structure_has_name(structure, "video/x-h263") ||
|
||||||
|
gst_structure_has_name(structure, "video/x-divx") ||
|
||||||
|
gst_structure_has_name(structure, "video/x-xvid"))
|
||||||
|
decode->decoder = gst_vaapi_decoder_mpeg4_new(dpy, caps);
|
||||||
#if USE_JPEG_DECODER
|
#if USE_JPEG_DECODER
|
||||||
else if (gst_structure_has_name(structure, "image/jpeg"))
|
else if (gst_structure_has_name(structure, "image/jpeg"))
|
||||||
decode->decoder = gst_vaapi_decoder_jpeg_new(dpy, caps);
|
decode->decoder = gst_vaapi_decoder_jpeg_new(dpy, caps);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (!decode->decoder)
|
if (!decode->decoder)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -26,18 +26,15 @@
|
||||||
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
||||||
#include <gst/vaapi/gstvaapidecoder.h>
|
#include <gst/vaapi/gstvaapidecoder.h>
|
||||||
#include <gst/vaapi/gstvaapisurface.h>
|
#include <gst/vaapi/gstvaapisurface.h>
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_h264.h>
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_jpeg.h>
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_vc1.h>
|
||||||
#include "test-jpeg.h"
|
#include "test-jpeg.h"
|
||||||
#include "test-mpeg2.h"
|
#include "test-mpeg2.h"
|
||||||
#include "test-h264.h"
|
#include "test-h264.h"
|
||||||
#include "test-vc1.h"
|
#include "test-vc1.h"
|
||||||
|
|
||||||
#if USE_CODEC_PARSERS
|
|
||||||
# include <gst/vaapi/gstvaapidecoder_h264.h>
|
|
||||||
# include <gst/vaapi/gstvaapidecoder_jpeg.h>
|
|
||||||
# include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
|
||||||
# include <gst/vaapi/gstvaapidecoder_vc1.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set to 1 to check display cache works (shared VA display) */
|
/* Set to 1 to check display cache works (shared VA display) */
|
||||||
#define CHECK_DISPLAY_CACHE 1
|
#define CHECK_DISPLAY_CACHE 1
|
||||||
|
|
||||||
|
@ -147,27 +144,25 @@ main(int argc, char *argv[])
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
#if USE_CODEC_PARSERS
|
switch (gst_vaapi_profile_get_codec(info.profile)) {
|
||||||
switch (gst_vaapi_profile_get_codec(info.profile)) {
|
case GST_VAAPI_CODEC_H264:
|
||||||
case GST_VAAPI_CODEC_H264:
|
decoder = gst_vaapi_decoder_h264_new(display, decoder_caps);
|
||||||
decoder = gst_vaapi_decoder_h264_new(display, decoder_caps);
|
break;
|
||||||
break;
|
|
||||||
#if USE_JPEG_DECODER
|
#if USE_JPEG_DECODER
|
||||||
case GST_VAAPI_CODEC_JPEG:
|
case GST_VAAPI_CODEC_JPEG:
|
||||||
decoder = gst_vaapi_decoder_jpeg_new(display, decoder_caps);
|
decoder = gst_vaapi_decoder_jpeg_new(display, decoder_caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case GST_VAAPI_CODEC_MPEG2:
|
|
||||||
decoder = gst_vaapi_decoder_mpeg2_new(display, decoder_caps);
|
|
||||||
break;
|
|
||||||
case GST_VAAPI_CODEC_VC1:
|
|
||||||
decoder = gst_vaapi_decoder_vc1_new(display, decoder_caps);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
decoder = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
case GST_VAAPI_CODEC_MPEG2:
|
||||||
|
decoder = gst_vaapi_decoder_mpeg2_new(display, decoder_caps);
|
||||||
|
break;
|
||||||
|
case GST_VAAPI_CODEC_VC1:
|
||||||
|
decoder = gst_vaapi_decoder_vc1_new(display, decoder_caps);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
decoder = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (!decoder)
|
if (!decoder)
|
||||||
g_error("could not create decoder");
|
g_error("could not create decoder");
|
||||||
gst_caps_unref(decoder_caps);
|
gst_caps_unref(decoder_caps);
|
||||||
|
|
|
@ -25,14 +25,11 @@
|
||||||
#include <gst/vaapi/gstvaapidisplay_x11.h>
|
#include <gst/vaapi/gstvaapidisplay_x11.h>
|
||||||
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
||||||
#include <gst/vaapi/gstvaapidecoder.h>
|
#include <gst/vaapi/gstvaapidecoder.h>
|
||||||
|
#include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
||||||
#include <gst/vaapi/gstvaapisurface.h>
|
#include <gst/vaapi/gstvaapisurface.h>
|
||||||
#include "test-mpeg2.h"
|
#include "test-mpeg2.h"
|
||||||
#include "test-subpicture-data.h"
|
#include "test-subpicture-data.h"
|
||||||
|
|
||||||
#if USE_CODEC_PARSERS
|
|
||||||
# include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (*GetVideoInfoFunc)(VideoDecodeInfo *info);
|
typedef void (*GetVideoInfoFunc)(VideoDecodeInfo *info);
|
||||||
|
|
||||||
typedef struct _CodecDefs CodecDefs;
|
typedef struct _CodecDefs CodecDefs;
|
||||||
|
@ -149,9 +146,7 @@ main(int argc, char *argv[])
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
#if USE_CODEC_PARSERS
|
|
||||||
decoder = gst_vaapi_decoder_mpeg2_new(display, decoder_caps);
|
decoder = gst_vaapi_decoder_mpeg2_new(display, decoder_caps);
|
||||||
#endif
|
|
||||||
if (!decoder)
|
if (!decoder)
|
||||||
g_error("could not create video decoder");
|
g_error("could not create video decoder");
|
||||||
gst_caps_unref(decoder_caps);
|
gst_caps_unref(decoder_caps);
|
||||||
|
|
Loading…
Reference in a new issue