From 9fdd11cda38324c6d05acf5336d2b772643d5a62 Mon Sep 17 00:00:00 2001 From: Olivier CrĂȘte Date: Thu, 9 Jul 2020 17:51:42 -0400 Subject: Update bindings for new WebRTC symbols Part-of: --- girs/GstWebRTC-1.0.gir | 169 +++++++++++++++++++-- sources/generated/Gst.WebRTC/WebRTCKind.cs | 29 ++++ sources/generated/Gst.WebRTC/WebRTCRTPSender.cs | 44 +++++- .../generated/Gst.WebRTC/WebRTCRTPTransceiver.cs | 28 +++- sources/generated/gstreamer-sharp-abi.c | 2 + sources/generated/gstreamer-sharp-abi.cs | 2 + sources/generated/gstreamer-sharp-api.xml | 20 ++- sources/generated/meson.build | 1 + sources/gstreamer-sharp-api.raw | 20 ++- 9 files changed, 293 insertions(+), 22 deletions(-) create mode 100644 sources/generated/Gst.WebRTC/WebRTCKind.cs diff --git a/girs/GstWebRTC-1.0.gir b/girs/GstWebRTC-1.0.gir index e75778b..dbf87e1 100644 --- a/girs/GstWebRTC-1.0.gir +++ b/girs/GstWebRTC-1.0.gir @@ -1521,6 +1521,39 @@ for more information. glib:nick="relay"> + + https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-kind + + Kind has not yet been set + + + Kind is audio + + + Kind is audio + + - + An object to track the receiving aspect of the stream + +Mostly matches the WebRTC RTCRtpReceiver interface. + + line="68"/> @@ -1628,7 +1667,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + line="73"/> @@ -1644,7 +1683,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + line="70"/> @@ -1661,9 +1700,15 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + The transport for RTP packets + The transport for RTCP packets without rtcp-mux @@ -1675,7 +1720,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> - + @@ -1688,20 +1733,53 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> - + An object to track the sending aspect of the stream + +Mostly matches the WebRTC RTCRtpSender interface. + - + + + Sets the content of the IPv4 Type of Service (ToS), also known as DSCP +(Differentiated Services Code Point). +This also sets the Traffic Class field of IPv6. + + + + + + + a #GstWebRTCRTPSender + + + + The priority of this sender + + + + - + @@ -1716,7 +1794,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> - + @@ -1729,20 +1807,44 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + + The priority from which to set the DSCP field on packets + + + The transport for RTP packets + The transport for RTCP packets without rtcp-mux + Unused + + The priority of the stream (Since: 1.20) + + @@ -1752,7 +1854,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> - + @@ -1765,13 +1867,17 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> + Mostly matches the WebRTC RTCRtpTransceiver interface. + line="96"/> + the mline number this transceiver corresponds to + The media ID of the m-line associated with this +transceiver. This association is established, when possible, +whenever either a local or remote description is applied. This +field is NULL if neither a local or remote description has been +applied, or if its associated m-line is rejected by either a remote +offer or any answer. + Indicates whether or not sending and receiving using the paired +#GstWebRTCRTPSender and #GstWebRTCRTPReceiver has been permanently disabled, +either due to SDP offer/answer + The #GstWebRTCRTPSender object responsible sending data to the +remote peer + The #GstWebRTCRTPReceiver object responsible for receiver data from +the remote peer. + The transceiver's desired direction. + The transceiver's current direction (read-only) + A caps representing the codec preferences (read-only) + + Type of media (Since: 1.20) + + @@ -1838,7 +1983,7 @@ See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> c:type="GstWebRTCRTPTransceiverClass" glib:is-gtype-struct-for="WebRTCRTPTransceiver"> + line="96"/> diff --git a/sources/generated/Gst.WebRTC/WebRTCKind.cs b/sources/generated/Gst.WebRTC/WebRTCKind.cs new file mode 100644 index 0000000..e5041a9 --- /dev/null +++ b/sources/generated/Gst.WebRTC/WebRTCKind.cs @@ -0,0 +1,29 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.WebRTC { + + using System; + using System.Runtime.InteropServices; + +#region Autogenerated code + [GLib.GType (typeof (Gst.WebRTC.WebRTCKindGType))] + public enum WebRTCKind { + + Unknown = 0, + Audio = 1, + Video = 2, + } + + internal class WebRTCKindGType { + [DllImport ("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_webrtc_kind_get_type (); + + public static GLib.GType GType { + get { + return new GLib.GType (gst_webrtc_kind_get_type ()); + } + } + } +#endregion +} diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs b/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs index d96de34..3a89c19 100644 --- a/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs +++ b/sources/generated/Gst.WebRTC/WebRTCRTPSender.cs @@ -25,6 +25,22 @@ namespace Gst.WebRTC { Raw = gst_webrtc_rtp_sender_new(); } + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_webrtc_rtp_sender_set_priority(IntPtr raw, int priority); + + [GLib.Property ("priority")] + public Gst.WebRTC.WebRTCPriorityType Priority { + get { + GLib.Value val = GetProperty ("priority"); + Gst.WebRTC.WebRTCPriorityType ret = (Gst.WebRTC.WebRTCPriorityType) (Enum) val; + val.Dispose (); + return ret; + } + set { + gst_webrtc_rtp_sender_set_priority(Handle, (int) value); + } + } + [DllImport("gstwebrtc-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_webrtc_rtp_sender_set_transport(IntPtr raw, IntPtr transport); @@ -55,6 +71,15 @@ namespace Gst.WebRTC { } } + public Gst.WebRTC.WebRTCPriorityType PriorityField { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("priority")); + return (Gst.WebRTC.WebRTCPriorityType) (*raw_ptr); + } + } + } + // Internal representation of the wrapped structure ABI. static GLib.AbiStruct _class_abi = null; @@ -122,14 +147,22 @@ namespace Gst.WebRTC { , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // send_encodings , "rtcp_transport" - , "_padding" + , "priority" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), + new GLib.AbiField("priority" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.WebRTC.WebRTCPriorityType))) // priority + , "send_encodings" + , "_padding" + , (long) Marshal.OffsetOf(typeof(GstWebRTCRTPSender_priorityAlign), "priority") + , 0 + ), new GLib.AbiField("_padding" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _padding - , "send_encodings" + , "priority" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 @@ -140,6 +173,13 @@ namespace Gst.WebRTC { } } + [StructLayout(LayoutKind.Sequential)] + public struct GstWebRTCRTPSender_priorityAlign + { + sbyte f1; + private Gst.WebRTC.WebRTCPriorityType priority; + } + // End of the ABI representation. diff --git a/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs index 29779e5..0d94782 100644 --- a/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs +++ b/sources/generated/Gst.WebRTC/WebRTCRTPTransceiver.cs @@ -135,6 +135,15 @@ namespace Gst.WebRTC { } } + public Gst.WebRTC.WebRTCKind Kind { + get { + unsafe { + int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("kind")); + return (Gst.WebRTC.WebRTCKind) (*raw_ptr); + } + } + } + // Internal representation of the wrapped structure ABI. static GLib.AbiStruct _class_abi = null; @@ -242,14 +251,22 @@ namespace Gst.WebRTC { , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // codec_preferences , "current_direction" - , "_padding" + , "kind" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), + new GLib.AbiField("kind" + , -1 + , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.WebRTC.WebRTCKind))) // kind + , "codec_preferences" + , "_padding" + , (long) Marshal.OffsetOf(typeof(GstWebRTCRTPTransceiver_kindAlign), "kind") + , 0 + ), new GLib.AbiField("_padding" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _padding - , "codec_preferences" + , "kind" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 @@ -288,6 +305,13 @@ namespace Gst.WebRTC { private Gst.WebRTC.WebRTCRTPTransceiverDirection current_direction; } + [StructLayout(LayoutKind.Sequential)] + public struct GstWebRTCRTPTransceiver_kindAlign + { + sbyte f1; + private Gst.WebRTC.WebRTCKind kind; + } + // End of the ABI representation. diff --git a/sources/generated/gstreamer-sharp-abi.c b/sources/generated/gstreamer-sharp-abi.c index edf0133..a02758e 100644 --- a/sources/generated/gstreamer-sharp-abi.c +++ b/sources/generated/gstreamer-sharp-abi.c @@ -1021,6 +1021,7 @@ int main (int argc, char *argv[]) { g_print("\"GstWebRTCRTPSender.transport\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPSender, transport)); g_print("\"GstWebRTCRTPSender.rtcp_transport\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPSender, rtcp_transport)); g_print("\"GstWebRTCRTPSender.send_encodings\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPSender, send_encodings)); + g_print("\"GstWebRTCRTPSender.priority\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPSender, priority)); g_print("\"sizeof(GstWebRTCRTPTransceiverClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstWebRTCRTPTransceiverClass)); g_print("\"sizeof(GstWebRTCRTPTransceiver)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstWebRTCRTPTransceiver)); g_print("\"GstWebRTCRTPTransceiver.mline\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPTransceiver, mline)); @@ -1031,5 +1032,6 @@ int main (int argc, char *argv[]) { g_print("\"GstWebRTCRTPTransceiver.direction\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPTransceiver, direction)); g_print("\"GstWebRTCRTPTransceiver.current_direction\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPTransceiver, current_direction)); g_print("\"GstWebRTCRTPTransceiver.codec_preferences\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPTransceiver, codec_preferences)); + g_print("\"GstWebRTCRTPTransceiver.kind\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstWebRTCRTPTransceiver, kind)); return 0; } diff --git a/sources/generated/gstreamer-sharp-abi.cs b/sources/generated/gstreamer-sharp-abi.cs index f61bc3f..43e3a3b 100644 --- a/sources/generated/gstreamer-sharp-abi.cs +++ b/sources/generated/gstreamer-sharp-abi.cs @@ -1015,6 +1015,7 @@ namespace AbiTester { Console.WriteLine("\"GstWebRTCRTPSender.transport\": \"" + Gst.WebRTC.WebRTCRTPSender.abi_info.GetFieldOffset("transport") + "\""); Console.WriteLine("\"GstWebRTCRTPSender.rtcp_transport\": \"" + Gst.WebRTC.WebRTCRTPSender.abi_info.GetFieldOffset("rtcp_transport") + "\""); Console.WriteLine("\"GstWebRTCRTPSender.send_encodings\": \"" + Gst.WebRTC.WebRTCRTPSender.abi_info.GetFieldOffset("send_encodings") + "\""); + Console.WriteLine("\"GstWebRTCRTPSender.priority\": \"" + Gst.WebRTC.WebRTCRTPSender.abi_info.GetFieldOffset("priority") + "\""); Console.WriteLine("\"sizeof(GstWebRTCRTPTransceiverClass)\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.class_abi.Size + "\""); Console.WriteLine("\"sizeof(GstWebRTCRTPTransceiver)\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.Size + "\""); Console.WriteLine("\"GstWebRTCRTPTransceiver.mline\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.GetFieldOffset("mline") + "\""); @@ -1025,6 +1026,7 @@ namespace AbiTester { Console.WriteLine("\"GstWebRTCRTPTransceiver.direction\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.GetFieldOffset("direction") + "\""); Console.WriteLine("\"GstWebRTCRTPTransceiver.current_direction\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.GetFieldOffset("current_direction") + "\""); Console.WriteLine("\"GstWebRTCRTPTransceiver.codec_preferences\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.GetFieldOffset("codec_preferences") + "\""); + Console.WriteLine("\"GstWebRTCRTPTransceiver.kind\": \"" + Gst.WebRTC.WebRTCRTPTransceiver.abi_info.GetFieldOffset("kind") + "\""); } } } diff --git a/sources/generated/gstreamer-sharp-api.xml b/sources/generated/gstreamer-sharp-api.xml index f5d9199..31c797d 100644 --- a/sources/generated/gstreamer-sharp-api.xml +++ b/sources/generated/gstreamer-sharp-api.xml @@ -31188,6 +31188,11 @@ + + + + + @@ -31497,7 +31502,7 @@ -