Documentation ¶
Overview ¶
gstwebrtc contains bindings for the gstreamer webrtclib. See also https://gstreamer.freedesktop.org/documentation/webrtclib/index.html
Index ¶
- type BundlePolicy
- type DTLSSetup
- type DTLSTransportState
- type DataChannel
- type DataChannelState
- type Error
- type FECType
- type ICEComponent
- type ICEConnectionState
- type ICEGatheringState
- type ICERole
- type ICETransportPolicy
- type Kind
- type PeerConnectionState
- type PriorityType
- type RTPTransceiver
- type RTPTransceiverDirection
- type SCTPTransportState
- type SDPType
- type SessionDescription
- type SignalingState
- type StatsType
- type W3RTCSessionDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundlePolicy ¶
type BundlePolicy C.GstWebRTCBundlePolicy
const ( BUNDLE_POLICY_NONE BundlePolicy = C.GST_WEBRTC_BUNDLE_POLICY_NONE // none BUNDLE_POLICY_BALANCED BundlePolicy = C.GST_WEBRTC_BUNDLE_POLICY_BALANCED // balanced BUNDLE_POLICY_MAX_COMPAT BundlePolicy = C.GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT // max-compat BUNDLE_POLICY_MAX_BUNDLE BundlePolicy = C.GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE // max-bundle )
func (BundlePolicy) String ¶
func (e BundlePolicy) String() string
type DTLSSetup ¶
type DTLSSetup C.GstWebRTCDTLSSetup
const ( DTLS_SETUP_NONE DTLSSetup = C.GST_WEBRTC_DTLS_SETUP_NONE // none DTLS_SETUP_ACTPASS DTLSSetup = C.GST_WEBRTC_DTLS_SETUP_ACTPASS // actpass DTLS_SETUP_ACTIVE DTLSSetup = C.GST_WEBRTC_DTLS_SETUP_ACTIVE // sendonly DTLS_SETUP_PASSIVE DTLSSetup = C.GST_WEBRTC_DTLS_SETUP_PASSIVE // recvonly )
type DTLSTransportState ¶
type DTLSTransportState C.GstWebRTCDTLSTransportState
const ( DTLS_TRANSPORT_STATE_NEW DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW // new DTLS_TRANSPORT_STATE_CLOSED DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED // closed DTLS_TRANSPORT_STATE_FAILED DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED // failed DTLS_TRANSPORT_STATE_CONNECTING DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING // connecting DTLS_TRANSPORT_STATE_CONNECTED DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED // connected )
func (DTLSTransportState) String ¶
func (e DTLSTransportState) String() string
type DataChannel ¶
DataChannel is a representation of GstWebRTCDataChannel. See https://gstreamer.freedesktop.org/documentation/webrtclib/gstwebrtc-datachannel.html?gi-language=c
there is no constructor for DataChannel, you can get it from webrtcbin signals
func (*DataChannel) Close ¶
func (dc *DataChannel) Close()
func (*DataChannel) SendData ¶
func (dc *DataChannel) SendData(data []byte) error
type DataChannelState ¶
type DataChannelState C.GstWebRTCDataChannelState
const ( DATA_CHANNEL_STATE_CONNECTING DataChannelState = C.GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING // connecting DATA_CHANNEL_STATE_OPEN DataChannelState = C.GST_WEBRTC_DATA_CHANNEL_STATE_OPEN // open DATA_CHANNEL_STATE_CLOSING DataChannelState = C.GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING // closing DATA_CHANNEL_STATE_CLOSED DataChannelState = C.GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED // closed )
func (DataChannelState) String ¶
func (e DataChannelState) String() string
type Error ¶
type Error C.GstWebRTCError
const ( ERROR_DATA_CHANNEL_FAILURE Error = C.GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE // data-channel-failure ERROR_DTLS_FAILURE Error = C.GST_WEBRTC_ERROR_DTLS_FAILURE // dtls-failure ERROR_FINGERPRINT_FAILURE Error = C.GST_WEBRTC_ERROR_FINGERPRINT_FAILURE // fingerprint-failure ERROR_SCTP_FAILURE Error = C.GST_WEBRTC_ERROR_SCTP_FAILURE // sctp-failure ERROR_SDP_SYNTAX_ERROR Error = C.GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR // sdp-syntax-error ERROR_HARDWARE_ENCODER_NOT_AVAILABLE Error = C.GST_WEBRTC_ERROR_HARDWARE_ENCODER_NOT_AVAILABLE // hardware-encoder-not-available ERROR_ENCODER_ERROR Error = C.GST_WEBRTC_ERROR_ENCODER_ERROR // encoder-error ERROR_INVALID_STATE Error = C.GST_WEBRTC_ERROR_INVALID_STATE // invalid-state ERROR_INTERNAL_FAILURE Error = C.GST_WEBRTC_ERROR_INTERNAL_FAILURE // internal-failure ERROR_INVALID_MODIFICATION Error = C.GST_WEBRTC_ERROR_INVALID_MODIFICATION // invalid-modification ERROR_TYPE_ERROR Error = C.GST_WEBRTC_ERROR_TYPE_ERROR // type-error )
type FECType ¶
type FECType C.GstWebRTCFECType
const ( FEC_TYPE_NONE FECType = C.GST_WEBRTC_FEC_TYPE_NONE // none FEC_TYPE_ULP_RED FECType = C.GST_WEBRTC_FEC_TYPE_ULP_RED // ulpfec + red )
type ICEComponent ¶
type ICEComponent C.GstWebRTCICEComponent
const ( ICE_COMPONENT_RTP ICEComponent = C.GST_WEBRTC_ICE_COMPONENT_RTP // RTP component ICE_COMPONENT_RTCP ICEComponent = C.GST_WEBRTC_ICE_COMPONENT_RTCP // RTCP component )
func (ICEComponent) String ¶
func (e ICEComponent) String() string
type ICEConnectionState ¶
type ICEConnectionState C.GstWebRTCICEConnectionState
const ( ICE_CONNECTION_STATE_NEW ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_NEW // new ICE_CONNECTION_STATE_CHECKING ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING // checking ICE_CONNECTION_STATE_CONNECTED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED // connected ICE_CONNECTION_STATE_COMPLETED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED // completed ICE_CONNECTION_STATE_FAILED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_FAILED // failed ICE_CONNECTION_STATE_DISCONNECTED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED // disconnected ICE_CONNECTION_STATE_CLOSED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED // closed )
func (ICEConnectionState) String ¶
func (e ICEConnectionState) String() string
type ICEGatheringState ¶
type ICEGatheringState C.GstWebRTCICEGatheringState
const ( ICE_GATHERING_STATE_NEW ICEGatheringState = C.GST_WEBRTC_ICE_GATHERING_STATE_NEW // new ICE_GATHERING_STATE_GATHERING ICEGatheringState = C.GST_WEBRTC_ICE_GATHERING_STATE_GATHERING // gathering ICE_GATHERING_STATE_COMPLETE ICEGatheringState = C.GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE // complete )
func (ICEGatheringState) String ¶
func (e ICEGatheringState) String() string
type ICERole ¶
type ICERole C.GstWebRTCICERole
const ( ICE_ROLE_CONTROLLED ICERole = C.GST_WEBRTC_ICE_ROLE_CONTROLLED // controlled ICE_ROLE_CONTROLLING ICERole = C.GST_WEBRTC_ICE_ROLE_CONTROLLING // controlling )
type ICETransportPolicy ¶
type ICETransportPolicy C.GstWebRTCICETransportPolicy
const ( ICE_TRANSPORT_POLICY_ALL ICETransportPolicy = C.GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL // all ICE_TRANSPORT_POLICY_RELAY ICETransportPolicy = C.GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY // relay )
func (ICETransportPolicy) String ¶
func (e ICETransportPolicy) String() string
type Kind ¶
type Kind C.GstWebRTCKind
const ( UNKNOWN Kind = C.GST_WEBRTC_KIND_UNKNOWN // unknown AUDIO Kind = C.GST_WEBRTC_KIND_AUDIO // audio VIDEO Kind = C.GST_WEBRTC_KIND_VIDEO // video )
type PeerConnectionState ¶
type PeerConnectionState C.GstWebRTCPeerConnectionState
const ( PEER_CONNECTION_STATE_NEW PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_NEW // new PEER_CONNECTION_STATE_CONNECTING PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING // connecting PEER_CONNECTION_STATE_CONNECTED PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED // connected PEER_CONNECTION_STATE_DISCONNECTED PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED // disconnected PEER_CONNECTION_STATE_FAILED PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_FAILED // failed PEER_CONNECTION_STATE_CLOSED PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED // closed )
func (PeerConnectionState) String ¶
func (e PeerConnectionState) String() string
type PriorityType ¶
type PriorityType C.GstWebRTCPriorityType
const ( PRIORITY_TYPE_VERY_LOW PriorityType = C.GST_WEBRTC_PRIORITY_TYPE_VERY_LOW // very-low PRIORITY_TYPE_LOW PriorityType = C.GST_WEBRTC_PRIORITY_TYPE_LOW // low PRIORITY_TYPE_MEDIUM PriorityType = C.GST_WEBRTC_PRIORITY_TYPE_MEDIUM // medium PRIORITY_TYPE_HIGH PriorityType = C.GST_WEBRTC_PRIORITY_TYPE_HIGH // high )
func (PriorityType) String ¶
func (e PriorityType) String() string
type RTPTransceiver ¶
type RTPTransceiverDirection ¶
type RTPTransceiverDirection C.GstWebRTCRTPTransceiverDirection
const ( RTP_TRANSCEIVER_DIRECTION_NONE RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE // none RTP_TRANSCEIVER_DIRECTION_INACTIVE RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE // inactive RTP_TRANSCEIVER_DIRECTION_SENDONLY RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY // sendonly RTP_TRANSCEIVER_DIRECTION_RECVONLY RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY // recvonly RTP_TRANSCEIVER_DIRECTION_SENDRECV RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV // sendrecv )
func (RTPTransceiverDirection) String ¶
func (e RTPTransceiverDirection) String() string
type SCTPTransportState ¶
type SCTPTransportState C.GstWebRTCSCTPTransportState
const ( SCTP_TRANSPORT_STATE_NEW SCTPTransportState = C.GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW // new SCTP_TRANSPORT_STATE_CONNECTING SCTPTransportState = C.GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING // connecting SCTP_TRANSPORT_STATE_CONNECTED SCTPTransportState = C.GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED // connected SCTP_TRANSPORT_STATE_CLOSED SCTPTransportState = C.GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED // closed )
func (SCTPTransportState) String ¶
func (e SCTPTransportState) String() string
type SDPType ¶
type SDPType C.GstWebRTCSDPType
const ( SDP_TYPE_OFFER SDPType = C.GST_WEBRTC_SDP_TYPE_OFFER // offer SDP_TYPE_PRANSWER SDPType = C.GST_WEBRTC_SDP_TYPE_PRANSWER // pranswer SDP_TYPE_ANSWER SDPType = C.GST_WEBRTC_SDP_TYPE_ANSWER // answer SDP_TYPE_ROLLBACK SDPType = C.GST_WEBRTC_SDP_TYPE_ROLLBACK // rollback )
func SDPTypeFromString ¶
type SessionDescription ¶
type SessionDescription struct {
// contains filtered or unexported fields
}
func NewSessionDescription ¶
func NewSessionDescription(t SDPType, sdp *gstsdp.Message) *SessionDescription
func (*SessionDescription) Copy ¶
func (sd *SessionDescription) Copy() *SessionDescription
Copy creates a new copy of the SessionDescription
func (*SessionDescription) Free ¶
func (sd *SessionDescription) Free()
func (*SessionDescription) ToGValue ¶
func (sd *SessionDescription) ToGValue() (*glib.Value, error)
ToGValue implements glib.ValueTransformer
func (*SessionDescription) ToW3SDP ¶
func (sd *SessionDescription) ToW3SDP() W3RTCSessionDescription
ToW3SDP returns a W3RTCSessionDescription that can be marshaled to JSON
func (*SessionDescription) UnownedCopy ¶
func (sd *SessionDescription) UnownedCopy() *SessionDescription
UnownedCopy creates a new copy of the SessionDescription that will not be finalized
this is needed for passing the SessionDescription to other functions that will take ownership of it.
used in the bindings, should not be called by application code
type SignalingState ¶
type SignalingState C.GstWebRTCSignalingState
const ( SIGNALING_STATE_STABLE SignalingState = C.GST_WEBRTC_SIGNALING_STATE_STABLE // stable SIGNALING_STATE_CLOSED SignalingState = C.GST_WEBRTC_SIGNALING_STATE_CLOSED // closed SIGNALING_STATE_HAVE_LOCAL_OFFER SignalingState = C.GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER // have-local-offer SIGNALING_STATE_HAVE_REMOTE_OFFER SignalingState = C.GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER // have-remote-offer SIGNALING_STATE_HAVE_LOCAL_PRANSWER SignalingState = C.GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER // have-local-pranswer SIGNALING_STATE_HAVE_REMOTE_PRANSWER SignalingState = C.GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER // have-remote-pranswer )
func (SignalingState) String ¶
func (e SignalingState) String() string
type StatsType ¶
type StatsType C.GstWebRTCStatsType
const ( STATS_CODEC StatsType = C.GST_WEBRTC_STATS_CODEC // codec STATS_INBOUND_RTP StatsType = C.GST_WEBRTC_STATS_INBOUND_RTP // inbound-rtp STATS_OUTBOUND_RTP StatsType = C.GST_WEBRTC_STATS_OUTBOUND_RTP // outbound-rtp STATS_REMOTE_INBOUND_RTP StatsType = C.GST_WEBRTC_STATS_REMOTE_INBOUND_RTP // remote-inbound-rtp STATS_REMOTE_OUTBOUND_RTP StatsType = C.GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP // remote-outbound-rtp STATS_CSRC StatsType = C.GST_WEBRTC_STATS_CSRC // csrc STATS_PEER_CONNECTION StatsType = C.GST_WEBRTC_STATS_PEER_CONNECTION // peer-connection STATS_DATA_CHANNEL StatsType = C.GST_WEBRTC_STATS_DATA_CHANNEL // data-channel STATS_STREAM StatsType = C.GST_WEBRTC_STATS_STREAM // stream STATS_TRANSPORT StatsType = C.GST_WEBRTC_STATS_TRANSPORT // transport STATS_CANDIDATE_PAIR StatsType = C.GST_WEBRTC_STATS_CANDIDATE_PAIR // candidate-pair STATS_LOCAL_CANDIDATE StatsType = C.GST_WEBRTC_STATS_LOCAL_CANDIDATE // local-candidate STATS_REMOTE_CANDIDATE StatsType = C.GST_WEBRTC_STATS_REMOTE_CANDIDATE // remote-candidate STATS_CERTIFICATE StatsType = C.GST_WEBRTC_STATS_CERTIFICATE // certificate )
type W3RTCSessionDescription ¶
W3RTCSessionDescription is used to marshal/unmarshal SessionDescription to/from JSON.
We cannot implement the json.(Un-)Marshaler interfaces on SessionDescription directly because the finalizer would run and free the memory, because the value would have to be copied.
it complies with the WebRTC spec for SessionDescription, see https://www.w3.org/TR/webrtc/#rtcsessiondescription-class
func (*W3RTCSessionDescription) ToGstSDP ¶
func (w3SDP *W3RTCSessionDescription) ToGstSDP() (*SessionDescription, error)
ToGstSDP converts a W3RTCSessionDescription to a SessionDescription