diff --git a/ext/Makefile.am b/ext/Makefile.am index 8450b85d50..d6085815e6 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -44,12 +44,14 @@ videoparsers_srcdir = \ videoparsers_source_c = \ gsth264parse.c \ + gsth265parse.c \ $(NULL) EXTRA_DIST += $(videoparsers_source_c:%.c=$(videoparsers_srcdir)/%.c) videoparsers_source_h = \ gsth264parse.h \ + gsth265parse.h \ $(NULL) EXTRA_DIST += $(videoparsers_source_h:%.h=$(videoparsers_srcdir)/%.h) diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am index 37ecc37251..d63f1684a4 100644 --- a/gst/vaapi/Makefile.am +++ b/gst/vaapi/Makefile.am @@ -167,14 +167,30 @@ libgstvaapi_parse_gen_source_h = \ gsth264parse.h \ $(NULL) +libgstvaapi_1_4p_parse_gen_source_c = \ + gsth265parse.c \ + $(NULL) + +libgstvaapi_1_4p_parse_gen_source_h = \ + gsth265parse.h \ + $(NULL) + libgstvaapi_parse_gen_sources = \ $(libgstvaapi_parse_gen_source_c) \ $(libgstvaapi_parse_gen_source_h) \ $(NUL) +libgstvaapi_parse_gen_sources += $(libgstvaapi_1_4p_parse_gen_source_c) +libgstvaapi_parse_gen_sources += $(libgstvaapi_1_4p_parse_gen_source_h) + libgstvaapi_parse_source_c = gstvaapiparse.c $(libgstvaapi_parse_gen_source_c) libgstvaapi_parse_source_h = gstvaapiparse.h $(libgstvaapi_parse_gen_source_h) +if USE_GST_API_1_4p +libgstvaapi_parse_source_c += $(libgstvaapi_1_4p_parse_gen_source_c) +libgstvaapi_parse_source_h += $(libgstvaapi_1_4p_parse_gen_source_h) +endif + libgstvaapi_parse_la_SOURCES = $(libgstvaapi_parse_source_c) noinst_HEADERS += $(libgstvaapi_parse_source_h) @@ -234,6 +250,8 @@ EXTRA_DIST = \ $(libgstvaapi_1_2p_source_h) \ $(libgstvaapi_parse_source_c) \ $(libgstvaapi_parse_source_h) \ + $(libgstvaapi_1_4p_parse_gen_source_c) \ + $(libgstvaapi_1_4p_parse_gen_source_h) \ $(NULL) # Extra clean files so that maintainer-clean removes *everything* diff --git a/gst/vaapi/gstvaapiparse.c b/gst/vaapi/gstvaapiparse.c index f29e503dd9..06ac69c4bc 100644 --- a/gst/vaapi/gstvaapiparse.c +++ b/gst/vaapi/gstvaapiparse.c @@ -25,6 +25,10 @@ #include "gstvaapiparse.h" #include "gsth264parse.h" +#if GST_CHECK_VERSION(1,4,0) +#include "gsth265parse.h" +#endif + #define PLUGIN_NAME "vaapiparse" #define PLUGIN_DESC "VA-API based elements" #define PLUGIN_LICENSE "LGPL" @@ -37,6 +41,11 @@ plugin_init (GstPlugin * plugin) failure |= !gst_element_register (plugin, "vaapiparse_h264", GST_RANK_PRIMARY + 2, GST_TYPE_H264_PARSE); +#if GST_CHECK_VERSION(1,4,0) + failure |= !gst_element_register (plugin, "vaapiparse_h265", + GST_RANK_PRIMARY + 2, GST_TYPE_H265_PARSE); +#endif + return !failure; } diff --git a/gst/vaapi/gstvaapiparse.h b/gst/vaapi/gstvaapiparse.h index 03e74d9656..8983c866fd 100644 --- a/gst/vaapi/gstvaapiparse.h +++ b/gst/vaapi/gstvaapiparse.h @@ -33,4 +33,15 @@ #define gst_h264_parse_parent_class gst_vaapi_h264_parse_parent_class #define gst_h264_parse_get_type gst_vaapi_h264_parse_get_type +/* vaapiparse_h265 */ +#define _GstH265Parse _GstVaapiH265Parse +#define GstH265Parse GstVaapiH265Parse +#define _GstH265ParseClass _GstVaapiH265ParseClass +#define GstH265ParseClass GstVaapiH265ParseClass +#define gst_h265_parse gst_vaapi_h265_parse +#define gst_h265_parse_init gst_vaapi_h265_parse_init +#define gst_h265_parse_class_init gst_vaapi_h265_parse_class_init +#define gst_h265_parse_parent_class gst_vaapi_h265_parse_parent_class +#define gst_h265_parse_get_type gst_vaapi_h265_parse_get_type + #endif /* GST_VAAPI_PARSE_H */ diff --git a/patches/videoparsers/0001-h265parse-include-gstvaapiparse.h.patch b/patches/videoparsers/0001-h265parse-include-gstvaapiparse.h.patch new file mode 100644 index 0000000000..613b875c9b --- /dev/null +++ b/patches/videoparsers/0001-h265parse-include-gstvaapiparse.h.patch @@ -0,0 +1,33 @@ +From a205193cffee9405bc9013416b15d8d1499be6bb Mon Sep 17 00:00:00 2001 +From: Sreerenj Balachandran +Date: Thu, 16 Apr 2015 18:04:53 +0300 +Subject: [PATCH] h265parse: include gstvaapiparse.h + +--- + gst/vaapi/gsth265parse.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gst/vaapi/gsth265parse.c b/gst/vaapi/gsth265parse.c +index 2d7b997..5942d41 100644 +--- a/gst/vaapi/gsth265parse.c ++++ b/gst/vaapi/gsth265parse.c +@@ -22,6 +22,7 @@ + # include "config.h" + #endif + ++#include "gstvaapiparse.h" + #include + #include + #include +@@ -101,7 +102,7 @@ gst_h265_parse_class_init (GstH265ParseClass * klass) + GstBaseParseClass *parse_class = GST_BASE_PARSE_CLASS (klass); + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + +- GST_DEBUG_CATEGORY_INIT (h265_parse_debug, "h265parse", 0, "h265 parser"); ++ GST_DEBUG_CATEGORY_INIT (h265_parse_debug, "vaapiparse_h265", 0, "h265 parser"); + + gobject_class->finalize = gst_h265_parse_finalize; + gobject_class->set_property = gst_h265_parse_set_property; +-- +1.9.1 + diff --git a/patches/videoparsers/series.frag b/patches/videoparsers/series.frag index 32fc5380c4..040b2bd0fa 100644 --- a/patches/videoparsers/series.frag +++ b/patches/videoparsers/series.frag @@ -4,4 +4,5 @@ videoparsers_patches_base = \ 0001-plugins-compile-the-built-in-video-parsers-as-vaapip.patch \ 0002-h264parse-fix-build-with-older-GStreamer-1.x-stacks.patch \ 0004-h264parse-default-to-byte-stream-nalu-format-Annex-B.patch \ + 0001-h265parse-include-gstvaapiparse.h.patch \ $(NULL)