plugins: Add h265 videoparser element "vaapiparse_h265"

This is a mirror of h265parse element in upstream gst-plugins-bad.
There could be additional patches but all should go to upstream.
This is for making development faster.

Note: vaapiparse_h265 will get build only for GStreamer version >= 1.4
This commit is contained in:
Sreerenj Balachandran 2015-04-17 16:45:22 +03:00
parent c7f41b770b
commit 8c7bc7dff8
6 changed files with 74 additions and 0 deletions

View file

@ -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)

View file

@ -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*

View file

@ -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;
}

View file

@ -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 */

View file

@ -0,0 +1,33 @@
From a205193cffee9405bc9013416b15d8d1499be6bb Mon Sep 17 00:00:00 2001
From: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
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 <gst/base/base.h>
#include <gst/pbutils/pbutils.h>
#include <gst/video/video.h>
@@ -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

View file

@ -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)