After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764987 - video: add explicit setter and getter for GstVideoCropMeta
video: add explicit setter and getter for GstVideoCropMeta
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2016-04-13 09:48 UTC by Arjen Veenhuizen
Modified: 2018-11-03 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---

Add setter and getter for GstVideoCropMeta (2.09 KB, text/plain)
2016-04-13 09:48 UTC, Arjen Veenhuizen

Description Arjen Veenhuizen 2016-04-13 09:48:26 UTC
Created attachment 325851 [details]
Add setter and getter for GstVideoCropMeta

GstVideoCropMeta does not have any setter and getter, making it impossible to set or get GstVideoCropMeta fields from Python via gi-introspection.
This patch adds the neccesary setter and getter.
Comment 1 Tim-Philipp Müller 2016-08-22 18:05:15 UTC
Thanks for the patch.

So how would adding crop meta work? You'd call gst_buffer_add_meta() with GST_VIDEO_CROP_META_INFO? Or can g-i not modify the struct directly because there's no GType registered for it?

I think my real question is whether _add_crop_meta() should be turned into a function so that it's usable from bindings, but maybe that wouldn't help?
Comment 2 Arjen Veenhuizen 2016-08-23 07:50:30 UTC
I am no expert on gi at all, I just deduced that this solution got things running :). 

Example code in python:

info = GstVideo.VideoCropMeta.get_info()
if(not(isinstance(info, Gst.MetaInfo))):
	print "This is bad"
meta = gstBuf.add_meta(info, 0)
GstVideo.buffer_set_video_crop_meta(meta, x, y, w, h)

You can retrieve the video_crop_meta using:
print GstVideo.buffer_get_video_crop_meta(gstBuf)

Not sure if I answered your question at all, so feel free to shoot if necessary.
Comment 3 GStreamer system administrator 2018-11-03 11:46:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: