// Code generated by girgen for GstWebRTC-1. DO NOT EDIT. package gstwebrtc import ( "fmt" "log" "runtime" "unsafe" "github.com/diamondburned/gotk4/pkg/core/userdata" "github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/diamondburned/gotk4/pkg/gobject/v2" "github.com/go-gst/go-gst/pkg/gst" "github.com/go-gst/go-gst/pkg/gstsdp" ) // #cgo pkg-config: gstreamer-webrtc-1.0 gstreamer-sdp-1.0 // #cgo CFLAGS: -Wno-deprecated-declarations // #define GST_USE_UNSTABLE_API // APIs in this package are unstable // #include // #include // extern void _gotk4_gstwebrtc1_WebRTCICEOnCandidateFunc(GstWebRTCICE*, guint, gchar*, gpointer); // extern void destroyUserdata(gpointer); // extern void _gotk4_gstwebrtc1_WebRTCICE_add_candidate(GstWebRTCICE*, GstWebRTCICEStream*, gchar*, GstPromise*); // extern GstWebRTCICEStream* _gotk4_gstwebrtc1_WebRTCICE_add_stream(GstWebRTCICE*, guint); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_add_turn_server(GstWebRTCICE*, gchar*); // extern GstWebRTCICETransport* _gotk4_gstwebrtc1_WebRTCICE_find_transport(GstWebRTCICE*, GstWebRTCICEStream*, GstWebRTCICEComponent); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_gather_candidates(GstWebRTCICE*, GstWebRTCICEStream*); // extern gchar* _gotk4_gstwebrtc1_WebRTCICE_get_http_proxy(GstWebRTCICE*); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_get_is_controller(GstWebRTCICE*); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_get_selected_pair(GstWebRTCICE*, GstWebRTCICEStream*, GstWebRTCICECandidateStats*, GstWebRTCICECandidateStats*); // extern gchar* _gotk4_gstwebrtc1_WebRTCICE_get_stun_server(GstWebRTCICE*); // extern gchar* _gotk4_gstwebrtc1_WebRTCICE_get_turn_server(GstWebRTCICE*); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_force_relay(GstWebRTCICE*, gboolean); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_http_proxy(GstWebRTCICE*, gchar*); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_is_controller(GstWebRTCICE*, gboolean); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_set_local_credentials(GstWebRTCICE*, GstWebRTCICEStream*, gchar*, gchar*); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_on_ice_candidate(GstWebRTCICE*, GstWebRTCICEOnCandidateFunc, gpointer, GDestroyNotify); // extern gboolean _gotk4_gstwebrtc1_WebRTCICE_set_remote_credentials(GstWebRTCICE*, GstWebRTCICEStream*, gchar*, gchar*); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_stun_server(GstWebRTCICE*, gchar*); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_tos(GstWebRTCICE*, GstWebRTCICEStream*, guint); // extern void _gotk4_gstwebrtc1_WebRTCICE_set_turn_server(GstWebRTCICE*, gchar*); // void _gotk4_gstwebrtc1_WebRTCICE_virtual_add_candidate(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, gchar* carg2, GstPromise* carg3) { // return ((void (*) (GstWebRTCICE*, GstWebRTCICEStream*, gchar*, GstPromise*))(fnptr))(carg0, carg1, carg2, carg3); // } // GstWebRTCICEStream* _gotk4_gstwebrtc1_WebRTCICE_virtual_add_stream(void* fnptr, GstWebRTCICE* carg0, guint carg1) { // return ((GstWebRTCICEStream* (*) (GstWebRTCICE*, guint))(fnptr))(carg0, carg1); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_add_turn_server(void* fnptr, GstWebRTCICE* carg0, gchar* carg1) { // return ((gboolean (*) (GstWebRTCICE*, gchar*))(fnptr))(carg0, carg1); // } // GstWebRTCICETransport* _gotk4_gstwebrtc1_WebRTCICE_virtual_find_transport(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, GstWebRTCICEComponent carg2) { // return ((GstWebRTCICETransport* (*) (GstWebRTCICE*, GstWebRTCICEStream*, GstWebRTCICEComponent))(fnptr))(carg0, carg1, carg2); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_gather_candidates(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1) { // return ((gboolean (*) (GstWebRTCICE*, GstWebRTCICEStream*))(fnptr))(carg0, carg1); // } // gchar* _gotk4_gstwebrtc1_WebRTCICE_virtual_get_http_proxy(void* fnptr, GstWebRTCICE* carg0) { // return ((gchar* (*) (GstWebRTCICE*))(fnptr))(carg0); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_get_is_controller(void* fnptr, GstWebRTCICE* carg0) { // return ((gboolean (*) (GstWebRTCICE*))(fnptr))(carg0); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_get_selected_pair(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, GstWebRTCICECandidateStats** carg2, GstWebRTCICECandidateStats** carg3) { // return ((gboolean (*) (GstWebRTCICE*, GstWebRTCICEStream*, GstWebRTCICECandidateStats**, GstWebRTCICECandidateStats**))(fnptr))(carg0, carg1, carg2, carg3); // } // gchar* _gotk4_gstwebrtc1_WebRTCICE_virtual_get_stun_server(void* fnptr, GstWebRTCICE* carg0) { // return ((gchar* (*) (GstWebRTCICE*))(fnptr))(carg0); // } // gchar* _gotk4_gstwebrtc1_WebRTCICE_virtual_get_turn_server(void* fnptr, GstWebRTCICE* carg0) { // return ((gchar* (*) (GstWebRTCICE*))(fnptr))(carg0); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_force_relay(void* fnptr, GstWebRTCICE* carg0, gboolean carg1) { // return ((void (*) (GstWebRTCICE*, gboolean))(fnptr))(carg0, carg1); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_http_proxy(void* fnptr, GstWebRTCICE* carg0, gchar* carg1) { // return ((void (*) (GstWebRTCICE*, gchar*))(fnptr))(carg0, carg1); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_is_controller(void* fnptr, GstWebRTCICE* carg0, gboolean carg1) { // return ((void (*) (GstWebRTCICE*, gboolean))(fnptr))(carg0, carg1); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_set_local_credentials(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, gchar* carg2, gchar* carg3) { // return ((gboolean (*) (GstWebRTCICE*, GstWebRTCICEStream*, gchar*, gchar*))(fnptr))(carg0, carg1, carg2, carg3); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_on_ice_candidate(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEOnCandidateFunc carg1, gpointer carg2, GDestroyNotify carg3) { // return ((void (*) (GstWebRTCICE*, GstWebRTCICEOnCandidateFunc, gpointer, GDestroyNotify))(fnptr))(carg0, carg1, carg2, carg3); // } // gboolean _gotk4_gstwebrtc1_WebRTCICE_virtual_set_remote_credentials(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, gchar* carg2, gchar* carg3) { // return ((gboolean (*) (GstWebRTCICE*, GstWebRTCICEStream*, gchar*, gchar*))(fnptr))(carg0, carg1, carg2, carg3); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_stun_server(void* fnptr, GstWebRTCICE* carg0, gchar* carg1) { // return ((void (*) (GstWebRTCICE*, gchar*))(fnptr))(carg0, carg1); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_tos(void* fnptr, GstWebRTCICE* carg0, GstWebRTCICEStream* carg1, guint carg2) { // return ((void (*) (GstWebRTCICE*, GstWebRTCICEStream*, guint))(fnptr))(carg0, carg1, carg2); // } // void _gotk4_gstwebrtc1_WebRTCICE_virtual_set_turn_server(void* fnptr, GstWebRTCICE* carg0, gchar* carg1) { // return ((void (*) (GstWebRTCICE*, gchar*))(fnptr))(carg0, carg1); // } // extern GstWebRTCICETransport* _gotk4_gstwebrtc1_WebRTCICEStream_find_transport(GstWebRTCICEStream*, GstWebRTCICEComponent); // extern gboolean _gotk4_gstwebrtc1_WebRTCICEStream_gather_candidates(GstWebRTCICEStream*); // GstWebRTCICETransport* _gotk4_gstwebrtc1_WebRTCICEStream_virtual_find_transport(void* fnptr, GstWebRTCICEStream* carg0, GstWebRTCICEComponent carg1) { // return ((GstWebRTCICETransport* (*) (GstWebRTCICEStream*, GstWebRTCICEComponent))(fnptr))(carg0, carg1); // } // gboolean _gotk4_gstwebrtc1_WebRTCICEStream_virtual_gather_candidates(void* fnptr, GstWebRTCICEStream* carg0) { // return ((gboolean (*) (GstWebRTCICEStream*))(fnptr))(carg0); // } // extern gboolean _gotk4_gstwebrtc1_WebRTCICETransport_gather_candidates(GstWebRTCICETransport*); // gboolean _gotk4_gstwebrtc1_WebRTCICETransport_virtual_gather_candidates(void* fnptr, GstWebRTCICETransport* carg0) { // return ((gboolean (*) (GstWebRTCICETransport*))(fnptr))(carg0); // } import "C" // GType values. var ( TypeWebRTCBundlePolicy = gobject.Type(C.gst_webrtc_bundle_policy_get_type()) TypeWebRTCDTLSSetup = gobject.Type(C.gst_webrtc_dtls_setup_get_type()) TypeWebRTCDTLSTransportState = gobject.Type(C.gst_webrtc_dtls_transport_state_get_type()) TypeWebRTCDataChannelState = gobject.Type(C.gst_webrtc_data_channel_state_get_type()) TypeWebRTCError = gobject.Type(C.gst_webrtc_error_get_type()) TypeWebRTCFECType = gobject.Type(C.gst_webrtc_fec_type_get_type()) TypeWebRTCICEComponent = gobject.Type(C.gst_webrtc_ice_component_get_type()) TypeWebRTCICEConnectionState = gobject.Type(C.gst_webrtc_ice_connection_state_get_type()) TypeWebRTCICEGatheringState = gobject.Type(C.gst_webrtc_ice_gathering_state_get_type()) TypeWebRTCICERole = gobject.Type(C.gst_webrtc_ice_role_get_type()) TypeWebRTCICETransportPolicy = gobject.Type(C.gst_webrtc_ice_transport_policy_get_type()) TypeWebRTCKind = gobject.Type(C.gst_webrtc_kind_get_type()) TypeWebRTCPeerConnectionState = gobject.Type(C.gst_webrtc_peer_connection_state_get_type()) TypeWebRTCPriorityType = gobject.Type(C.gst_webrtc_priority_type_get_type()) TypeWebRTCRTPTransceiverDirection = gobject.Type(C.gst_webrtc_rtp_transceiver_direction_get_type()) TypeWebRTCSCTPTransportState = gobject.Type(C.gst_webrtc_sctp_transport_state_get_type()) TypeWebRTCSDPType = gobject.Type(C.gst_webrtc_sdp_type_get_type()) TypeWebRTCSignalingState = gobject.Type(C.gst_webrtc_signaling_state_get_type()) TypeWebRTCStatsType = gobject.Type(C.gst_webrtc_stats_type_get_type()) TypeWebRTCDTLSTransport = gobject.Type(C.gst_webrtc_dtls_transport_get_type()) TypeWebRTCDataChannel = gobject.Type(C.gst_webrtc_data_channel_get_type()) TypeWebRTCICE = gobject.Type(C.gst_webrtc_ice_get_type()) TypeWebRTCICEStream = gobject.Type(C.gst_webrtc_ice_stream_get_type()) TypeWebRTCICETransport = gobject.Type(C.gst_webrtc_ice_transport_get_type()) TypeWebRTCRTPReceiver = gobject.Type(C.gst_webrtc_rtp_receiver_get_type()) TypeWebRTCRTPSender = gobject.Type(C.gst_webrtc_rtp_sender_get_type()) TypeWebRTCRTPTransceiver = gobject.Type(C.gst_webrtc_rtp_transceiver_get_type()) TypeWebRTCSCTPTransport = gobject.Type(C.gst_webrtc_sctp_transport_get_type()) TypeWebRTCICECandidateStats = gobject.Type(C.gst_webrtc_ice_candidate_stats_get_type()) TypeWebRTCSessionDescription = gobject.Type(C.gst_webrtc_session_description_get_type()) ) func init() { gobject.RegisterGValueMarshalers([]gobject.TypeMarshaler{ gobject.TypeMarshaler{T: TypeWebRTCBundlePolicy, F: marshalWebRTCBundlePolicy}, gobject.TypeMarshaler{T: TypeWebRTCDTLSSetup, F: marshalWebRTCDTLSSetup}, gobject.TypeMarshaler{T: TypeWebRTCDTLSTransportState, F: marshalWebRTCDTLSTransportState}, gobject.TypeMarshaler{T: TypeWebRTCDataChannelState, F: marshalWebRTCDataChannelState}, gobject.TypeMarshaler{T: TypeWebRTCError, F: marshalWebRTCError}, gobject.TypeMarshaler{T: TypeWebRTCFECType, F: marshalWebRTCFECType}, gobject.TypeMarshaler{T: TypeWebRTCICEComponent, F: marshalWebRTCICEComponent}, gobject.TypeMarshaler{T: TypeWebRTCICEConnectionState, F: marshalWebRTCICEConnectionState}, gobject.TypeMarshaler{T: TypeWebRTCICEGatheringState, F: marshalWebRTCICEGatheringState}, gobject.TypeMarshaler{T: TypeWebRTCICERole, F: marshalWebRTCICERole}, gobject.TypeMarshaler{T: TypeWebRTCICETransportPolicy, F: marshalWebRTCICETransportPolicy}, gobject.TypeMarshaler{T: TypeWebRTCKind, F: marshalWebRTCKind}, gobject.TypeMarshaler{T: TypeWebRTCPeerConnectionState, F: marshalWebRTCPeerConnectionState}, gobject.TypeMarshaler{T: TypeWebRTCPriorityType, F: marshalWebRTCPriorityType}, gobject.TypeMarshaler{T: TypeWebRTCRTPTransceiverDirection, F: marshalWebRTCRTPTransceiverDirection}, gobject.TypeMarshaler{T: TypeWebRTCSCTPTransportState, F: marshalWebRTCSCTPTransportState}, gobject.TypeMarshaler{T: TypeWebRTCSDPType, F: marshalWebRTCSDPType}, gobject.TypeMarshaler{T: TypeWebRTCSignalingState, F: marshalWebRTCSignalingState}, gobject.TypeMarshaler{T: TypeWebRTCStatsType, F: marshalWebRTCStatsType}, gobject.TypeMarshaler{T: TypeWebRTCDTLSTransport, F: marshalWebRTCDTLSTransportInstance}, gobject.TypeMarshaler{T: TypeWebRTCDataChannel, F: marshalWebRTCDataChannelInstance}, gobject.TypeMarshaler{T: TypeWebRTCICE, F: marshalWebRTCICEInstance}, gobject.TypeMarshaler{T: TypeWebRTCICEStream, F: marshalWebRTCICEStreamInstance}, gobject.TypeMarshaler{T: TypeWebRTCICETransport, F: marshalWebRTCICETransportInstance}, gobject.TypeMarshaler{T: TypeWebRTCRTPReceiver, F: marshalWebRTCRTPReceiverInstance}, gobject.TypeMarshaler{T: TypeWebRTCRTPSender, F: marshalWebRTCRTPSenderInstance}, gobject.TypeMarshaler{T: TypeWebRTCRTPTransceiver, F: marshalWebRTCRTPTransceiverInstance}, gobject.TypeMarshaler{T: TypeWebRTCSCTPTransport, F: marshalWebRTCSCTPTransportInstance}, gobject.TypeMarshaler{T: TypeWebRTCICECandidateStats, F: marshalWebRTCICECandidateStats}, gobject.TypeMarshaler{T: TypeWebRTCSessionDescription, F: marshalWebRTCSessionDescription}, }) } // WebRTCBundlePolicy wraps GstWebRTCBundlePolicy // // See https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 // for more information. type WebRTCBundlePolicy C.int const ( // WebrtcBundlePolicyNone wraps GST_WEBRTC_BUNDLE_POLICY_NONE // // none WebrtcBundlePolicyNone WebRTCBundlePolicy = 0 // WebrtcBundlePolicyBalanced wraps GST_WEBRTC_BUNDLE_POLICY_BALANCED // // balanced WebrtcBundlePolicyBalanced WebRTCBundlePolicy = 1 // WebrtcBundlePolicyMaxCompat wraps GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT // // max-compat WebrtcBundlePolicyMaxCompat WebRTCBundlePolicy = 2 // WebrtcBundlePolicyMaxBundle wraps GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE // // max-bundle WebrtcBundlePolicyMaxBundle WebRTCBundlePolicy = 3 ) func marshalWebRTCBundlePolicy(p unsafe.Pointer) (any, error) { return WebRTCBundlePolicy(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCBundlePolicy(0) func (e WebRTCBundlePolicy) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCBundlePolicy) v.SetEnum(int(e)) } func (e WebRTCBundlePolicy) String() string { switch e { case WebrtcBundlePolicyBalanced: return "WebrtcBundlePolicyBalanced" case WebrtcBundlePolicyMaxBundle: return "WebrtcBundlePolicyMaxBundle" case WebrtcBundlePolicyMaxCompat: return "WebrtcBundlePolicyMaxCompat" case WebrtcBundlePolicyNone: return "WebrtcBundlePolicyNone" default: return fmt.Sprintf("WebRTCBundlePolicy(%d)", e) } } // WebRTCDTLSSetup wraps GstWebRTCDTLSSetup type WebRTCDTLSSetup C.int const ( // WebrtcDTLSSetupNone wraps GST_WEBRTC_DTLS_SETUP_NONE // // none WebrtcDTLSSetupNone WebRTCDTLSSetup = 0 // WebrtcDTLSSetupActpass wraps GST_WEBRTC_DTLS_SETUP_ACTPASS // // actpass WebrtcDTLSSetupActpass WebRTCDTLSSetup = 1 // WebrtcDTLSSetupActive wraps GST_WEBRTC_DTLS_SETUP_ACTIVE // // sendonly WebrtcDTLSSetupActive WebRTCDTLSSetup = 2 // WebrtcDTLSSetupPassive wraps GST_WEBRTC_DTLS_SETUP_PASSIVE // // recvonly WebrtcDTLSSetupPassive WebRTCDTLSSetup = 3 ) func marshalWebRTCDTLSSetup(p unsafe.Pointer) (any, error) { return WebRTCDTLSSetup(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCDTLSSetup(0) func (e WebRTCDTLSSetup) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCDTLSSetup) v.SetEnum(int(e)) } func (e WebRTCDTLSSetup) String() string { switch e { case WebrtcDTLSSetupActive: return "WebrtcDTLSSetupActive" case WebrtcDTLSSetupActpass: return "WebrtcDTLSSetupActpass" case WebrtcDTLSSetupNone: return "WebrtcDTLSSetupNone" case WebrtcDTLSSetupPassive: return "WebrtcDTLSSetupPassive" default: return fmt.Sprintf("WebRTCDTLSSetup(%d)", e) } } // WebRTCDTLSTransportState wraps GstWebRTCDTLSTransportState type WebRTCDTLSTransportState C.int const ( // NewWebrtcDTLSTransportState wraps GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW // // new NewWebrtcDTLSTransportState WebRTCDTLSTransportState = 0 // WebrtcDTLSTransportStateClosed wraps GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED // // closed WebrtcDTLSTransportStateClosed WebRTCDTLSTransportState = 1 // WebrtcDTLSTransportStateFailed wraps GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED // // failed WebrtcDTLSTransportStateFailed WebRTCDTLSTransportState = 2 // WebrtcDTLSTransportStateConnecting wraps GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING // // connecting WebrtcDTLSTransportStateConnecting WebRTCDTLSTransportState = 3 // WebrtcDTLSTransportStateConnected wraps GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED // // connected WebrtcDTLSTransportStateConnected WebRTCDTLSTransportState = 4 ) func marshalWebRTCDTLSTransportState(p unsafe.Pointer) (any, error) { return WebRTCDTLSTransportState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCDTLSTransportState(0) func (e WebRTCDTLSTransportState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCDTLSTransportState) v.SetEnum(int(e)) } func (e WebRTCDTLSTransportState) String() string { switch e { case NewWebrtcDTLSTransportState: return "NewWebrtcDTLSTransportState" case WebrtcDTLSTransportStateClosed: return "WebrtcDTLSTransportStateClosed" case WebrtcDTLSTransportStateConnected: return "WebrtcDTLSTransportStateConnected" case WebrtcDTLSTransportStateConnecting: return "WebrtcDTLSTransportStateConnecting" case WebrtcDTLSTransportStateFailed: return "WebrtcDTLSTransportStateFailed" default: return fmt.Sprintf("WebRTCDTLSTransportState(%d)", e) } } // WebRTCDataChannelState wraps GstWebRTCDataChannelState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcdatachannelstate> type WebRTCDataChannelState C.int const ( // WebrtcDataChannelStateConnecting wraps GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING // // connecting WebrtcDataChannelStateConnecting WebRTCDataChannelState = 1 // WebrtcDataChannelStateOpen wraps GST_WEBRTC_DATA_CHANNEL_STATE_OPEN // // open WebrtcDataChannelStateOpen WebRTCDataChannelState = 2 // WebrtcDataChannelStateClosing wraps GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING // // closing WebrtcDataChannelStateClosing WebRTCDataChannelState = 3 // WebrtcDataChannelStateClosed wraps GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED // // closed WebrtcDataChannelStateClosed WebRTCDataChannelState = 4 ) func marshalWebRTCDataChannelState(p unsafe.Pointer) (any, error) { return WebRTCDataChannelState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCDataChannelState(0) func (e WebRTCDataChannelState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCDataChannelState) v.SetEnum(int(e)) } func (e WebRTCDataChannelState) String() string { switch e { case WebrtcDataChannelStateClosed: return "WebrtcDataChannelStateClosed" case WebrtcDataChannelStateClosing: return "WebrtcDataChannelStateClosing" case WebrtcDataChannelStateConnecting: return "WebrtcDataChannelStateConnecting" case WebrtcDataChannelStateOpen: return "WebrtcDataChannelStateOpen" default: return fmt.Sprintf("WebRTCDataChannelState(%d)", e) } } // WebRTCError wraps GstWebRTCError // // See <https://www.w3.org/TR/webrtc/#dom-rtcerrordetailtype> for more information. type WebRTCError C.int const ( // WebrtcErrorDataChannelFailure wraps GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE // // data-channel-failure WebrtcErrorDataChannelFailure WebRTCError = 0 // WebrtcErrorDTLSFailure wraps GST_WEBRTC_ERROR_DTLS_FAILURE // // dtls-failure WebrtcErrorDTLSFailure WebRTCError = 1 // WebrtcErrorFingerprintFailure wraps GST_WEBRTC_ERROR_FINGERPRINT_FAILURE // // fingerprint-failure WebrtcErrorFingerprintFailure WebRTCError = 2 // WebrtcErrorSCTPFailure wraps GST_WEBRTC_ERROR_SCTP_FAILURE // // sctp-failure WebrtcErrorSCTPFailure WebRTCError = 3 // WebrtcErrorSdpSyntaxError wraps GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR // // sdp-syntax-error WebrtcErrorSdpSyntaxError WebRTCError = 4 // WebrtcErrorHardwareEncoderNotAvailable wraps GST_WEBRTC_ERROR_HARDWARE_ENCODER_NOT_AVAILABLE // // hardware-encoder-not-available WebrtcErrorHardwareEncoderNotAvailable WebRTCError = 5 // WebrtcErrorEncoderError wraps GST_WEBRTC_ERROR_ENCODER_ERROR // // encoder-error WebrtcErrorEncoderError WebRTCError = 6 // WebrtcErrorInvalidState wraps GST_WEBRTC_ERROR_INVALID_STATE // // invalid-state (part of WebIDL specification) WebrtcErrorInvalidState WebRTCError = 7 // WebrtcErrorInternalFailure wraps GST_WEBRTC_ERROR_INTERNAL_FAILURE // // GStreamer-specific failure, not matching any other value from the specification WebrtcErrorInternalFailure WebRTCError = 8 // WebrtcErrorInvalidModification wraps GST_WEBRTC_ERROR_INVALID_MODIFICATION // // invalid-modification (part of WebIDL specification) WebrtcErrorInvalidModification WebRTCError = 9 // WebrtcErrorTypeError wraps GST_WEBRTC_ERROR_TYPE_ERROR // // type-error (maps to JavaScript TypeError) WebrtcErrorTypeError WebRTCError = 10 ) func marshalWebRTCError(p unsafe.Pointer) (any, error) { return WebRTCError(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCError(0) func (e WebRTCError) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCError) v.SetEnum(int(e)) } func (e WebRTCError) String() string { switch e { case WebrtcErrorDTLSFailure: return "WebrtcErrorDTLSFailure" case WebrtcErrorDataChannelFailure: return "WebrtcErrorDataChannelFailure" case WebrtcErrorEncoderError: return "WebrtcErrorEncoderError" case WebrtcErrorFingerprintFailure: return "WebrtcErrorFingerprintFailure" case WebrtcErrorHardwareEncoderNotAvailable: return "WebrtcErrorHardwareEncoderNotAvailable" case WebrtcErrorInternalFailure: return "WebrtcErrorInternalFailure" case WebrtcErrorInvalidModification: return "WebrtcErrorInvalidModification" case WebrtcErrorInvalidState: return "WebrtcErrorInvalidState" case WebrtcErrorSCTPFailure: return "WebrtcErrorSCTPFailure" case WebrtcErrorSdpSyntaxError: return "WebrtcErrorSdpSyntaxError" case WebrtcErrorTypeError: return "WebrtcErrorTypeError" default: return fmt.Sprintf("WebRTCError(%d)", e) } } // WebRTCErrorQuark wraps gst_webrtc_error_quark // // The function returns the following values: // // - goret glib.Quark func WebRTCErrorQuark() glib.Quark { var cret C.GQuark // return, none, casted, alias cret = C.gst_webrtc_error_quark() var goret glib.Quark goret = glib.Quark(cret) return goret } // WebRTCFECType wraps GstWebRTCFECType type WebRTCFECType C.int const ( // WebrtcFecTypeNone wraps GST_WEBRTC_FEC_TYPE_NONE // // none WebrtcFecTypeNone WebRTCFECType = 0 // WebrtcFecTypeUlpRed wraps GST_WEBRTC_FEC_TYPE_ULP_RED // // ulpfec + red WebrtcFecTypeUlpRed WebRTCFECType = 1 ) func marshalWebRTCFECType(p unsafe.Pointer) (any, error) { return WebRTCFECType(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCFECType(0) func (e WebRTCFECType) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCFECType) v.SetEnum(int(e)) } func (e WebRTCFECType) String() string { switch e { case WebrtcFecTypeNone: return "WebrtcFecTypeNone" case WebrtcFecTypeUlpRed: return "WebrtcFecTypeUlpRed" default: return fmt.Sprintf("WebRTCFECType(%d)", e) } } // WebRTCICEComponent wraps GstWebRTCICEComponent type WebRTCICEComponent C.int const ( // WebrtcIceComponentRtp wraps GST_WEBRTC_ICE_COMPONENT_RTP // // RTP component WebrtcIceComponentRtp WebRTCICEComponent = 0 // WebrtcIceComponentRtcp wraps GST_WEBRTC_ICE_COMPONENT_RTCP // // RTCP component WebrtcIceComponentRtcp WebRTCICEComponent = 1 ) func marshalWebRTCICEComponent(p unsafe.Pointer) (any, error) { return WebRTCICEComponent(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCICEComponent(0) func (e WebRTCICEComponent) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICEComponent) v.SetEnum(int(e)) } func (e WebRTCICEComponent) String() string { switch e { case WebrtcIceComponentRtcp: return "WebrtcIceComponentRtcp" case WebrtcIceComponentRtp: return "WebrtcIceComponentRtp" default: return fmt.Sprintf("WebRTCICEComponent(%d)", e) } } // WebRTCICEConnectionState wraps GstWebRTCICEConnectionState // // See <http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate> type WebRTCICEConnectionState C.int const ( // NewWebrtcIceConnectionState wraps GST_WEBRTC_ICE_CONNECTION_STATE_NEW // // new NewWebrtcIceConnectionState WebRTCICEConnectionState = 0 // WebrtcIceConnectionStateChecking wraps GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING // // checking WebrtcIceConnectionStateChecking WebRTCICEConnectionState = 1 // WebrtcIceConnectionStateConnected wraps GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED // // connected WebrtcIceConnectionStateConnected WebRTCICEConnectionState = 2 // WebrtcIceConnectionStateCompleted wraps GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED // // completed WebrtcIceConnectionStateCompleted WebRTCICEConnectionState = 3 // WebrtcIceConnectionStateFailed wraps GST_WEBRTC_ICE_CONNECTION_STATE_FAILED // // failed WebrtcIceConnectionStateFailed WebRTCICEConnectionState = 4 // WebrtcIceConnectionStateDisconnected wraps GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED // // disconnected WebrtcIceConnectionStateDisconnected WebRTCICEConnectionState = 5 // WebrtcIceConnectionStateClosed wraps GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED // // closed WebrtcIceConnectionStateClosed WebRTCICEConnectionState = 6 ) func marshalWebRTCICEConnectionState(p unsafe.Pointer) (any, error) { return WebRTCICEConnectionState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCICEConnectionState(0) func (e WebRTCICEConnectionState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICEConnectionState) v.SetEnum(int(e)) } func (e WebRTCICEConnectionState) String() string { switch e { case NewWebrtcIceConnectionState: return "NewWebrtcIceConnectionState" case WebrtcIceConnectionStateChecking: return "WebrtcIceConnectionStateChecking" case WebrtcIceConnectionStateClosed: return "WebrtcIceConnectionStateClosed" case WebrtcIceConnectionStateCompleted: return "WebrtcIceConnectionStateCompleted" case WebrtcIceConnectionStateConnected: return "WebrtcIceConnectionStateConnected" case WebrtcIceConnectionStateDisconnected: return "WebrtcIceConnectionStateDisconnected" case WebrtcIceConnectionStateFailed: return "WebrtcIceConnectionStateFailed" default: return fmt.Sprintf("WebRTCICEConnectionState(%d)", e) } } // WebRTCICEGatheringState wraps GstWebRTCICEGatheringState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate> type WebRTCICEGatheringState C.int const ( // NewWebrtcIceGatheringState wraps GST_WEBRTC_ICE_GATHERING_STATE_NEW // // new NewWebrtcIceGatheringState WebRTCICEGatheringState = 0 // WebrtcIceGatheringStateGathering wraps GST_WEBRTC_ICE_GATHERING_STATE_GATHERING // // gathering WebrtcIceGatheringStateGathering WebRTCICEGatheringState = 1 // WebrtcIceGatheringStateComplete wraps GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE // // complete WebrtcIceGatheringStateComplete WebRTCICEGatheringState = 2 ) func marshalWebRTCICEGatheringState(p unsafe.Pointer) (any, error) { return WebRTCICEGatheringState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCICEGatheringState(0) func (e WebRTCICEGatheringState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICEGatheringState) v.SetEnum(int(e)) } func (e WebRTCICEGatheringState) String() string { switch e { case NewWebrtcIceGatheringState: return "NewWebrtcIceGatheringState" case WebrtcIceGatheringStateComplete: return "WebrtcIceGatheringStateComplete" case WebrtcIceGatheringStateGathering: return "WebrtcIceGatheringStateGathering" default: return fmt.Sprintf("WebRTCICEGatheringState(%d)", e) } } // WebRTCICERole wraps GstWebRTCICERole type WebRTCICERole C.int const ( // WebrtcIceRoleControlled wraps GST_WEBRTC_ICE_ROLE_CONTROLLED // // controlled WebrtcIceRoleControlled WebRTCICERole = 0 // WebrtcIceRoleControlling wraps GST_WEBRTC_ICE_ROLE_CONTROLLING // // controlling WebrtcIceRoleControlling WebRTCICERole = 1 ) func marshalWebRTCICERole(p unsafe.Pointer) (any, error) { return WebRTCICERole(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCICERole(0) func (e WebRTCICERole) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICERole) v.SetEnum(int(e)) } func (e WebRTCICERole) String() string { switch e { case WebrtcIceRoleControlled: return "WebrtcIceRoleControlled" case WebrtcIceRoleControlling: return "WebrtcIceRoleControlling" default: return fmt.Sprintf("WebRTCICERole(%d)", e) } } // WebRTCICETransportPolicy wraps GstWebRTCICETransportPolicy // // See https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-4.1.1 // for more information. type WebRTCICETransportPolicy C.int const ( // WebrtcIceTransportPolicyAll wraps GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL // // all WebrtcIceTransportPolicyAll WebRTCICETransportPolicy = 0 // WebrtcIceTransportPolicyRelay wraps GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY // // relay WebrtcIceTransportPolicyRelay WebRTCICETransportPolicy = 1 ) func marshalWebRTCICETransportPolicy(p unsafe.Pointer) (any, error) { return WebRTCICETransportPolicy(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCICETransportPolicy(0) func (e WebRTCICETransportPolicy) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICETransportPolicy) v.SetEnum(int(e)) } func (e WebRTCICETransportPolicy) String() string { switch e { case WebrtcIceTransportPolicyAll: return "WebrtcIceTransportPolicyAll" case WebrtcIceTransportPolicyRelay: return "WebrtcIceTransportPolicyRelay" default: return fmt.Sprintf("WebRTCICETransportPolicy(%d)", e) } } // WebRTCKind wraps GstWebRTCKind // // https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-kind type WebRTCKind C.int const ( // WebrtcKindUnknown wraps GST_WEBRTC_KIND_UNKNOWN // // Kind has not yet been set WebrtcKindUnknown WebRTCKind = 0 // WebrtcKindAudio wraps GST_WEBRTC_KIND_AUDIO // // Kind is audio WebrtcKindAudio WebRTCKind = 1 // WebrtcKindVideo wraps GST_WEBRTC_KIND_VIDEO // // Kind is audio WebrtcKindVideo WebRTCKind = 2 ) func marshalWebRTCKind(p unsafe.Pointer) (any, error) { return WebRTCKind(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCKind(0) func (e WebRTCKind) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCKind) v.SetEnum(int(e)) } func (e WebRTCKind) String() string { switch e { case WebrtcKindAudio: return "WebrtcKindAudio" case WebrtcKindUnknown: return "WebrtcKindUnknown" case WebrtcKindVideo: return "WebrtcKindVideo" default: return fmt.Sprintf("WebRTCKind(%d)", e) } } // WebRTCPeerConnectionState wraps GstWebRTCPeerConnectionState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate> type WebRTCPeerConnectionState C.int const ( // NewWebrtcPeerConnectionState wraps GST_WEBRTC_PEER_CONNECTION_STATE_NEW // // new NewWebrtcPeerConnectionState WebRTCPeerConnectionState = 0 // WebrtcPeerConnectionStateConnecting wraps GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING // // connecting WebrtcPeerConnectionStateConnecting WebRTCPeerConnectionState = 1 // WebrtcPeerConnectionStateConnected wraps GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED // // connected WebrtcPeerConnectionStateConnected WebRTCPeerConnectionState = 2 // WebrtcPeerConnectionStateDisconnected wraps GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED // // disconnected WebrtcPeerConnectionStateDisconnected WebRTCPeerConnectionState = 3 // WebrtcPeerConnectionStateFailed wraps GST_WEBRTC_PEER_CONNECTION_STATE_FAILED // // failed WebrtcPeerConnectionStateFailed WebRTCPeerConnectionState = 4 // WebrtcPeerConnectionStateClosed wraps GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED // // closed WebrtcPeerConnectionStateClosed WebRTCPeerConnectionState = 5 ) func marshalWebRTCPeerConnectionState(p unsafe.Pointer) (any, error) { return WebRTCPeerConnectionState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCPeerConnectionState(0) func (e WebRTCPeerConnectionState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCPeerConnectionState) v.SetEnum(int(e)) } func (e WebRTCPeerConnectionState) String() string { switch e { case NewWebrtcPeerConnectionState: return "NewWebrtcPeerConnectionState" case WebrtcPeerConnectionStateClosed: return "WebrtcPeerConnectionStateClosed" case WebrtcPeerConnectionStateConnected: return "WebrtcPeerConnectionStateConnected" case WebrtcPeerConnectionStateConnecting: return "WebrtcPeerConnectionStateConnecting" case WebrtcPeerConnectionStateDisconnected: return "WebrtcPeerConnectionStateDisconnected" case WebrtcPeerConnectionStateFailed: return "WebrtcPeerConnectionStateFailed" default: return fmt.Sprintf("WebRTCPeerConnectionState(%d)", e) } } // WebRTCPriorityType wraps GstWebRTCPriorityType // // See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype> type WebRTCPriorityType C.int const ( // WebrtcPriorityTypeVeryLow wraps GST_WEBRTC_PRIORITY_TYPE_VERY_LOW // // very-low WebrtcPriorityTypeVeryLow WebRTCPriorityType = 1 // WebrtcPriorityTypeLow wraps GST_WEBRTC_PRIORITY_TYPE_LOW // // low WebrtcPriorityTypeLow WebRTCPriorityType = 2 // WebrtcPriorityTypeMedium wraps GST_WEBRTC_PRIORITY_TYPE_MEDIUM // // medium WebrtcPriorityTypeMedium WebRTCPriorityType = 3 // WebrtcPriorityTypeHigh wraps GST_WEBRTC_PRIORITY_TYPE_HIGH // // high WebrtcPriorityTypeHigh WebRTCPriorityType = 4 ) func marshalWebRTCPriorityType(p unsafe.Pointer) (any, error) { return WebRTCPriorityType(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCPriorityType(0) func (e WebRTCPriorityType) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCPriorityType) v.SetEnum(int(e)) } func (e WebRTCPriorityType) String() string { switch e { case WebrtcPriorityTypeHigh: return "WebrtcPriorityTypeHigh" case WebrtcPriorityTypeLow: return "WebrtcPriorityTypeLow" case WebrtcPriorityTypeMedium: return "WebrtcPriorityTypeMedium" case WebrtcPriorityTypeVeryLow: return "WebrtcPriorityTypeVeryLow" default: return fmt.Sprintf("WebRTCPriorityType(%d)", e) } } // WebRTCRTPTransceiverDirection wraps GstWebRTCRTPTransceiverDirection type WebRTCRTPTransceiverDirection C.int const ( // WebrtcRtpTransceiverDirectionNone wraps GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE // // none WebrtcRtpTransceiverDirectionNone WebRTCRTPTransceiverDirection = 0 // WebrtcRtpTransceiverDirectionInactive wraps GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE // // inactive WebrtcRtpTransceiverDirectionInactive WebRTCRTPTransceiverDirection = 1 // WebrtcRtpTransceiverDirectionSendonly wraps GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY // // sendonly WebrtcRtpTransceiverDirectionSendonly WebRTCRTPTransceiverDirection = 2 // WebrtcRtpTransceiverDirectionRecvonly wraps GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY // // recvonly WebrtcRtpTransceiverDirectionRecvonly WebRTCRTPTransceiverDirection = 3 // WebrtcRtpTransceiverDirectionSendrecv wraps GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV // // sendrecv WebrtcRtpTransceiverDirectionSendrecv WebRTCRTPTransceiverDirection = 4 ) func marshalWebRTCRTPTransceiverDirection(p unsafe.Pointer) (any, error) { return WebRTCRTPTransceiverDirection(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCRTPTransceiverDirection(0) func (e WebRTCRTPTransceiverDirection) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCRTPTransceiverDirection) v.SetEnum(int(e)) } func (e WebRTCRTPTransceiverDirection) String() string { switch e { case WebrtcRtpTransceiverDirectionInactive: return "WebrtcRtpTransceiverDirectionInactive" case WebrtcRtpTransceiverDirectionNone: return "WebrtcRtpTransceiverDirectionNone" case WebrtcRtpTransceiverDirectionRecvonly: return "WebrtcRtpTransceiverDirectionRecvonly" case WebrtcRtpTransceiverDirectionSendonly: return "WebrtcRtpTransceiverDirectionSendonly" case WebrtcRtpTransceiverDirectionSendrecv: return "WebrtcRtpTransceiverDirectionSendrecv" default: return fmt.Sprintf("WebRTCRTPTransceiverDirection(%d)", e) } } // WebRTCSCTPTransportState wraps GstWebRTCSCTPTransportState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcsctptransportstate> type WebRTCSCTPTransportState C.int const ( // NewWebrtcSCTPTransportState wraps GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW // // new NewWebrtcSCTPTransportState WebRTCSCTPTransportState = 0 // WebrtcSCTPTransportStateConnecting wraps GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING // // connecting WebrtcSCTPTransportStateConnecting WebRTCSCTPTransportState = 1 // WebrtcSCTPTransportStateConnected wraps GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED // // connected WebrtcSCTPTransportStateConnected WebRTCSCTPTransportState = 2 // WebrtcSCTPTransportStateClosed wraps GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED // // closed WebrtcSCTPTransportStateClosed WebRTCSCTPTransportState = 3 ) func marshalWebRTCSCTPTransportState(p unsafe.Pointer) (any, error) { return WebRTCSCTPTransportState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCSCTPTransportState(0) func (e WebRTCSCTPTransportState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCSCTPTransportState) v.SetEnum(int(e)) } func (e WebRTCSCTPTransportState) String() string { switch e { case NewWebrtcSCTPTransportState: return "NewWebrtcSCTPTransportState" case WebrtcSCTPTransportStateClosed: return "WebrtcSCTPTransportStateClosed" case WebrtcSCTPTransportStateConnected: return "WebrtcSCTPTransportStateConnected" case WebrtcSCTPTransportStateConnecting: return "WebrtcSCTPTransportStateConnecting" default: return fmt.Sprintf("WebRTCSCTPTransportState(%d)", e) } } // WebRTCSDPType wraps GstWebRTCSDPType // // See <http://w3c.github.io/webrtc-pc/#rtcsdptype> type WebRTCSDPType C.int const ( // WebrtcSdpTypeOffer wraps GST_WEBRTC_SDP_TYPE_OFFER // // offer WebrtcSdpTypeOffer WebRTCSDPType = 1 // WebrtcSdpTypePranswer wraps GST_WEBRTC_SDP_TYPE_PRANSWER // // pranswer WebrtcSdpTypePranswer WebRTCSDPType = 2 // WebrtcSdpTypeAnswer wraps GST_WEBRTC_SDP_TYPE_ANSWER // // answer WebrtcSdpTypeAnswer WebRTCSDPType = 3 // WebrtcSdpTypeRollback wraps GST_WEBRTC_SDP_TYPE_ROLLBACK // // rollback WebrtcSdpTypeRollback WebRTCSDPType = 4 ) func marshalWebRTCSDPType(p unsafe.Pointer) (any, error) { return WebRTCSDPType(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCSDPType(0) func (e WebRTCSDPType) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCSDPType) v.SetEnum(int(e)) } func (e WebRTCSDPType) String() string { switch e { case WebrtcSdpTypeAnswer: return "WebrtcSdpTypeAnswer" case WebrtcSdpTypeOffer: return "WebrtcSdpTypeOffer" case WebrtcSdpTypePranswer: return "WebrtcSdpTypePranswer" case WebrtcSdpTypeRollback: return "WebrtcSdpTypeRollback" default: return fmt.Sprintf("WebRTCSDPType(%d)", e) } } // WebRTCSDPTypeToString wraps gst_webrtc_sdp_type_to_string // // The function takes the following parameters: // // - typ WebRTCSDPType: a #GstWebRTCSDPType // // The function returns the following values: // // - goret string func WebRTCSDPTypeToString(typ WebRTCSDPType) string { var carg1 C.GstWebRTCSDPType // in, none, casted var cret *C.gchar // return, none, string carg1 = C.GstWebRTCSDPType(typ) cret = C.gst_webrtc_sdp_type_to_string(carg1) runtime.KeepAlive(typ) var goret string goret = C.GoString((*C.char)(unsafe.Pointer(cret))) return goret } // WebRTCSignalingState wraps GstWebRTCSignalingState // // See <http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate> type WebRTCSignalingState C.int const ( // WebrtcSignalingStateStable wraps GST_WEBRTC_SIGNALING_STATE_STABLE // // stable WebrtcSignalingStateStable WebRTCSignalingState = 0 // WebrtcSignalingStateClosed wraps GST_WEBRTC_SIGNALING_STATE_CLOSED // // closed WebrtcSignalingStateClosed WebRTCSignalingState = 1 // WebrtcSignalingStateHaveLocalOffer wraps GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER // // have-local-offer WebrtcSignalingStateHaveLocalOffer WebRTCSignalingState = 2 // WebrtcSignalingStateHaveRemoteOffer wraps GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER // // have-remote-offer WebrtcSignalingStateHaveRemoteOffer WebRTCSignalingState = 3 // WebrtcSignalingStateHaveLocalPranswer wraps GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER // // have-local-pranswer WebrtcSignalingStateHaveLocalPranswer WebRTCSignalingState = 4 // WebrtcSignalingStateHaveRemotePranswer wraps GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER // // have-remote-pranswer WebrtcSignalingStateHaveRemotePranswer WebRTCSignalingState = 5 ) func marshalWebRTCSignalingState(p unsafe.Pointer) (any, error) { return WebRTCSignalingState(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCSignalingState(0) func (e WebRTCSignalingState) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCSignalingState) v.SetEnum(int(e)) } func (e WebRTCSignalingState) String() string { switch e { case WebrtcSignalingStateClosed: return "WebrtcSignalingStateClosed" case WebrtcSignalingStateHaveLocalOffer: return "WebrtcSignalingStateHaveLocalOffer" case WebrtcSignalingStateHaveLocalPranswer: return "WebrtcSignalingStateHaveLocalPranswer" case WebrtcSignalingStateHaveRemoteOffer: return "WebrtcSignalingStateHaveRemoteOffer" case WebrtcSignalingStateHaveRemotePranswer: return "WebrtcSignalingStateHaveRemotePranswer" case WebrtcSignalingStateStable: return "WebrtcSignalingStateStable" default: return fmt.Sprintf("WebRTCSignalingState(%d)", e) } } // WebRTCStatsType wraps GstWebRTCStatsType // // See <https://w3c.github.io/webrtc-stats/#dom-rtcstatstype> type WebRTCStatsType C.int const ( // WebrtcStatsCodec wraps GST_WEBRTC_STATS_CODEC // // codec WebrtcStatsCodec WebRTCStatsType = 1 // WebrtcStatsInboundRtp wraps GST_WEBRTC_STATS_INBOUND_RTP // // inbound-rtp WebrtcStatsInboundRtp WebRTCStatsType = 2 // WebrtcStatsOutboundRtp wraps GST_WEBRTC_STATS_OUTBOUND_RTP // // outbound-rtp WebrtcStatsOutboundRtp WebRTCStatsType = 3 // WebrtcStatsRemoteInboundRtp wraps GST_WEBRTC_STATS_REMOTE_INBOUND_RTP // // remote-inbound-rtp WebrtcStatsRemoteInboundRtp WebRTCStatsType = 4 // WebrtcStatsRemoteOutboundRtp wraps GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP // // remote-outbound-rtp WebrtcStatsRemoteOutboundRtp WebRTCStatsType = 5 // WebrtcStatsCsrc wraps GST_WEBRTC_STATS_CSRC // // csrc WebrtcStatsCsrc WebRTCStatsType = 6 // WebrtcStatsPeerConnection wraps GST_WEBRTC_STATS_PEER_CONNECTION // // peer-connection WebrtcStatsPeerConnection WebRTCStatsType = 7 // WebrtcStatsDataChannel wraps GST_WEBRTC_STATS_DATA_CHANNEL // // data-channel WebrtcStatsDataChannel WebRTCStatsType = 8 // WebrtcStatsStream wraps GST_WEBRTC_STATS_STREAM // // stream WebrtcStatsStream WebRTCStatsType = 9 // WebrtcStatsTransport wraps GST_WEBRTC_STATS_TRANSPORT // // transport WebrtcStatsTransport WebRTCStatsType = 10 // WebrtcStatsCandidatePair wraps GST_WEBRTC_STATS_CANDIDATE_PAIR // // candidate-pair WebrtcStatsCandidatePair WebRTCStatsType = 11 // WebrtcStatsLocalCandidate wraps GST_WEBRTC_STATS_LOCAL_CANDIDATE // // local-candidate WebrtcStatsLocalCandidate WebRTCStatsType = 12 // WebrtcStatsRemoteCandidate wraps GST_WEBRTC_STATS_REMOTE_CANDIDATE // // remote-candidate WebrtcStatsRemoteCandidate WebRTCStatsType = 13 // WebrtcStatsCertificate wraps GST_WEBRTC_STATS_CERTIFICATE // // certificate WebrtcStatsCertificate WebRTCStatsType = 14 ) func marshalWebRTCStatsType(p unsafe.Pointer) (any, error) { return WebRTCStatsType(gobject.ValueFromNative(p).Enum()), nil } var _ gobject.GoValueInitializer = WebRTCStatsType(0) func (e WebRTCStatsType) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCStatsType) v.SetEnum(int(e)) } func (e WebRTCStatsType) String() string { switch e { case WebrtcStatsCandidatePair: return "WebrtcStatsCandidatePair" case WebrtcStatsCertificate: return "WebrtcStatsCertificate" case WebrtcStatsCodec: return "WebrtcStatsCodec" case WebrtcStatsCsrc: return "WebrtcStatsCsrc" case WebrtcStatsDataChannel: return "WebrtcStatsDataChannel" case WebrtcStatsInboundRtp: return "WebrtcStatsInboundRtp" case WebrtcStatsLocalCandidate: return "WebrtcStatsLocalCandidate" case WebrtcStatsOutboundRtp: return "WebrtcStatsOutboundRtp" case WebrtcStatsPeerConnection: return "WebrtcStatsPeerConnection" case WebrtcStatsRemoteCandidate: return "WebrtcStatsRemoteCandidate" case WebrtcStatsRemoteInboundRtp: return "WebrtcStatsRemoteInboundRtp" case WebrtcStatsRemoteOutboundRtp: return "WebrtcStatsRemoteOutboundRtp" case WebrtcStatsStream: return "WebrtcStatsStream" case WebrtcStatsTransport: return "WebrtcStatsTransport" default: return fmt.Sprintf("WebRTCStatsType(%d)", e) } } // WebRTCICEOnCandidateFunc wraps GstWebRTCICEOnCandidateFunc // // Callback function to be triggered on discovery of a new candidate type WebRTCICEOnCandidateFunc func(ice WebRTCICE, streamId uint, candidate string) // WebRTCDTLSTransportInstance is the instance type used by all types extending GstWebRTCDTLSTransport. It is used internally by the bindings. Users should use the interface [WebRTCDTLSTransport] instead. type WebRTCDTLSTransportInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCDTLSTransport = (*WebRTCDTLSTransportInstance)(nil) // WebRTCDTLSTransport wraps GstWebRTCDTLSTransport type WebRTCDTLSTransport interface { gst.Object upcastToGstWebRTCDTLSTransport() *WebRTCDTLSTransportInstance } func unsafeWrapWebRTCDTLSTransport(base *gobject.ObjectInstance) *WebRTCDTLSTransportInstance { return &WebRTCDTLSTransportInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCDTLSTransportInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCDTLSTransport(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCDTLSTransportFromGlibNone is used to convert raw GstWebRTCDTLSTransport pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportFromGlibNone(c unsafe.Pointer) WebRTCDTLSTransport { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCDTLSTransport) } // UnsafeWebRTCDTLSTransportFromGlibFull is used to convert raw GstWebRTCDTLSTransport pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportFromGlibFull(c unsafe.Pointer) WebRTCDTLSTransport { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCDTLSTransport) } func (w *WebRTCDTLSTransportInstance) upcastToGstWebRTCDTLSTransport() *WebRTCDTLSTransportInstance { return w } // UnsafeWebRTCDTLSTransportToGlibNone is used to convert the instance to it's C value GstWebRTCDTLSTransport. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportToGlibNone(c WebRTCDTLSTransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCDTLSTransportToGlibFull is used to convert the instance to it's C value GstWebRTCDTLSTransport, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportToGlibFull(c WebRTCDTLSTransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // WebRTCDataChannelInstance is the instance type used by all types extending GstWebRTCDataChannel. It is used internally by the bindings. Users should use the interface [WebRTCDataChannel] instead. type WebRTCDataChannelInstance struct { _ [0]func() // equal guard gobject.ObjectInstance } var _ WebRTCDataChannel = (*WebRTCDataChannelInstance)(nil) // WebRTCDataChannel wraps GstWebRTCDataChannel type WebRTCDataChannel interface { gobject.Object upcastToGstWebRTCDataChannel() *WebRTCDataChannelInstance // Close wraps gst_webrtc_data_channel_close // // Close the @channel. Close() // SendData wraps gst_webrtc_data_channel_send_data // // The function takes the following parameters: // // - data *glib.Bytes (nullable): a #GBytes or %NULL // // Send @data as a data message over @channel. SendData(*glib.Bytes) // SendDataFull wraps gst_webrtc_data_channel_send_data_full // // The function takes the following parameters: // // - data *glib.Bytes (nullable): a #GBytes or %NULL // // The function returns the following values: // // - goret bool // - _goerr error (nullable): an error // // Send @data as a data message over @channel. SendDataFull(*glib.Bytes) (bool, error) // SendString wraps gst_webrtc_data_channel_send_string // // The function takes the following parameters: // // - str string (nullable): a string or %NULL // // Send @str as a string message over @channel. SendString(string) // SendStringFull wraps gst_webrtc_data_channel_send_string_full // // The function takes the following parameters: // // - str string (nullable): a string or %NULL // // The function returns the following values: // // - goret bool // - _goerr error (nullable): an error // // Send @str as a string message over @channel. SendStringFull(string) (bool, error) // EmitClose emits the "close" signal // // Close the data channel EmitClose() // ConnectOnBufferedAmountLow connects the provided callback to the "on-buffered-amount-low" signal ConnectOnBufferedAmountLow(func(WebRTCDataChannel)) gobject.SignalHandle // ConnectOnClose connects the provided callback to the "on-close" signal ConnectOnClose(func(WebRTCDataChannel)) gobject.SignalHandle // ConnectOnError connects the provided callback to the "on-error" signal ConnectOnError(func(WebRTCDataChannel, error)) gobject.SignalHandle // ConnectOnMessageData connects the provided callback to the "on-message-data" signal ConnectOnMessageData(func(WebRTCDataChannel, glib.Bytes)) gobject.SignalHandle // ConnectOnMessageString connects the provided callback to the "on-message-string" signal ConnectOnMessageString(func(WebRTCDataChannel, string)) gobject.SignalHandle // ConnectOnOpen connects the provided callback to the "on-open" signal ConnectOnOpen(func(WebRTCDataChannel)) gobject.SignalHandle // EmitSendData emits the "send-data" signal EmitSendData(glib.Bytes) // EmitSendString emits the "send-string" signal EmitSendString(string) } func unsafeWrapWebRTCDataChannel(base *gobject.ObjectInstance) *WebRTCDataChannelInstance { return &WebRTCDataChannelInstance{ ObjectInstance: *base, } } func marshalWebRTCDataChannelInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCDataChannel(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCDataChannelFromGlibNone is used to convert raw GstWebRTCDataChannel pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCDataChannelFromGlibNone(c unsafe.Pointer) WebRTCDataChannel { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCDataChannel) } // UnsafeWebRTCDataChannelFromGlibFull is used to convert raw GstWebRTCDataChannel pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCDataChannelFromGlibFull(c unsafe.Pointer) WebRTCDataChannel { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCDataChannel) } func (w *WebRTCDataChannelInstance) upcastToGstWebRTCDataChannel() *WebRTCDataChannelInstance { return w } // UnsafeWebRTCDataChannelToGlibNone is used to convert the instance to it's C value GstWebRTCDataChannel. This is used by the bindings internally. func UnsafeWebRTCDataChannelToGlibNone(c WebRTCDataChannel) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCDataChannelToGlibFull is used to convert the instance to it's C value GstWebRTCDataChannel, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCDataChannelToGlibFull(c WebRTCDataChannel) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // Close wraps gst_webrtc_data_channel_close // // Close the @channel. func (channel *WebRTCDataChannelInstance) Close() { var carg0 *C.GstWebRTCDataChannel // in, none, converted carg0 = (*C.GstWebRTCDataChannel)(UnsafeWebRTCDataChannelToGlibNone(channel)) C.gst_webrtc_data_channel_close(carg0) runtime.KeepAlive(channel) } // SendData wraps gst_webrtc_data_channel_send_data // // The function takes the following parameters: // // - data *glib.Bytes (nullable): a #GBytes or %NULL // // Send @data as a data message over @channel. func (channel *WebRTCDataChannelInstance) SendData(data *glib.Bytes) { var carg0 *C.GstWebRTCDataChannel // in, none, converted var carg1 *C.GBytes // in, none, converted, nullable carg0 = (*C.GstWebRTCDataChannel)(UnsafeWebRTCDataChannelToGlibNone(channel)) if data != nil { carg1 = (*C.GBytes)(glib.UnsafeBytesToGlibNone(data)) } C.gst_webrtc_data_channel_send_data(carg0, carg1) runtime.KeepAlive(channel) runtime.KeepAlive(data) } // SendDataFull wraps gst_webrtc_data_channel_send_data_full // // The function takes the following parameters: // // - data *glib.Bytes (nullable): a #GBytes or %NULL // // The function returns the following values: // // - goret bool // - _goerr error (nullable): an error // // Send @data as a data message over @channel. func (channel *WebRTCDataChannelInstance) SendDataFull(data *glib.Bytes) (bool, error) { var carg0 *C.GstWebRTCDataChannel // in, none, converted var carg1 *C.GBytes // in, none, converted, nullable var cret C.gboolean // return var _cerr *C.GError // out, full, converted, nullable carg0 = (*C.GstWebRTCDataChannel)(UnsafeWebRTCDataChannelToGlibNone(channel)) if data != nil { carg1 = (*C.GBytes)(glib.UnsafeBytesToGlibNone(data)) } cret = C.gst_webrtc_data_channel_send_data_full(carg0, carg1, &_cerr) runtime.KeepAlive(channel) runtime.KeepAlive(data) var goret bool var _goerr error if cret != 0 { goret = true } if _cerr != nil { _goerr = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(_cerr)) } return goret, _goerr } // SendString wraps gst_webrtc_data_channel_send_string // // The function takes the following parameters: // // - str string (nullable): a string or %NULL // // Send @str as a string message over @channel. func (channel *WebRTCDataChannelInstance) SendString(str string) { var carg0 *C.GstWebRTCDataChannel // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string carg0 = (*C.GstWebRTCDataChannel)(UnsafeWebRTCDataChannelToGlibNone(channel)) if str != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) } C.gst_webrtc_data_channel_send_string(carg0, carg1) runtime.KeepAlive(channel) runtime.KeepAlive(str) } // SendStringFull wraps gst_webrtc_data_channel_send_string_full // // The function takes the following parameters: // // - str string (nullable): a string or %NULL // // The function returns the following values: // // - goret bool // - _goerr error (nullable): an error // // Send @str as a string message over @channel. func (channel *WebRTCDataChannelInstance) SendStringFull(str string) (bool, error) { var carg0 *C.GstWebRTCDataChannel // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string var cret C.gboolean // return var _cerr *C.GError // out, full, converted, nullable carg0 = (*C.GstWebRTCDataChannel)(UnsafeWebRTCDataChannelToGlibNone(channel)) if str != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(str))) defer C.free(unsafe.Pointer(carg1)) } cret = C.gst_webrtc_data_channel_send_string_full(carg0, carg1, &_cerr) runtime.KeepAlive(channel) runtime.KeepAlive(str) var goret bool var _goerr error if cret != 0 { goret = true } if _cerr != nil { _goerr = glib.UnsafeErrorFromGlibFull(unsafe.Pointer(_cerr)) } return goret, _goerr } // EmitClose emits the "close" signal // // Close the data channel func (o *WebRTCDataChannelInstance) EmitClose() { o.Emit("close") } // ConnectOnBufferedAmountLow connects the provided callback to the "on-buffered-amount-low" signal func (o *WebRTCDataChannelInstance) ConnectOnBufferedAmountLow(fn func(WebRTCDataChannel)) gobject.SignalHandle { return o.Connect("on-buffered-amount-low", fn) } // ConnectOnClose connects the provided callback to the "on-close" signal func (o *WebRTCDataChannelInstance) ConnectOnClose(fn func(WebRTCDataChannel)) gobject.SignalHandle { return o.Connect("on-close", fn) } // ConnectOnError connects the provided callback to the "on-error" signal func (o *WebRTCDataChannelInstance) ConnectOnError(fn func(WebRTCDataChannel, error)) gobject.SignalHandle { return o.Connect("on-error", fn) } // ConnectOnMessageData connects the provided callback to the "on-message-data" signal func (o *WebRTCDataChannelInstance) ConnectOnMessageData(fn func(WebRTCDataChannel, glib.Bytes)) gobject.SignalHandle { return o.Connect("on-message-data", fn) } // ConnectOnMessageString connects the provided callback to the "on-message-string" signal func (o *WebRTCDataChannelInstance) ConnectOnMessageString(fn func(WebRTCDataChannel, string)) gobject.SignalHandle { return o.Connect("on-message-string", fn) } // ConnectOnOpen connects the provided callback to the "on-open" signal func (o *WebRTCDataChannelInstance) ConnectOnOpen(fn func(WebRTCDataChannel)) gobject.SignalHandle { return o.Connect("on-open", fn) } // EmitSendData emits the "send-data" signal func (o *WebRTCDataChannelInstance) EmitSendData(arg0 glib.Bytes) { o.Emit("send-data", arg0) } // EmitSendString emits the "send-string" signal func (o *WebRTCDataChannelInstance) EmitSendString(arg0 string) { o.Emit("send-string", arg0) } // WebRTCICEInstance is the instance type used by all types extending GstWebRTCICE. It is used internally by the bindings. Users should use the interface [WebRTCICE] instead. type WebRTCICEInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCICE = (*WebRTCICEInstance)(nil) // WebRTCICE wraps GstWebRTCICE type WebRTCICE interface { gst.Object upcastToGstWebRTCICE() *WebRTCICEInstance // AddCandidate wraps gst_webrtc_ice_add_candidate // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - candidate string: The ICE candidate // - promise *gst.Promise (nullable): A #GstPromise for task notifications (Since: 1.24) AddCandidate(WebRTCICEStream, string, *gst.Promise) // AddStream wraps gst_webrtc_ice_add_stream // // The function takes the following parameters: // // - sessionId uint: The session id // // The function returns the following values: // // - goret WebRTCICEStream (nullable) AddStream(uint) WebRTCICEStream // AddTurnServer wraps gst_webrtc_ice_add_turn_server // // The function takes the following parameters: // // - uri string: URI of the TURN server // // The function returns the following values: // // - goret bool AddTurnServer(string) bool // FindTransport wraps gst_webrtc_ice_find_transport // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) FindTransport(WebRTCICEStream, WebRTCICEComponent) WebRTCICETransport // GatherCandidates wraps gst_webrtc_ice_gather_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret bool GatherCandidates(WebRTCICEStream) bool // GetHTTPProxy wraps gst_webrtc_ice_get_http_proxy // // The function returns the following values: // // - goret string GetHTTPProxy() string // GetIsController wraps gst_webrtc_ice_get_is_controller // // The function returns the following values: // // - goret bool GetIsController() bool // GetLocalCandidates wraps gst_webrtc_ice_get_local_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret []*WebRTCICECandidateStats GetLocalCandidates(WebRTCICEStream) []*WebRTCICECandidateStats // GetRemoteCandidates wraps gst_webrtc_ice_get_remote_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret []*WebRTCICECandidateStats GetRemoteCandidates(WebRTCICEStream) []*WebRTCICECandidateStats // GetSelectedPair wraps gst_webrtc_ice_get_selected_pair // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - localStats *WebRTCICECandidateStats: A pointer to #GstWebRTCICECandidateStats for local candidate // - remoteStats *WebRTCICECandidateStats: pointer to #GstWebRTCICECandidateStats for remote candidate // - goret bool GetSelectedPair(WebRTCICEStream) (*WebRTCICECandidateStats, *WebRTCICECandidateStats, bool) // GetStunServer wraps gst_webrtc_ice_get_stun_server // // The function returns the following values: // // - goret string (nullable) GetStunServer() string // GetTurnServer wraps gst_webrtc_ice_get_turn_server // // The function returns the following values: // // - goret string (nullable) GetTurnServer() string // SetForceRelay wraps gst_webrtc_ice_set_force_relay // // The function takes the following parameters: // // - forceRelay bool: TRUE to enable force relay SetForceRelay(bool) // SetHTTPProxy wraps gst_webrtc_ice_set_http_proxy // // The function takes the following parameters: // // - uri string: URI of the HTTP proxy of the form // http://[username:password@]hostname[:port][?alpn=<alpn>] // // Set HTTP Proxy to be used when connecting to TURN server. SetHTTPProxy(string) // SetIsController wraps gst_webrtc_ice_set_is_controller // // The function takes the following parameters: // // - controller bool: TRUE to set as controller SetIsController(bool) // SetLocalCredentials wraps gst_webrtc_ice_set_local_credentials // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool SetLocalCredentials(WebRTCICEStream, string, string) bool // SetOnIceCandidate wraps gst_webrtc_ice_set_on_ice_candidate // // The function takes the following parameters: // // - fn WebRTCICEOnCandidateFunc: The #GstWebRTCICEOnCandidateFunc callback function SetOnIceCandidate(WebRTCICEOnCandidateFunc) // SetRemoteCredentials wraps gst_webrtc_ice_set_remote_credentials // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool SetRemoteCredentials(WebRTCICEStream, string, string) bool // SetStunServer wraps gst_webrtc_ice_set_stun_server // // The function takes the following parameters: // // - uri string (nullable): URI of the STUN server SetStunServer(string) // SetTos wraps gst_webrtc_ice_set_tos // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - tos uint: ToS to be set SetTos(WebRTCICEStream, uint) // SetTurnServer wraps gst_webrtc_ice_set_turn_server // // The function takes the following parameters: // // - uri string (nullable): URI of the TURN sever SetTurnServer(string) // EmitAddLocalIPAddress emits the "add-local-ip-address" signal // // Add a local IP address to use for ICE candidate gathering. If none // are supplied, they will be discovered automatically. Calling this signal // stops automatic ICE gathering. EmitAddLocalIPAddress(string) bool } func unsafeWrapWebRTCICE(base *gobject.ObjectInstance) *WebRTCICEInstance { return &WebRTCICEInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCICEInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCICE(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCICEFromGlibNone is used to convert raw GstWebRTCICE pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICEFromGlibNone(c unsafe.Pointer) WebRTCICE { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCICE) } // UnsafeWebRTCICEFromGlibFull is used to convert raw GstWebRTCICE pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICEFromGlibFull(c unsafe.Pointer) WebRTCICE { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICE) } func (w *WebRTCICEInstance) upcastToGstWebRTCICE() *WebRTCICEInstance { return w } // UnsafeWebRTCICEToGlibNone is used to convert the instance to it's C value GstWebRTCICE. This is used by the bindings internally. func UnsafeWebRTCICEToGlibNone(c WebRTCICE) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCICEToGlibFull is used to convert the instance to it's C value GstWebRTCICE, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCICEToGlibFull(c WebRTCICE) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // AddCandidate wraps gst_webrtc_ice_add_candidate // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - candidate string: The ICE candidate // - promise *gst.Promise (nullable): A #GstPromise for task notifications (Since: 1.24) func (ice *WebRTCICEInstance) AddCandidate(stream WebRTCICEStream, candidate string, promise *gst.Promise) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.GstPromise // in, none, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(candidate))) defer C.free(unsafe.Pointer(carg2)) if promise != nil { carg3 = (*C.GstPromise)(gst.UnsafePromiseToGlibNone(promise)) } C.gst_webrtc_ice_add_candidate(carg0, carg1, carg2, carg3) runtime.KeepAlive(ice) runtime.KeepAlive(stream) runtime.KeepAlive(candidate) runtime.KeepAlive(promise) } // AddStream wraps gst_webrtc_ice_add_stream // // The function takes the following parameters: // // - sessionId uint: The session id // // The function returns the following values: // // - goret WebRTCICEStream (nullable) func (ice *WebRTCICEInstance) AddStream(sessionId uint) WebRTCICEStream { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 C.guint // in, none, casted var cret *C.GstWebRTCICEStream // return, full, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = C.guint(sessionId) cret = C.gst_webrtc_ice_add_stream(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(sessionId) var goret WebRTCICEStream if cret != nil { goret = UnsafeWebRTCICEStreamFromGlibFull(unsafe.Pointer(cret)) } return goret } // AddTurnServer wraps gst_webrtc_ice_add_turn_server // // The function takes the following parameters: // // - uri string: URI of the TURN server // // The function returns the following values: // // - goret bool func (ice *WebRTCICEInstance) AddTurnServer(uri string) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) cret = C.gst_webrtc_ice_add_turn_server(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(uri) var goret bool if cret != 0 { goret = true } return goret } // FindTransport wraps gst_webrtc_ice_find_transport // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) func (ice *WebRTCICEInstance) FindTransport(stream WebRTCICEStream, component WebRTCICEComponent) WebRTCICETransport { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 C.GstWebRTCICEComponent // in, none, casted var cret *C.GstWebRTCICETransport // return, full, converted, nullable carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg2 = C.GstWebRTCICEComponent(component) cret = C.gst_webrtc_ice_find_transport(carg0, carg1, carg2) runtime.KeepAlive(ice) runtime.KeepAlive(stream) runtime.KeepAlive(component) var goret WebRTCICETransport if cret != nil { goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) } return goret } // GatherCandidates wraps gst_webrtc_ice_gather_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret bool func (ice *WebRTCICEInstance) GatherCandidates(stream WebRTCICEStream) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) cret = C.gst_webrtc_ice_gather_candidates(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(stream) var goret bool if cret != 0 { goret = true } return goret } // GetHTTPProxy wraps gst_webrtc_ice_get_http_proxy // // The function returns the following values: // // - goret string func (ice *WebRTCICEInstance) GetHTTPProxy() string { var carg0 *C.GstWebRTCICE // in, none, converted var cret *C.gchar // return, full, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) cret = C.gst_webrtc_ice_get_http_proxy(carg0) runtime.KeepAlive(ice) var goret string goret = C.GoString((*C.char)(unsafe.Pointer(cret))) defer C.free(unsafe.Pointer(cret)) return goret } // GetIsController wraps gst_webrtc_ice_get_is_controller // // The function returns the following values: // // - goret bool func (ice *WebRTCICEInstance) GetIsController() bool { var carg0 *C.GstWebRTCICE // in, none, converted var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) cret = C.gst_webrtc_ice_get_is_controller(carg0) runtime.KeepAlive(ice) var goret bool if cret != 0 { goret = true } return goret } // GetLocalCandidates wraps gst_webrtc_ice_get_local_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret []*WebRTCICECandidateStats func (ice *WebRTCICEInstance) GetLocalCandidates(stream WebRTCICEStream) []*WebRTCICECandidateStats { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var cret **C.GstWebRTCICECandidateStats // return, transfer: full, C Pointers: 2, Name: array[WebRTCICECandidateStats], scope: , array (inner: *typesystem.Record, zero-terminated) carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) cret = C.gst_webrtc_ice_get_local_candidates(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(stream) var goret []*WebRTCICECandidateStats _ = goret _ = cret panic("unimplemented conversion of []*WebRTCICECandidateStats (GstWebRTCICECandidateStats**)") return goret } // GetRemoteCandidates wraps gst_webrtc_ice_get_remote_candidates // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret []*WebRTCICECandidateStats func (ice *WebRTCICEInstance) GetRemoteCandidates(stream WebRTCICEStream) []*WebRTCICECandidateStats { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var cret **C.GstWebRTCICECandidateStats // return, transfer: full, C Pointers: 2, Name: array[WebRTCICECandidateStats], scope: , array (inner: *typesystem.Record, zero-terminated) carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) cret = C.gst_webrtc_ice_get_remote_candidates(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(stream) var goret []*WebRTCICECandidateStats _ = goret _ = cret panic("unimplemented conversion of []*WebRTCICECandidateStats (GstWebRTCICECandidateStats**)") return goret } // GetSelectedPair wraps gst_webrtc_ice_get_selected_pair // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - localStats *WebRTCICECandidateStats: A pointer to #GstWebRTCICECandidateStats for local candidate // - remoteStats *WebRTCICECandidateStats: pointer to #GstWebRTCICECandidateStats for remote candidate // - goret bool func (ice *WebRTCICEInstance) GetSelectedPair(stream WebRTCICEStream) (*WebRTCICECandidateStats, *WebRTCICECandidateStats, bool) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 *C.GstWebRTCICECandidateStats // out, full, converted var carg3 *C.GstWebRTCICECandidateStats // out, full, converted var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) cret = C.gst_webrtc_ice_get_selected_pair(carg0, carg1, &carg2, &carg3) runtime.KeepAlive(ice) runtime.KeepAlive(stream) var localStats *WebRTCICECandidateStats var remoteStats *WebRTCICECandidateStats var goret bool localStats = UnsafeWebRTCICECandidateStatsFromGlibFull(unsafe.Pointer(carg2)) remoteStats = UnsafeWebRTCICECandidateStatsFromGlibFull(unsafe.Pointer(carg3)) if cret != 0 { goret = true } return localStats, remoteStats, goret } // GetStunServer wraps gst_webrtc_ice_get_stun_server // // The function returns the following values: // // - goret string (nullable) func (ice *WebRTCICEInstance) GetStunServer() string { var carg0 *C.GstWebRTCICE // in, none, converted var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) cret = C.gst_webrtc_ice_get_stun_server(carg0) runtime.KeepAlive(ice) var goret string if cret != nil { goret = C.GoString((*C.char)(unsafe.Pointer(cret))) defer C.free(unsafe.Pointer(cret)) } return goret } // GetTurnServer wraps gst_webrtc_ice_get_turn_server // // The function returns the following values: // // - goret string (nullable) func (ice *WebRTCICEInstance) GetTurnServer() string { var carg0 *C.GstWebRTCICE // in, none, converted var cret *C.gchar // return, full, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) cret = C.gst_webrtc_ice_get_turn_server(carg0) runtime.KeepAlive(ice) var goret string if cret != nil { goret = C.GoString((*C.char)(unsafe.Pointer(cret))) defer C.free(unsafe.Pointer(cret)) } return goret } // SetForceRelay wraps gst_webrtc_ice_set_force_relay // // The function takes the following parameters: // // - forceRelay bool: TRUE to enable force relay func (ice *WebRTCICEInstance) SetForceRelay(forceRelay bool) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 C.gboolean // in carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) if forceRelay { carg1 = C.TRUE } C.gst_webrtc_ice_set_force_relay(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(forceRelay) } // SetHTTPProxy wraps gst_webrtc_ice_set_http_proxy // // The function takes the following parameters: // // - uri string: URI of the HTTP proxy of the form // http://[username:password@]hostname[:port][?alpn=<alpn>] // // Set HTTP Proxy to be used when connecting to TURN server. func (ice *WebRTCICEInstance) SetHTTPProxy(uri string) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.gchar // in, none, string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) C.gst_webrtc_ice_set_http_proxy(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(uri) } // SetIsController wraps gst_webrtc_ice_set_is_controller // // The function takes the following parameters: // // - controller bool: TRUE to set as controller func (ice *WebRTCICEInstance) SetIsController(controller bool) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 C.gboolean // in carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) if controller { carg1 = C.TRUE } C.gst_webrtc_ice_set_is_controller(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(controller) } // SetLocalCredentials wraps gst_webrtc_ice_set_local_credentials // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool func (ice *WebRTCICEInstance) SetLocalCredentials(stream WebRTCICEStream, ufrag string, pwd string) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(ufrag))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.gchar)(unsafe.Pointer(C.CString(pwd))) defer C.free(unsafe.Pointer(carg3)) cret = C.gst_webrtc_ice_set_local_credentials(carg0, carg1, carg2, carg3) runtime.KeepAlive(ice) runtime.KeepAlive(stream) runtime.KeepAlive(ufrag) runtime.KeepAlive(pwd) var goret bool if cret != 0 { goret = true } return goret } // SetOnIceCandidate wraps gst_webrtc_ice_set_on_ice_candidate // // The function takes the following parameters: // // - fn WebRTCICEOnCandidateFunc: The #GstWebRTCICEOnCandidateFunc callback function func (ice *WebRTCICEInstance) SetOnIceCandidate(fn WebRTCICEOnCandidateFunc) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 C.GstWebRTCICEOnCandidateFunc // callback, scope: notified, closure: carg2, destroy: carg3 var carg2 C.gpointer // implicit var carg3 C.GDestroyNotify // implicit carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICEOnCandidateFunc) carg2 = C.gpointer(userdata.Register(fn)) carg3 = (C.GDestroyNotify)((*[0]byte)(C.destroyUserdata)) C.gst_webrtc_ice_set_on_ice_candidate(carg0, carg1, carg2, carg3) runtime.KeepAlive(ice) runtime.KeepAlive(fn) } // SetRemoteCredentials wraps gst_webrtc_ice_set_remote_credentials // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool func (ice *WebRTCICEInstance) SetRemoteCredentials(stream WebRTCICEStream, ufrag string, pwd string) bool { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 *C.gchar // in, none, string var carg3 *C.gchar // in, none, string var cret C.gboolean // return carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg2 = (*C.gchar)(unsafe.Pointer(C.CString(ufrag))) defer C.free(unsafe.Pointer(carg2)) carg3 = (*C.gchar)(unsafe.Pointer(C.CString(pwd))) defer C.free(unsafe.Pointer(carg3)) cret = C.gst_webrtc_ice_set_remote_credentials(carg0, carg1, carg2, carg3) runtime.KeepAlive(ice) runtime.KeepAlive(stream) runtime.KeepAlive(ufrag) runtime.KeepAlive(pwd) var goret bool if cret != 0 { goret = true } return goret } // SetStunServer wraps gst_webrtc_ice_set_stun_server // // The function takes the following parameters: // // - uri string (nullable): URI of the STUN server func (ice *WebRTCICEInstance) SetStunServer(uri string) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) if uri != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) } C.gst_webrtc_ice_set_stun_server(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(uri) } // SetTos wraps gst_webrtc_ice_set_tos // // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - tos uint: ToS to be set func (ice *WebRTCICEInstance) SetTos(stream WebRTCICEStream, tos uint) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.GstWebRTCICEStream // in, none, converted var carg2 C.guint // in, none, casted carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) carg1 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg2 = C.guint(tos) C.gst_webrtc_ice_set_tos(carg0, carg1, carg2) runtime.KeepAlive(ice) runtime.KeepAlive(stream) runtime.KeepAlive(tos) } // SetTurnServer wraps gst_webrtc_ice_set_turn_server // // The function takes the following parameters: // // - uri string (nullable): URI of the TURN sever func (ice *WebRTCICEInstance) SetTurnServer(uri string) { var carg0 *C.GstWebRTCICE // in, none, converted var carg1 *C.gchar // in, none, string, nullable-string carg0 = (*C.GstWebRTCICE)(UnsafeWebRTCICEToGlibNone(ice)) if uri != "" { carg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri))) defer C.free(unsafe.Pointer(carg1)) } C.gst_webrtc_ice_set_turn_server(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(uri) } // EmitAddLocalIPAddress emits the "add-local-ip-address" signal // // Add a local IP address to use for ICE candidate gathering. If none // are supplied, they will be discovered automatically. Calling this signal // stops automatic ICE gathering. func (o *WebRTCICEInstance) EmitAddLocalIPAddress(arg0 string) bool { return o.Emit("add-local-ip-address", arg0).(bool) } // WebRTCICEOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type WebRTCICEOverrides[Instance WebRTCICE] struct { // gst.ObjectOverrides allows you to override virtual methods from the parent class gst.Object gst.ObjectOverrides[Instance] // AddCandidate allows you to override the implementation of the virtual method add_candidate. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - candidate string: The ICE candidate // - promise *gst.Promise (nullable): A #GstPromise for task notifications (Since: 1.24) AddCandidate func(Instance, WebRTCICEStream, string, *gst.Promise) // AddStream allows you to override the implementation of the virtual method add_stream. // The function takes the following parameters: // // - sessionId uint: The session id // // The function returns the following values: // // - goret WebRTCICEStream (nullable) AddStream func(Instance, uint) WebRTCICEStream // AddTurnServer allows you to override the implementation of the virtual method add_turn_server. // The function takes the following parameters: // // - uri string: URI of the TURN server // // The function returns the following values: // // - goret bool AddTurnServer func(Instance, string) bool // FindTransport allows you to override the implementation of the virtual method find_transport. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) FindTransport func(Instance, WebRTCICEStream, WebRTCICEComponent) WebRTCICETransport // GatherCandidates allows you to override the implementation of the virtual method gather_candidates. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - goret bool GatherCandidates func(Instance, WebRTCICEStream) bool // GetHTTPProxy allows you to override the implementation of the virtual method get_http_proxy. // The function returns the following values: // // - goret string GetHTTPProxy func(Instance) string // GetIsController allows you to override the implementation of the virtual method get_is_controller. // The function returns the following values: // // - goret bool GetIsController func(Instance) bool // GetSelectedPair allows you to override the implementation of the virtual method get_selected_pair. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // // The function returns the following values: // // - localStats *WebRTCICECandidateStats: A pointer to #GstWebRTCICECandidateStats for local candidate // - remoteStats *WebRTCICECandidateStats: pointer to #GstWebRTCICECandidateStats for remote candidate // - goret bool GetSelectedPair func(Instance, WebRTCICEStream) (*WebRTCICECandidateStats, *WebRTCICECandidateStats, bool) // GetStunServer allows you to override the implementation of the virtual method get_stun_server. // The function returns the following values: // // - goret string (nullable) GetStunServer func(Instance) string // GetTurnServer allows you to override the implementation of the virtual method get_turn_server. // The function returns the following values: // // - goret string (nullable) GetTurnServer func(Instance) string // SetForceRelay allows you to override the implementation of the virtual method set_force_relay. // The function takes the following parameters: // // - forceRelay bool: TRUE to enable force relay SetForceRelay func(Instance, bool) // SetHTTPProxy allows you to override the implementation of the virtual method set_http_proxy. // The function takes the following parameters: // // - uri string: URI of the HTTP proxy of the form // http://[username:password@]hostname[:port][?alpn=<alpn>] SetHTTPProxy func(Instance, string) // SetIsController allows you to override the implementation of the virtual method set_is_controller. // The function takes the following parameters: // // - controller bool: TRUE to set as controller SetIsController func(Instance, bool) // SetLocalCredentials allows you to override the implementation of the virtual method set_local_credentials. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool SetLocalCredentials func(Instance, WebRTCICEStream, string, string) bool // SetOnIceCandidate allows you to override the implementation of the virtual method set_on_ice_candidate. // The function takes the following parameters: // // - fn WebRTCICEOnCandidateFunc: The #GstWebRTCICEOnCandidateFunc callback function SetOnIceCandidate func(Instance, WebRTCICEOnCandidateFunc) // SetRemoteCredentials allows you to override the implementation of the virtual method set_remote_credentials. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - ufrag string: ICE username // - pwd string: ICE password // // The function returns the following values: // // - goret bool SetRemoteCredentials func(Instance, WebRTCICEStream, string, string) bool // SetStunServer allows you to override the implementation of the virtual method set_stun_server. // The function takes the following parameters: // // - uri string (nullable): URI of the STUN server SetStunServer func(Instance, string) // SetTos allows you to override the implementation of the virtual method set_tos. // The function takes the following parameters: // // - stream WebRTCICEStream: The #GstWebRTCICEStream // - tos uint: ToS to be set SetTos func(Instance, WebRTCICEStream, uint) // SetTurnServer allows you to override the implementation of the virtual method set_turn_server. // The function takes the following parameters: // // - uri string (nullable): URI of the TURN sever SetTurnServer func(Instance, string) } // UnsafeApplyWebRTCICEOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyWebRTCICEOverrides[Instance WebRTCICE](gclass unsafe.Pointer, overrides WebRTCICEOverrides[Instance]) { gst.UnsafeApplyObjectOverrides(gclass, overrides.ObjectOverrides) pclass := (*C.GstWebRTCICEClass)(gclass) if overrides.AddCandidate != nil { pclass.add_candidate = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_add_candidate) } if overrides.AddStream != nil { pclass.add_stream = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_add_stream) } if overrides.AddTurnServer != nil { pclass.add_turn_server = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_add_turn_server) } if overrides.FindTransport != nil { pclass.find_transport = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_find_transport) } if overrides.GatherCandidates != nil { pclass.gather_candidates = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_gather_candidates) } if overrides.GetHTTPProxy != nil { pclass.get_http_proxy = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_get_http_proxy) } if overrides.GetIsController != nil { pclass.get_is_controller = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_get_is_controller) } if overrides.GetSelectedPair != nil { pclass.get_selected_pair = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_get_selected_pair) } if overrides.GetStunServer != nil { pclass.get_stun_server = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_get_stun_server) } if overrides.GetTurnServer != nil { pclass.get_turn_server = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_get_turn_server) } if overrides.SetForceRelay != nil { pclass.set_force_relay = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_force_relay) } if overrides.SetHTTPProxy != nil { pclass.set_http_proxy = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_http_proxy) } if overrides.SetIsController != nil { pclass.set_is_controller = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_is_controller) } if overrides.SetLocalCredentials != nil { pclass.set_local_credentials = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_local_credentials) } if overrides.SetOnIceCandidate != nil { pclass.set_on_ice_candidate = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_on_ice_candidate) } if overrides.SetRemoteCredentials != nil { pclass.set_remote_credentials = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_remote_credentials) } if overrides.SetStunServer != nil { pclass.set_stun_server = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_stun_server) } if overrides.SetTos != nil { pclass.set_tos = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_tos) } if overrides.SetTurnServer != nil { pclass.set_turn_server = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICE_set_turn_server) } } // WebRTCICEStreamInstance is the instance type used by all types extending GstWebRTCICEStream. It is used internally by the bindings. Users should use the interface [WebRTCICEStream] instead. type WebRTCICEStreamInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCICEStream = (*WebRTCICEStreamInstance)(nil) // WebRTCICEStream wraps GstWebRTCICEStream type WebRTCICEStream interface { gst.Object upcastToGstWebRTCICEStream() *WebRTCICEStreamInstance // FindTransport wraps gst_webrtc_ice_stream_find_transport // // The function takes the following parameters: // // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) FindTransport(WebRTCICEComponent) WebRTCICETransport // GatherCandidates wraps gst_webrtc_ice_stream_gather_candidates // // The function returns the following values: // // - goret bool GatherCandidates() bool } func unsafeWrapWebRTCICEStream(base *gobject.ObjectInstance) *WebRTCICEStreamInstance { return &WebRTCICEStreamInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCICEStreamInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCICEStream(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCICEStreamFromGlibNone is used to convert raw GstWebRTCICEStream pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICEStreamFromGlibNone(c unsafe.Pointer) WebRTCICEStream { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCICEStream) } // UnsafeWebRTCICEStreamFromGlibFull is used to convert raw GstWebRTCICEStream pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICEStreamFromGlibFull(c unsafe.Pointer) WebRTCICEStream { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICEStream) } func (w *WebRTCICEStreamInstance) upcastToGstWebRTCICEStream() *WebRTCICEStreamInstance { return w } // UnsafeWebRTCICEStreamToGlibNone is used to convert the instance to it's C value GstWebRTCICEStream. This is used by the bindings internally. func UnsafeWebRTCICEStreamToGlibNone(c WebRTCICEStream) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCICEStreamToGlibFull is used to convert the instance to it's C value GstWebRTCICEStream, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCICEStreamToGlibFull(c WebRTCICEStream) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // FindTransport wraps gst_webrtc_ice_stream_find_transport // // The function takes the following parameters: // // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) func (stream *WebRTCICEStreamInstance) FindTransport(component WebRTCICEComponent) WebRTCICETransport { var carg0 *C.GstWebRTCICEStream // in, none, converted var carg1 C.GstWebRTCICEComponent // in, none, casted var cret *C.GstWebRTCICETransport // return, full, converted, nullable carg0 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(stream)) carg1 = C.GstWebRTCICEComponent(component) cret = C.gst_webrtc_ice_stream_find_transport(carg0, carg1) runtime.KeepAlive(stream) runtime.KeepAlive(component) var goret WebRTCICETransport if cret != nil { goret = UnsafeWebRTCICETransportFromGlibFull(unsafe.Pointer(cret)) } return goret } // GatherCandidates wraps gst_webrtc_ice_stream_gather_candidates // // The function returns the following values: // // - goret bool func (ice *WebRTCICEStreamInstance) GatherCandidates() bool { var carg0 *C.GstWebRTCICEStream // in, none, converted var cret C.gboolean // return carg0 = (*C.GstWebRTCICEStream)(UnsafeWebRTCICEStreamToGlibNone(ice)) cret = C.gst_webrtc_ice_stream_gather_candidates(carg0) runtime.KeepAlive(ice) var goret bool if cret != 0 { goret = true } return goret } // WebRTCICEStreamOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type WebRTCICEStreamOverrides[Instance WebRTCICEStream] struct { // gst.ObjectOverrides allows you to override virtual methods from the parent class gst.Object gst.ObjectOverrides[Instance] // FindTransport allows you to override the implementation of the virtual method find_transport. // The function takes the following parameters: // // - component WebRTCICEComponent: The #GstWebRTCICEComponent // // The function returns the following values: // // - goret WebRTCICETransport (nullable) FindTransport func(Instance, WebRTCICEComponent) WebRTCICETransport // GatherCandidates allows you to override the implementation of the virtual method gather_candidates. // The function returns the following values: // // - goret bool GatherCandidates func(Instance) bool } // UnsafeApplyWebRTCICEStreamOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyWebRTCICEStreamOverrides[Instance WebRTCICEStream](gclass unsafe.Pointer, overrides WebRTCICEStreamOverrides[Instance]) { gst.UnsafeApplyObjectOverrides(gclass, overrides.ObjectOverrides) pclass := (*C.GstWebRTCICEStreamClass)(gclass) if overrides.FindTransport != nil { pclass.find_transport = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICEStream_find_transport) } if overrides.GatherCandidates != nil { pclass.gather_candidates = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICEStream_gather_candidates) } } // WebRTCICETransportInstance is the instance type used by all types extending GstWebRTCICETransport. It is used internally by the bindings. Users should use the interface [WebRTCICETransport] instead. type WebRTCICETransportInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCICETransport = (*WebRTCICETransportInstance)(nil) // WebRTCICETransport wraps GstWebRTCICETransport type WebRTCICETransport interface { gst.Object upcastToGstWebRTCICETransport() *WebRTCICETransportInstance // ConnectionStateChange wraps gst_webrtc_ice_transport_connection_state_change // // The function takes the following parameters: // // - newState WebRTCICEConnectionState ConnectionStateChange(WebRTCICEConnectionState) // GatheringStateChange wraps gst_webrtc_ice_transport_gathering_state_change // // The function takes the following parameters: // // - newState WebRTCICEGatheringState GatheringStateChange(WebRTCICEGatheringState) // NewCandidate wraps gst_webrtc_ice_transport_new_candidate // // The function takes the following parameters: // // - streamId uint // - component WebRTCICEComponent // - attr string NewCandidate(uint, WebRTCICEComponent, string) // SelectedPairChange wraps gst_webrtc_ice_transport_selected_pair_change SelectedPairChange() // ConnectOnNewCandidate connects the provided callback to the "on-new-candidate" signal ConnectOnNewCandidate(func(WebRTCICETransport, string)) gobject.SignalHandle // ConnectOnSelectedCandidatePairChange connects the provided callback to the "on-selected-candidate-pair-change" signal ConnectOnSelectedCandidatePairChange(func(WebRTCICETransport)) gobject.SignalHandle } func unsafeWrapWebRTCICETransport(base *gobject.ObjectInstance) *WebRTCICETransportInstance { return &WebRTCICETransportInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCICETransportInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCICETransport(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCICETransportFromGlibNone is used to convert raw GstWebRTCICETransport pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICETransportFromGlibNone(c unsafe.Pointer) WebRTCICETransport { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCICETransport) } // UnsafeWebRTCICETransportFromGlibFull is used to convert raw GstWebRTCICETransport pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCICETransportFromGlibFull(c unsafe.Pointer) WebRTCICETransport { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCICETransport) } func (w *WebRTCICETransportInstance) upcastToGstWebRTCICETransport() *WebRTCICETransportInstance { return w } // UnsafeWebRTCICETransportToGlibNone is used to convert the instance to it's C value GstWebRTCICETransport. This is used by the bindings internally. func UnsafeWebRTCICETransportToGlibNone(c WebRTCICETransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCICETransportToGlibFull is used to convert the instance to it's C value GstWebRTCICETransport, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCICETransportToGlibFull(c WebRTCICETransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // ConnectionStateChange wraps gst_webrtc_ice_transport_connection_state_change // // The function takes the following parameters: // // - newState WebRTCICEConnectionState func (ice *WebRTCICETransportInstance) ConnectionStateChange(newState WebRTCICEConnectionState) { var carg0 *C.GstWebRTCICETransport // in, none, converted var carg1 C.GstWebRTCICEConnectionState // in, none, casted carg0 = (*C.GstWebRTCICETransport)(UnsafeWebRTCICETransportToGlibNone(ice)) carg1 = C.GstWebRTCICEConnectionState(newState) C.gst_webrtc_ice_transport_connection_state_change(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(newState) } // GatheringStateChange wraps gst_webrtc_ice_transport_gathering_state_change // // The function takes the following parameters: // // - newState WebRTCICEGatheringState func (ice *WebRTCICETransportInstance) GatheringStateChange(newState WebRTCICEGatheringState) { var carg0 *C.GstWebRTCICETransport // in, none, converted var carg1 C.GstWebRTCICEGatheringState // in, none, casted carg0 = (*C.GstWebRTCICETransport)(UnsafeWebRTCICETransportToGlibNone(ice)) carg1 = C.GstWebRTCICEGatheringState(newState) C.gst_webrtc_ice_transport_gathering_state_change(carg0, carg1) runtime.KeepAlive(ice) runtime.KeepAlive(newState) } // NewCandidate wraps gst_webrtc_ice_transport_new_candidate // // The function takes the following parameters: // // - streamId uint // - component WebRTCICEComponent // - attr string func (ice *WebRTCICETransportInstance) NewCandidate(streamId uint, component WebRTCICEComponent, attr string) { var carg0 *C.GstWebRTCICETransport // in, none, converted var carg1 C.guint // in, none, casted var carg2 C.GstWebRTCICEComponent // in, none, casted var carg3 *C.gchar // in, none, string carg0 = (*C.GstWebRTCICETransport)(UnsafeWebRTCICETransportToGlibNone(ice)) carg1 = C.guint(streamId) carg2 = C.GstWebRTCICEComponent(component) carg3 = (*C.gchar)(unsafe.Pointer(C.CString(attr))) defer C.free(unsafe.Pointer(carg3)) C.gst_webrtc_ice_transport_new_candidate(carg0, carg1, carg2, carg3) runtime.KeepAlive(ice) runtime.KeepAlive(streamId) runtime.KeepAlive(component) runtime.KeepAlive(attr) } // SelectedPairChange wraps gst_webrtc_ice_transport_selected_pair_change func (ice *WebRTCICETransportInstance) SelectedPairChange() { var carg0 *C.GstWebRTCICETransport // in, none, converted carg0 = (*C.GstWebRTCICETransport)(UnsafeWebRTCICETransportToGlibNone(ice)) C.gst_webrtc_ice_transport_selected_pair_change(carg0) runtime.KeepAlive(ice) } // ConnectOnNewCandidate connects the provided callback to the "on-new-candidate" signal func (o *WebRTCICETransportInstance) ConnectOnNewCandidate(fn func(WebRTCICETransport, string)) gobject.SignalHandle { return o.Connect("on-new-candidate", fn) } // ConnectOnSelectedCandidatePairChange connects the provided callback to the "on-selected-candidate-pair-change" signal func (o *WebRTCICETransportInstance) ConnectOnSelectedCandidatePairChange(fn func(WebRTCICETransport)) gobject.SignalHandle { return o.Connect("on-selected-candidate-pair-change", fn) } // WebRTCICETransportOverrides is the struct used to override the default implementation of virtual methods. // it is generic over the extending instance type. type WebRTCICETransportOverrides[Instance WebRTCICETransport] struct { // gst.ObjectOverrides allows you to override virtual methods from the parent class gst.Object gst.ObjectOverrides[Instance] // GatherCandidates allows you to override the implementation of the virtual method gather_candidates. // The function returns the following values: // // - goret bool GatherCandidates func(Instance) bool } // UnsafeApplyWebRTCICETransportOverrides applies the overrides to init the gclass by setting the trampoline functions. // This is used by the bindings internally and only exported for visibility to other bindings code. func UnsafeApplyWebRTCICETransportOverrides[Instance WebRTCICETransport](gclass unsafe.Pointer, overrides WebRTCICETransportOverrides[Instance]) { gst.UnsafeApplyObjectOverrides(gclass, overrides.ObjectOverrides) pclass := (*C.GstWebRTCICETransportClass)(gclass) if overrides.GatherCandidates != nil { pclass.gather_candidates = (*[0]byte)(C._gotk4_gstwebrtc1_WebRTCICETransport_gather_candidates) } } // WebRTCRTPReceiverInstance is the instance type used by all types extending GstWebRTCRTPReceiver. It is used internally by the bindings. Users should use the interface [WebRTCRTPReceiver] instead. type WebRTCRTPReceiverInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCRTPReceiver = (*WebRTCRTPReceiverInstance)(nil) // WebRTCRTPReceiver wraps GstWebRTCRTPReceiver // // An object to track the receiving aspect of the stream // // Mostly matches the WebRTC RTCRtpReceiver interface. type WebRTCRTPReceiver interface { gst.Object upcastToGstWebRTCRTPReceiver() *WebRTCRTPReceiverInstance } func unsafeWrapWebRTCRTPReceiver(base *gobject.ObjectInstance) *WebRTCRTPReceiverInstance { return &WebRTCRTPReceiverInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCRTPReceiverInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCRTPReceiver(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCRTPReceiverFromGlibNone is used to convert raw GstWebRTCRTPReceiver pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverFromGlibNone(c unsafe.Pointer) WebRTCRTPReceiver { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCRTPReceiver) } // UnsafeWebRTCRTPReceiverFromGlibFull is used to convert raw GstWebRTCRTPReceiver pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverFromGlibFull(c unsafe.Pointer) WebRTCRTPReceiver { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPReceiver) } func (w *WebRTCRTPReceiverInstance) upcastToGstWebRTCRTPReceiver() *WebRTCRTPReceiverInstance { return w } // UnsafeWebRTCRTPReceiverToGlibNone is used to convert the instance to it's C value GstWebRTCRTPReceiver. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverToGlibNone(c WebRTCRTPReceiver) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCRTPReceiverToGlibFull is used to convert the instance to it's C value GstWebRTCRTPReceiver, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverToGlibFull(c WebRTCRTPReceiver) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // WebRTCRTPSenderInstance is the instance type used by all types extending GstWebRTCRTPSender. It is used internally by the bindings. Users should use the interface [WebRTCRTPSender] instead. type WebRTCRTPSenderInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCRTPSender = (*WebRTCRTPSenderInstance)(nil) // WebRTCRTPSender wraps GstWebRTCRTPSender // // An object to track the sending aspect of the stream // // Mostly matches the WebRTC RTCRtpSender interface. type WebRTCRTPSender interface { gst.Object upcastToGstWebRTCRTPSender() *WebRTCRTPSenderInstance // SetPriority wraps gst_webrtc_rtp_sender_set_priority // // The function takes the following parameters: // // - priority WebRTCPriorityType: The priority of this sender // // 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. SetPriority(WebRTCPriorityType) } func unsafeWrapWebRTCRTPSender(base *gobject.ObjectInstance) *WebRTCRTPSenderInstance { return &WebRTCRTPSenderInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCRTPSenderInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCRTPSender(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCRTPSenderFromGlibNone is used to convert raw GstWebRTCRTPSender pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPSenderFromGlibNone(c unsafe.Pointer) WebRTCRTPSender { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCRTPSender) } // UnsafeWebRTCRTPSenderFromGlibFull is used to convert raw GstWebRTCRTPSender pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPSenderFromGlibFull(c unsafe.Pointer) WebRTCRTPSender { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPSender) } func (w *WebRTCRTPSenderInstance) upcastToGstWebRTCRTPSender() *WebRTCRTPSenderInstance { return w } // UnsafeWebRTCRTPSenderToGlibNone is used to convert the instance to it's C value GstWebRTCRTPSender. This is used by the bindings internally. func UnsafeWebRTCRTPSenderToGlibNone(c WebRTCRTPSender) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCRTPSenderToGlibFull is used to convert the instance to it's C value GstWebRTCRTPSender, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPSenderToGlibFull(c WebRTCRTPSender) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // SetPriority wraps gst_webrtc_rtp_sender_set_priority // // The function takes the following parameters: // // - priority WebRTCPriorityType: The priority of this sender // // 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. func (sender *WebRTCRTPSenderInstance) SetPriority(priority WebRTCPriorityType) { var carg0 *C.GstWebRTCRTPSender // in, none, converted var carg1 C.GstWebRTCPriorityType // in, none, casted carg0 = (*C.GstWebRTCRTPSender)(UnsafeWebRTCRTPSenderToGlibNone(sender)) carg1 = C.GstWebRTCPriorityType(priority) C.gst_webrtc_rtp_sender_set_priority(carg0, carg1) runtime.KeepAlive(sender) runtime.KeepAlive(priority) } // WebRTCRTPTransceiverInstance is the instance type used by all types extending GstWebRTCRTPTransceiver. It is used internally by the bindings. Users should use the interface [WebRTCRTPTransceiver] instead. type WebRTCRTPTransceiverInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCRTPTransceiver = (*WebRTCRTPTransceiverInstance)(nil) // WebRTCRTPTransceiver wraps GstWebRTCRTPTransceiver // // Mostly matches the WebRTC RTCRtpTransceiver interface. type WebRTCRTPTransceiver interface { gst.Object upcastToGstWebRTCRTPTransceiver() *WebRTCRTPTransceiverInstance } func unsafeWrapWebRTCRTPTransceiver(base *gobject.ObjectInstance) *WebRTCRTPTransceiverInstance { return &WebRTCRTPTransceiverInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCRTPTransceiverInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCRTPTransceiver(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCRTPTransceiverFromGlibNone is used to convert raw GstWebRTCRTPTransceiver pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverFromGlibNone(c unsafe.Pointer) WebRTCRTPTransceiver { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCRTPTransceiver) } // UnsafeWebRTCRTPTransceiverFromGlibFull is used to convert raw GstWebRTCRTPTransceiver pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverFromGlibFull(c unsafe.Pointer) WebRTCRTPTransceiver { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCRTPTransceiver) } func (w *WebRTCRTPTransceiverInstance) upcastToGstWebRTCRTPTransceiver() *WebRTCRTPTransceiverInstance { return w } // UnsafeWebRTCRTPTransceiverToGlibNone is used to convert the instance to it's C value GstWebRTCRTPTransceiver. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverToGlibNone(c WebRTCRTPTransceiver) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCRTPTransceiverToGlibFull is used to convert the instance to it's C value GstWebRTCRTPTransceiver, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverToGlibFull(c WebRTCRTPTransceiver) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // WebRTCSCTPTransportInstance is the instance type used by all types extending GstWebRTCSCTPTransport. It is used internally by the bindings. Users should use the interface [WebRTCSCTPTransport] instead. type WebRTCSCTPTransportInstance struct { _ [0]func() // equal guard gst.ObjectInstance } var _ WebRTCSCTPTransport = (*WebRTCSCTPTransportInstance)(nil) // WebRTCSCTPTransport wraps GstWebRTCSCTPTransport type WebRTCSCTPTransport interface { gst.Object upcastToGstWebRTCSCTPTransport() *WebRTCSCTPTransportInstance } func unsafeWrapWebRTCSCTPTransport(base *gobject.ObjectInstance) *WebRTCSCTPTransportInstance { return &WebRTCSCTPTransportInstance{ ObjectInstance: gst.ObjectInstance{ InitiallyUnownedInstance: gobject.InitiallyUnownedInstance{ ObjectInstance: *base, }, }, } } func marshalWebRTCSCTPTransportInstance(p unsafe.Pointer) (any, error) { return unsafeWrapWebRTCSCTPTransport(gobject.ValueFromNative(p).Object()), nil } // UnsafeWebRTCSCTPTransportFromGlibNone is used to convert raw GstWebRTCSCTPTransport pointers to go while taking a reference and attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportFromGlibNone(c unsafe.Pointer) WebRTCSCTPTransport { return gobject.UnsafeObjectFromGlibNone(c).(WebRTCSCTPTransport) } // UnsafeWebRTCSCTPTransportFromGlibFull is used to convert raw GstWebRTCSCTPTransport pointers to go while attaching a finalizer. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportFromGlibFull(c unsafe.Pointer) WebRTCSCTPTransport { return gobject.UnsafeObjectFromGlibFull(c).(WebRTCSCTPTransport) } func (w *WebRTCSCTPTransportInstance) upcastToGstWebRTCSCTPTransport() *WebRTCSCTPTransportInstance { return w } // UnsafeWebRTCSCTPTransportToGlibNone is used to convert the instance to it's C value GstWebRTCSCTPTransport. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportToGlibNone(c WebRTCSCTPTransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibNone(c) } // UnsafeWebRTCSCTPTransportToGlibFull is used to convert the instance to it's C value GstWebRTCSCTPTransport, while removeing the finalizer. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportToGlibFull(c WebRTCSCTPTransport) unsafe.Pointer { return gobject.UnsafeObjectToGlibFull(c) } // WebRTCDTLSTransportClass wraps GstWebRTCDTLSTransportClass // // WebRTCDTLSTransportClass is the type struct for [WebRTCDTLSTransport] type WebRTCDTLSTransportClass struct { *webRTCDTLSTransportClass } // webRTCDTLSTransportClass is the struct that's finalized type webRTCDTLSTransportClass struct { native *C.GstWebRTCDTLSTransportClass } // UnsafeWebRTCDTLSTransportClassFromGlibBorrow is used to convert raw C.GstWebRTCDTLSTransportClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportClassFromGlibBorrow(p unsafe.Pointer) *WebRTCDTLSTransportClass { return &WebRTCDTLSTransportClass{&webRTCDTLSTransportClass{(*C.GstWebRTCDTLSTransportClass)(p)}} } // UnsafeWebRTCDTLSTransportClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCDTLSTransportClass] is expected to work anymore. func UnsafeWebRTCDTLSTransportClassFree(w *WebRTCDTLSTransportClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCDTLSTransportClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCDTLSTransportClassToGlibNone(w *WebRTCDTLSTransportClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCDTLSTransportClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCDTLSTransportClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCDTLSTransportClass) {}, w) return parent } // WebRTCDataChannelClass wraps GstWebRTCDataChannelClass // // WebRTCDataChannelClass is the type struct for [WebRTCDataChannel] type WebRTCDataChannelClass struct { *webRTCDataChannelClass } // webRTCDataChannelClass is the struct that's finalized type webRTCDataChannelClass struct { native *C.GstWebRTCDataChannelClass } // UnsafeWebRTCDataChannelClassFromGlibBorrow is used to convert raw C.GstWebRTCDataChannelClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCDataChannelClassFromGlibBorrow(p unsafe.Pointer) *WebRTCDataChannelClass { return &WebRTCDataChannelClass{&webRTCDataChannelClass{(*C.GstWebRTCDataChannelClass)(p)}} } // UnsafeWebRTCDataChannelClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCDataChannelClass] is expected to work anymore. func UnsafeWebRTCDataChannelClassFree(w *WebRTCDataChannelClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCDataChannelClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCDataChannelClassToGlibNone(w *WebRTCDataChannelClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCDataChannelClass) ParentClass() *gobject.ObjectClass { parent := gobject.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCDataChannelClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCDataChannelClass) {}, w) return parent } // WebRTCICECandidateStats wraps GstWebRTCICECandidateStats type WebRTCICECandidateStats struct { *webRTCICECandidateStats } // webRTCICECandidateStats is the struct that's finalized type webRTCICECandidateStats struct { native *C.GstWebRTCICECandidateStats } var _ gobject.GoValueInitializer = (*WebRTCICECandidateStats)(nil) func marshalWebRTCICECandidateStats(p unsafe.Pointer) (interface{}, error) { b := gobject.ValueFromNative(p).Boxed() return UnsafeWebRTCICECandidateStatsFromGlibBorrow(b), nil } func (r *WebRTCICECandidateStats) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCICECandidateStats) v.SetBoxed(unsafe.Pointer(r.native)) } // UnsafeWebRTCICECandidateStatsFromGlibBorrow is used to convert raw C.GstWebRTCICECandidateStats pointers to go. This is used by the bindings internally. func UnsafeWebRTCICECandidateStatsFromGlibBorrow(p unsafe.Pointer) *WebRTCICECandidateStats { return &WebRTCICECandidateStats{&webRTCICECandidateStats{(*C.GstWebRTCICECandidateStats)(p)}} } // UnsafeWebRTCICECandidateStatsFromGlibNone is used to convert raw C.GstWebRTCICECandidateStats pointers to go without transferring ownership. This is used by the bindings internally. func UnsafeWebRTCICECandidateStatsFromGlibNone(p unsafe.Pointer) *WebRTCICECandidateStats { // FIXME: this has no ref function, what should we do here? wrapped := UnsafeWebRTCICECandidateStatsFromGlibBorrow(p) runtime.SetFinalizer( wrapped.webRTCICECandidateStats, func (intern *webRTCICECandidateStats) { C.gst_webrtc_ice_candidate_stats_free(intern.native) }, ) return wrapped } // UnsafeWebRTCICECandidateStatsFromGlibFull is used to convert raw C.GstWebRTCICECandidateStats pointers to go while taking ownership. This is used by the bindings internally. func UnsafeWebRTCICECandidateStatsFromGlibFull(p unsafe.Pointer) *WebRTCICECandidateStats { wrapped := UnsafeWebRTCICECandidateStatsFromGlibBorrow(p) runtime.SetFinalizer( wrapped.webRTCICECandidateStats, func (intern *webRTCICECandidateStats) { C.gst_webrtc_ice_candidate_stats_free(intern.native) }, ) return wrapped } // UnsafeWebRTCICECandidateStatsFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCICECandidateStats] is expected to work anymore. func UnsafeWebRTCICECandidateStatsFree(w *WebRTCICECandidateStats) { C.gst_webrtc_ice_candidate_stats_free(w.native) } // UnsafeWebRTCICECandidateStatsToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCICECandidateStatsToGlibNone(w *WebRTCICECandidateStats) unsafe.Pointer { return unsafe.Pointer(w.native) } // UnsafeWebRTCICECandidateStatsToGlibFull returns the underlying C pointer and gives up ownership. // This is used by the bindings internally. func UnsafeWebRTCICECandidateStatsToGlibFull(w *WebRTCICECandidateStats) unsafe.Pointer { runtime.SetFinalizer(w.webRTCICECandidateStats, nil) _p := unsafe.Pointer(w.native) w.native = nil // WebRTCICECandidateStats is invalid from here on return _p } // Copy wraps gst_webrtc_ice_candidate_stats_copy // // The function returns the following values: // // - goret *WebRTCICECandidateStats func (stats *WebRTCICECandidateStats) Copy() *WebRTCICECandidateStats { var carg0 *C.GstWebRTCICECandidateStats // in, none, converted var cret *C.GstWebRTCICECandidateStats // return, full, converted carg0 = (*C.GstWebRTCICECandidateStats)(UnsafeWebRTCICECandidateStatsToGlibNone(stats)) cret = C.gst_webrtc_ice_candidate_stats_copy(carg0) runtime.KeepAlive(stats) var goret *WebRTCICECandidateStats goret = UnsafeWebRTCICECandidateStatsFromGlibFull(unsafe.Pointer(cret)) return goret } // WebRTCICEClass wraps GstWebRTCICEClass // // WebRTCICEClass is the type struct for [WebRTCICE] type WebRTCICEClass struct { *webRTCICEClass } // webRTCICEClass is the struct that's finalized type webRTCICEClass struct { native *C.GstWebRTCICEClass } // UnsafeWebRTCICEClassFromGlibBorrow is used to convert raw C.GstWebRTCICEClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCICEClassFromGlibBorrow(p unsafe.Pointer) *WebRTCICEClass { return &WebRTCICEClass{&webRTCICEClass{(*C.GstWebRTCICEClass)(p)}} } // UnsafeWebRTCICEClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCICEClass] is expected to work anymore. func UnsafeWebRTCICEClassFree(w *WebRTCICEClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCICEClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCICEClassToGlibNone(w *WebRTCICEClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCICEClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCICEClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCICEClass) {}, w) return parent } // WebRTCICEStreamClass wraps GstWebRTCICEStreamClass // // WebRTCICEStreamClass is the type struct for [WebRTCICEStream] type WebRTCICEStreamClass struct { *webRTCICEStreamClass } // webRTCICEStreamClass is the struct that's finalized type webRTCICEStreamClass struct { native *C.GstWebRTCICEStreamClass } // UnsafeWebRTCICEStreamClassFromGlibBorrow is used to convert raw C.GstWebRTCICEStreamClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCICEStreamClassFromGlibBorrow(p unsafe.Pointer) *WebRTCICEStreamClass { return &WebRTCICEStreamClass{&webRTCICEStreamClass{(*C.GstWebRTCICEStreamClass)(p)}} } // UnsafeWebRTCICEStreamClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCICEStreamClass] is expected to work anymore. func UnsafeWebRTCICEStreamClassFree(w *WebRTCICEStreamClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCICEStreamClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCICEStreamClassToGlibNone(w *WebRTCICEStreamClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCICEStreamClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCICEStreamClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCICEStreamClass) {}, w) return parent } // WebRTCICETransportClass wraps GstWebRTCICETransportClass // // WebRTCICETransportClass is the type struct for [WebRTCICETransport] type WebRTCICETransportClass struct { *webRTCICETransportClass } // webRTCICETransportClass is the struct that's finalized type webRTCICETransportClass struct { native *C.GstWebRTCICETransportClass } // UnsafeWebRTCICETransportClassFromGlibBorrow is used to convert raw C.GstWebRTCICETransportClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCICETransportClassFromGlibBorrow(p unsafe.Pointer) *WebRTCICETransportClass { return &WebRTCICETransportClass{&webRTCICETransportClass{(*C.GstWebRTCICETransportClass)(p)}} } // UnsafeWebRTCICETransportClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCICETransportClass] is expected to work anymore. func UnsafeWebRTCICETransportClassFree(w *WebRTCICETransportClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCICETransportClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCICETransportClassToGlibNone(w *WebRTCICETransportClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCICETransportClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCICETransportClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCICETransportClass) {}, w) return parent } // WebRTCRTPReceiverClass wraps GstWebRTCRTPReceiverClass // // WebRTCRTPReceiverClass is the type struct for [WebRTCRTPReceiver] type WebRTCRTPReceiverClass struct { *webRTCRTPReceiverClass } // webRTCRTPReceiverClass is the struct that's finalized type webRTCRTPReceiverClass struct { native *C.GstWebRTCRTPReceiverClass } // UnsafeWebRTCRTPReceiverClassFromGlibBorrow is used to convert raw C.GstWebRTCRTPReceiverClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverClassFromGlibBorrow(p unsafe.Pointer) *WebRTCRTPReceiverClass { return &WebRTCRTPReceiverClass{&webRTCRTPReceiverClass{(*C.GstWebRTCRTPReceiverClass)(p)}} } // UnsafeWebRTCRTPReceiverClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCRTPReceiverClass] is expected to work anymore. func UnsafeWebRTCRTPReceiverClassFree(w *WebRTCRTPReceiverClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCRTPReceiverClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCRTPReceiverClassToGlibNone(w *WebRTCRTPReceiverClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCRTPReceiverClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCRTPReceiverClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCRTPReceiverClass) {}, w) return parent } // WebRTCRTPSenderClass wraps GstWebRTCRTPSenderClass // // WebRTCRTPSenderClass is the type struct for [WebRTCRTPSender] type WebRTCRTPSenderClass struct { *webRTCRTPSenderClass } // webRTCRTPSenderClass is the struct that's finalized type webRTCRTPSenderClass struct { native *C.GstWebRTCRTPSenderClass } // UnsafeWebRTCRTPSenderClassFromGlibBorrow is used to convert raw C.GstWebRTCRTPSenderClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCRTPSenderClassFromGlibBorrow(p unsafe.Pointer) *WebRTCRTPSenderClass { return &WebRTCRTPSenderClass{&webRTCRTPSenderClass{(*C.GstWebRTCRTPSenderClass)(p)}} } // UnsafeWebRTCRTPSenderClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCRTPSenderClass] is expected to work anymore. func UnsafeWebRTCRTPSenderClassFree(w *WebRTCRTPSenderClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCRTPSenderClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCRTPSenderClassToGlibNone(w *WebRTCRTPSenderClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCRTPSenderClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCRTPSenderClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCRTPSenderClass) {}, w) return parent } // WebRTCRTPTransceiverClass wraps GstWebRTCRTPTransceiverClass // // WebRTCRTPTransceiverClass is the type struct for [WebRTCRTPTransceiver] type WebRTCRTPTransceiverClass struct { *webRTCRTPTransceiverClass } // webRTCRTPTransceiverClass is the struct that's finalized type webRTCRTPTransceiverClass struct { native *C.GstWebRTCRTPTransceiverClass } // UnsafeWebRTCRTPTransceiverClassFromGlibBorrow is used to convert raw C.GstWebRTCRTPTransceiverClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverClassFromGlibBorrow(p unsafe.Pointer) *WebRTCRTPTransceiverClass { return &WebRTCRTPTransceiverClass{&webRTCRTPTransceiverClass{(*C.GstWebRTCRTPTransceiverClass)(p)}} } // UnsafeWebRTCRTPTransceiverClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCRTPTransceiverClass] is expected to work anymore. func UnsafeWebRTCRTPTransceiverClassFree(w *WebRTCRTPTransceiverClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCRTPTransceiverClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCRTPTransceiverClassToGlibNone(w *WebRTCRTPTransceiverClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCRTPTransceiverClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCRTPTransceiverClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCRTPTransceiverClass) {}, w) return parent } // WebRTCSCTPTransportClass wraps GstWebRTCSCTPTransportClass // // WebRTCSCTPTransportClass is the type struct for [WebRTCSCTPTransport] type WebRTCSCTPTransportClass struct { *webRTCSCTPTransportClass } // webRTCSCTPTransportClass is the struct that's finalized type webRTCSCTPTransportClass struct { native *C.GstWebRTCSCTPTransportClass } // UnsafeWebRTCSCTPTransportClassFromGlibBorrow is used to convert raw C.GstWebRTCSCTPTransportClass pointers to go. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportClassFromGlibBorrow(p unsafe.Pointer) *WebRTCSCTPTransportClass { return &WebRTCSCTPTransportClass{&webRTCSCTPTransportClass{(*C.GstWebRTCSCTPTransportClass)(p)}} } // UnsafeWebRTCSCTPTransportClassFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCSCTPTransportClass] is expected to work anymore. func UnsafeWebRTCSCTPTransportClassFree(w *WebRTCSCTPTransportClass) { C.free(unsafe.Pointer(w.native)) } // UnsafeWebRTCSCTPTransportClassToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCSCTPTransportClassToGlibNone(w *WebRTCSCTPTransportClass) unsafe.Pointer { return unsafe.Pointer(w.native) } // ParentClass returns the type struct of the parent class of this type struct. // This essentially casts the underlying c pointer. func (w *WebRTCSCTPTransportClass) ParentClass() *gst.ObjectClass { parent := gst.UnsafeObjectClassFromGlibBorrow(UnsafeWebRTCSCTPTransportClassToGlibNone(w)) // attach a cleanup to keep the instance alive as long as the parent is referenced runtime.AddCleanup(parent, func(_ *WebRTCSCTPTransportClass) {}, w) return parent } // WebRTCSessionDescription wraps GstWebRTCSessionDescription // // See <https://www.w3.org/TR/webrtc/#rtcsessiondescription-class> type WebRTCSessionDescription struct { *webRTCSessionDescription } // webRTCSessionDescription is the struct that's finalized type webRTCSessionDescription struct { native *C.GstWebRTCSessionDescription } var _ gobject.GoValueInitializer = (*WebRTCSessionDescription)(nil) func marshalWebRTCSessionDescription(p unsafe.Pointer) (interface{}, error) { b := gobject.ValueFromNative(p).Boxed() return UnsafeWebRTCSessionDescriptionFromGlibBorrow(b), nil } func (r *WebRTCSessionDescription) InitGoValue(v *gobject.Value) { v.Init(TypeWebRTCSessionDescription) v.SetBoxed(unsafe.Pointer(r.native)) } // UnsafeWebRTCSessionDescriptionFromGlibBorrow is used to convert raw C.GstWebRTCSessionDescription pointers to go. This is used by the bindings internally. func UnsafeWebRTCSessionDescriptionFromGlibBorrow(p unsafe.Pointer) *WebRTCSessionDescription { return &WebRTCSessionDescription{&webRTCSessionDescription{(*C.GstWebRTCSessionDescription)(p)}} } // UnsafeWebRTCSessionDescriptionFromGlibNone is used to convert raw C.GstWebRTCSessionDescription pointers to go without transferring ownership. This is used by the bindings internally. func UnsafeWebRTCSessionDescriptionFromGlibNone(p unsafe.Pointer) *WebRTCSessionDescription { // FIXME: this has no ref function, what should we do here? wrapped := UnsafeWebRTCSessionDescriptionFromGlibBorrow(p) runtime.SetFinalizer( wrapped.webRTCSessionDescription, func (intern *webRTCSessionDescription) { C.gst_webrtc_session_description_free(intern.native) }, ) return wrapped } // UnsafeWebRTCSessionDescriptionFromGlibFull is used to convert raw C.GstWebRTCSessionDescription pointers to go while taking ownership. This is used by the bindings internally. func UnsafeWebRTCSessionDescriptionFromGlibFull(p unsafe.Pointer) *WebRTCSessionDescription { wrapped := UnsafeWebRTCSessionDescriptionFromGlibBorrow(p) runtime.SetFinalizer( wrapped.webRTCSessionDescription, func (intern *webRTCSessionDescription) { C.gst_webrtc_session_description_free(intern.native) }, ) return wrapped } // UnsafeWebRTCSessionDescriptionFree unrefs/frees the underlying resource. This is used by the bindings internally. // // After this is called, no other method on [WebRTCSessionDescription] is expected to work anymore. func UnsafeWebRTCSessionDescriptionFree(w *WebRTCSessionDescription) { C.gst_webrtc_session_description_free(w.native) } // UnsafeWebRTCSessionDescriptionToGlibNone returns the underlying C pointer. This is used by the bindings internally. func UnsafeWebRTCSessionDescriptionToGlibNone(w *WebRTCSessionDescription) unsafe.Pointer { return unsafe.Pointer(w.native) } // UnsafeWebRTCSessionDescriptionToGlibFull returns the underlying C pointer and gives up ownership. // This is used by the bindings internally. func UnsafeWebRTCSessionDescriptionToGlibFull(w *WebRTCSessionDescription) unsafe.Pointer { runtime.SetFinalizer(w.webRTCSessionDescription, nil) _p := unsafe.Pointer(w.native) w.native = nil // WebRTCSessionDescription is invalid from here on return _p } // NewWebRTCSessionDescription wraps gst_webrtc_session_description_new // // The function takes the following parameters: // // - typ WebRTCSDPType: a #GstWebRTCSDPType // - sdp *gstsdp.SDPMessage: a #GstSDPMessage // // The function returns the following values: // // - goret *WebRTCSessionDescription func NewWebRTCSessionDescription(typ WebRTCSDPType, sdp *gstsdp.SDPMessage) *WebRTCSessionDescription { var carg1 C.GstWebRTCSDPType // in, none, casted var carg2 *C.GstSDPMessage // in, full, converted var cret *C.GstWebRTCSessionDescription // return, full, converted carg1 = C.GstWebRTCSDPType(typ) carg2 = (*C.GstSDPMessage)(gstsdp.UnsafeSDPMessageToGlibFull(sdp)) cret = C.gst_webrtc_session_description_new(carg1, carg2) runtime.KeepAlive(typ) runtime.KeepAlive(sdp) var goret *WebRTCSessionDescription goret = UnsafeWebRTCSessionDescriptionFromGlibFull(unsafe.Pointer(cret)) return goret } // Copy wraps gst_webrtc_session_description_copy // // The function returns the following values: // // - goret *WebRTCSessionDescription func (src *WebRTCSessionDescription) Copy() *WebRTCSessionDescription { var carg0 *C.GstWebRTCSessionDescription // in, none, converted var cret *C.GstWebRTCSessionDescription // return, full, converted carg0 = (*C.GstWebRTCSessionDescription)(UnsafeWebRTCSessionDescriptionToGlibNone(src)) cret = C.gst_webrtc_session_description_copy(carg0) runtime.KeepAlive(src) var goret *WebRTCSessionDescription goret = UnsafeWebRTCSessionDescriptionFromGlibFull(unsafe.Pointer(cret)) return goret } // SuppressUnstableWarning should be overwritten by the user to suppress the warning var SuppressUnstableWarning = false func init() { if !SuppressUnstableWarning { log.Println("Warning: using unstable API") } }