2015-09-14 17:16:51 +00:00
|
|
|
From dbdc05803a63c4d530ea0c2932af2b35df5467b3 Mon Sep 17 00:00:00 2001
|
2015-07-22 06:45:26 +00:00
|
|
|
From: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
|
|
|
|
Date: Tue, 21 Jul 2015 12:13:18 +0300
|
2015-09-14 17:16:51 +00:00
|
|
|
Subject: [PATCH 4/6] h264parse: Disable 3D video support for GStreamer < 1.5
|
2015-07-22 06:45:26 +00:00
|
|
|
|
|
|
|
All API/ABI changes for S3D/MVC are added in 1.5, backporting
|
|
|
|
them to older verison is not recommended.
|
|
|
|
|
|
|
|
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
|
|
|
|
---
|
|
|
|
gst/vaapi/gsth264parse.c | 11 ++++++++++-
|
|
|
|
gst/vaapi/gsth264parse.h | 2 ++
|
|
|
|
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
|
2015-09-14 17:16:51 +00:00
|
|
|
index f1ed269..7ed6db8 100644
|
2015-07-22 06:45:26 +00:00
|
|
|
--- a/gst/vaapi/gsth264parse.c
|
|
|
|
+++ b/gst/vaapi/gsth264parse.c
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -218,9 +218,11 @@ gst_h264_parse_reset_stream_info (GstH264Parse * h264parse)
|
2015-07-22 06:45:26 +00:00
|
|
|
h264parse->have_pps = FALSE;
|
|
|
|
h264parse->have_sps = FALSE;
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
h264parse->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
|
|
|
|
h264parse->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
|
|
|
|
h264parse->first_in_bundle = TRUE;
|
|
|
|
+#endif
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
h264parse->align = GST_H264_PARSE_ALIGN_NONE;
|
|
|
|
h264parse->format = GST_H264_PARSE_FORMAT_NONE;
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -571,6 +573,7 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
|
2015-07-22 06:45:26 +00:00
|
|
|
/* Additional messages that are not innerly useful to the
|
|
|
|
* element but for debugging purposes */
|
|
|
|
case GST_H264_SEI_STEREO_VIDEO_INFO:{
|
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
|
|
|
|
GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
|
2015-09-14 17:16:51 +00:00
|
|
|
|
|
|
|
@@ -602,9 +605,11 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
|
2015-07-22 06:45:26 +00:00
|
|
|
/* output caps need to be changed */
|
|
|
|
gst_h264_parse_update_src_caps (h264parse, NULL);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_H264_SEI_FRAME_PACKING:{
|
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
|
|
|
|
GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
|
2015-09-14 17:16:51 +00:00
|
|
|
|
|
|
|
@@ -693,6 +698,7 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
|
2015-07-22 06:45:26 +00:00
|
|
|
/* output caps need to be changed */
|
|
|
|
gst_h264_parse_update_src_caps (h264parse, NULL);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -1762,9 +1768,11 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
2015-07-22 06:45:26 +00:00
|
|
|
gint width, height;
|
|
|
|
GstClockTime latency;
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
const gchar *caps_mview_mode = NULL;
|
|
|
|
GstVideoMultiviewMode mview_mode = h264parse->multiview_mode;
|
|
|
|
GstVideoMultiviewFlags mview_flags = h264parse->multiview_flags;
|
|
|
|
+#endif
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
fps_num = h264parse->fps_num;
|
|
|
|
fps_den = h264parse->fps_den;
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -1796,6 +1804,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
2015-07-22 06:45:26 +00:00
|
|
|
}
|
|
|
|
}
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
/* Pass through or set output stereo/multiview config */
|
|
|
|
if (s && gst_structure_has_field (s, "multiview-mode")) {
|
|
|
|
caps_mview_mode = gst_structure_get_string (s, "multiview-mode");
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -1814,7 +1823,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
2015-07-22 06:45:26 +00:00
|
|
|
GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, mview_flags,
|
|
|
|
GST_FLAG_SET_MASK_EXACT, NULL);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
+#endif
|
|
|
|
gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
|
|
|
|
"height", G_TYPE_INT, height, NULL);
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
diff --git a/gst/vaapi/gsth264parse.h b/gst/vaapi/gsth264parse.h
|
2015-09-14 17:16:51 +00:00
|
|
|
index 617e616..1b89d31 100644
|
2015-07-22 06:45:26 +00:00
|
|
|
--- a/gst/vaapi/gsth264parse.h
|
|
|
|
+++ b/gst/vaapi/gsth264parse.h
|
2015-09-14 17:16:51 +00:00
|
|
|
@@ -124,10 +124,12 @@ struct _GstH264Parse
|
2015-07-22 06:45:26 +00:00
|
|
|
GstClockTime pending_key_unit_ts;
|
|
|
|
GstEvent *force_key_unit_event;
|
2015-09-14 17:16:51 +00:00
|
|
|
|
2015-07-22 06:45:26 +00:00
|
|
|
+#if GST_CHECK_VERSION(1,5,0)
|
|
|
|
/* Stereo / multiview info */
|
|
|
|
GstVideoMultiviewMode multiview_mode;
|
|
|
|
GstVideoMultiviewFlags multiview_flags;
|
|
|
|
gboolean first_in_bundle;
|
|
|
|
+#endif
|
|
|
|
};
|
|
|
|
|
2015-09-14 17:16:51 +00:00
|
|
|
struct _GstH264ParseClass
|
|
|
|
--
|
|
|
|
2.5.1
|