[Pkg-gstreamer-commits] [gstreamer-vaapi] 12/176: vaapiencode: fix support for GStreamer 1.2.
Vincent Cheng
vcheng at moszumanska.debian.org
Tue Jun 3 08:09:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.
commit 139c99bb772488cf263513e73e3f8f63ab87a06f
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date: Tue Nov 26 15:12:59 2013 +0100
vaapiencode: fix support for GStreamer 1.2.
---
gst/vaapi/gstvaapiencode.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c
index 1c847b2..2568832 100644
--- a/gst/vaapi/gstvaapiencode.c
+++ b/gst/vaapi/gstvaapiencode.c
@@ -275,18 +275,32 @@ gst_vaapiencode_buffer_loop (GstVaapiEncode * encode)
}
static GstCaps *
-gst_vaapiencode_get_caps (GstPad * pad)
+gst_vaapiencode_get_caps_impl (GstVideoEncoder * venc)
{
- GstVaapiEncode *const encode = GST_VAAPIENCODE (GST_OBJECT_PARENT (pad));
+ GstVaapiEncode *const encode = GST_VAAPIENCODE (venc);
GstCaps *caps;
if (encode->sinkpad_caps)
caps = gst_caps_ref (encode->sinkpad_caps);
else
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+ caps = gst_pad_get_pad_template_caps (encode->sinkpad);
return caps;
}
+static GstCaps *
+gst_vaapiencode_get_caps (GstVideoEncoder * venc, GstCaps * filter)
+{
+ GstCaps *caps, *out_caps;
+
+ out_caps = gst_vaapiencode_get_caps_impl (venc);
+ if (out_caps && filter) {
+ caps = gst_caps_intersect_full (out_caps, filter, GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (out_caps);
+ out_caps = caps;
+ }
+ return out_caps;
+}
+
static gboolean
gst_vaapiencode_destroy (GstVaapiEncode * encode)
{
@@ -770,6 +784,7 @@ gst_vaapiencode_class_init (GstVaapiEncodeClass * klass)
venc_class->reset = GST_DEBUG_FUNCPTR (gst_vaapiencode_reset);
venc_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vaapiencode_handle_frame);
venc_class->finish = GST_DEBUG_FUNCPTR (gst_vaapiencode_finish);
+ venc_class->getcaps = GST_DEBUG_FUNCPTR (gst_vaapiencode_get_caps);
venc_class->propose_allocation =
GST_DEBUG_FUNCPTR (gst_vaapiencode_propose_allocation);
@@ -781,6 +796,5 @@ gst_vaapiencode_class_init (GstVaapiEncodeClass * klass)
#endif
/* Registering debug symbols for function pointers */
- GST_DEBUG_REGISTER_FUNCPTR (gst_vaapiencode_get_caps);
GST_DEBUG_REGISTER_FUNCPTR (gst_vaapiencode_query);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git
More information about the Pkg-gstreamer-commits
mailing list