GNOME Bugzilla – Bug 764987
video: add explicit setter and getter for GstVideoCropMeta
Last modified: 2018-11-03 11:46:09 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.
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?
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" return 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.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org'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: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/264.