mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
Fix and cleanup Gst.Video bindings
This commit is contained in:
parent
484b1229c4
commit
b4ded561e3
3 changed files with 36 additions and 1 deletions
|
@ -1224,7 +1224,14 @@
|
||||||
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_size']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_size']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_new_caps']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_new_caps']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_new_caps_interlaced']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_new_caps_interlaced']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_component_height']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_component_offset']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_component_width']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_pixel_stride']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
|
<move-node path="/api/namespace/class[@name='Global']/method[@cname='gst_video_format_get_row_stride']">/api/namespace/class[@cname='GstVideoUtil']</move-node>
|
||||||
<attr path="/api/namespace/class[@cname='GstVideoUtil']/method[@name='FormatNewCapsInterlaced']" name="name">FormatNewCaps</attr>
|
<attr path="/api/namespace/class[@cname='GstVideoUtil']/method[@name='FormatNewCapsInterlaced']" name="name">FormatNewCaps</attr>
|
||||||
|
<attr path="/api/namespace/class[@cname='GstVideoUtil']/method[@cname='gst_video_frame_rate']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/class[@cname='GstVideoUtil']/method[@cname='gst_video_format_to_fourcc']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yv12']" name="name">YV12</attr>
|
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yv12']" name="name">YV12</attr>
|
||||||
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yuy2']" name="name">YUY2</attr>
|
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yuy2']" name="name">YUY2</attr>
|
||||||
|
@ -1244,4 +1251,7 @@
|
||||||
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Y42b']" name="name">Y42B</attr>
|
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Y42b']" name="name">Y42B</attr>
|
||||||
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yvyu']" name="name">YVYU</attr>
|
<attr path="/api/namespace/enum[@cname='GstVideoFormat']/member[@name='Yvyu']" name="name">YVYU</attr>
|
||||||
|
|
||||||
|
|
||||||
|
<attr path="/api/namespace/object[@cname='GstVideoSink']/method[@cname='gst_video_sink_center_rect']/parameters/parameter[@name='result']" name="pass_as">ref</attr>
|
||||||
|
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -114,7 +114,8 @@ customs = \
|
||||||
TunerChannel.custom \
|
TunerChannel.custom \
|
||||||
Adapter.custom \
|
Adapter.custom \
|
||||||
Controller.custom \
|
Controller.custom \
|
||||||
ControlSource.custom
|
ControlSource.custom \
|
||||||
|
VideoUtil.custom
|
||||||
|
|
||||||
build_customs = $(addprefix $(srcdir)/, $(customs))
|
build_customs = $(addprefix $(srcdir)/, $(customs))
|
||||||
|
|
||||||
|
|
24
gstreamer-sharp/VideoUtil.custom
Normal file
24
gstreamer-sharp/VideoUtil.custom
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[DllImport ("libgstvideo-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_video_frame_rate (IntPtr pad);
|
||||||
|
|
||||||
|
public static Gst.Fraction GetFrameRate (Gst.Pad pad) {
|
||||||
|
IntPtr raw_ret = gst_video_frame_rate (pad == null ? IntPtr.Zero : pad.Handle);
|
||||||
|
if (raw_ret == IntPtr.Zero)
|
||||||
|
return new Gst.Fraction ();
|
||||||
|
|
||||||
|
GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
|
||||||
|
return (Gst.Fraction) ret.Val;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport ("libgstvideo-0.10.dll") ]
|
||||||
|
static extern uint gst_video_format_to_fourcc (int format);
|
||||||
|
|
||||||
|
public static Gst.Fourcc FormatToFourcc (Gst.Video.VideoFormat format) {
|
||||||
|
uint raw_ret = gst_video_format_to_fourcc ( (int) format);
|
||||||
|
uint ret = raw_ret;
|
||||||
|
return new Gst.Fourcc (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Gst.Video.VideoFormat FormatFromFourcc (Gst.Fourcc fourcc) {
|
||||||
|
return FormatFromFourcc (fourcc.Val);
|
||||||
|
}
|
Loading…
Reference in a new issue