@Gst.Since(minor=14) public class WebRTCBin extends Bin
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection,
available since Gstreamer 1.14| Modifier and Type | Class and Description |
|---|---|
static interface |
WebRTCBin.CREATE_ANSWER
Signal emitted when this
WebRTCBin creates an answer |
static interface |
WebRTCBin.CREATE_OFFER
Signal emitted when this
WebRTCBin creates an offer |
static interface |
WebRTCBin.ON_ICE_CANDIDATE |
static interface |
WebRTCBin.ON_NEGOTIATION_NEEDED
Signal emitted when this
WebRTCBin is ready to do negotiation to
setup a WebRTC connection Good starting point to have the WebRTCBin send
an offer to potential clients |
Bin.DebugGraphDetails, Bin.DEEP_ELEMENT_ADDED, Bin.DEEP_ELEMENT_REMOVED, Bin.DO_LATENCY, Bin.ELEMENT_ADDED, Bin.ELEMENT_REMOVEDElement.NO_MORE_PADS, Element.PAD_ADDED, Element.PAD_REMOVEDGObject.GCallback, GObject.GInterfaceNativeObject.Initializer, NativeObject.TypeProvider, NativeObject.TypeRegistration<T extends NativeObject>| Modifier and Type | Field and Description |
|---|---|
static String |
GST_NAME |
static String |
GTYPE_NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
addIceCandidate(int sdpMLineIndex,
String candidate)
Adds a remote ice candidate to the bin
|
void |
connect(WebRTCBin.ON_ICE_CANDIDATE listener)
Adds a listener for the
on-ice-candidate signal. |
void |
connect(WebRTCBin.ON_NEGOTIATION_NEEDED listener)
Adds a listener for the
on-negotiation-needed signal. |
void |
createAnswer(WebRTCBin.CREATE_ANSWER listener)
Create an answer in response to an offer received in order for the WebRTC
signaling protocol to start.
|
void |
createOffer(WebRTCBin.CREATE_OFFER listener)
Create an offer that can be sent to other clients to setup a WebRTC
connection.
|
WebRTCPeerConnectionState |
getConnectionState()
Retrieve the connection state this
WebRTCBin is currently in |
WebRTCICEGatheringState |
getICEGatheringState()
Retrieve ICE gathering state this
WebRTCBin is currently in |
WebRTCSessionDescription |
getLocalDescription()
Retrieve the local description for this
WebRTCBin |
WebRTCSessionDescription |
getRemoteDescription()
Retrieve the remote description for this
WebRTCBin |
String |
getStunServer()
Retrieves the STUN server that is used.
|
String |
getTurnServer()
Retrieves the TURN server that is used.
|
void |
setLocalDescription(WebRTCSessionDescription description)
Sets the local description for the WebRTC connection.
|
void |
setRemoteDescription(WebRTCSessionDescription description)
Sets the remote description for the WebRTC connection.
|
void |
setStunServer(String server)
Sets the
stun-server property for this WebRTCBin
which is use to gather ICE data |
void |
setTurnServer(String server)
Sets the
turn-server property for this WebRTCBin
which is used whenever a direct peer-to-peer connection can be
established |
add, addMany, connect, connect, connect, connect, connect, debugToDotFile, debugToDotFileWithTS, disconnect, disconnect, disconnect, disconnect, disconnect, getElementByName, getElementByNameRecurseUp, getElements, getElementsRecursive, getElementsSorted, getSinks, getSources, remove, removeManyaddPad, connect, connect, connect, disconnect, disconnect, disconnect, getBaseTime, getBus, getClock, getContext, getFactory, getPads, getRequestPad, getSinkPads, getSrcPads, getStartTime, getState, getState, getState, getState, getStaticPad, isPlaying, link, linkFiltered, linkMany, linkPads, linkPadsFiltered, makeRawElement, pause, play, postMessage, query, queryDuration, queryPosition, ready, releaseRequestPad, removePad, seek, seekSimple, sendEvent, setBaseTime, setCaps, setContext, setLockedState, setStartTime, setState, stop, syncStateWithParent, unlink, unlinkMany, unlinkPadsaddControlBinding, getAsString, getControlBinding, getName, getParent, hasActiveControlBindings, removeControlBinding, setAsString, setControlBindingDisabled, setControlBindingsDisabled, setName, suggestNextSync, syncValues, toStringaddCallback, connect, connect, disconnect, dispose, emit, emit, get, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, getRefCount, getTypeName, invalidate, listPropertyNames, removeCallback, setclose, disown, equals, getPointer, getRawPointer, hashCodepublic static final String GST_NAME
public static final String GTYPE_NAME
public WebRTCBin(String name)
public void connect(WebRTCBin.ON_NEGOTIATION_NEEDED listener)
on-negotiation-needed signal.listener - public void connect(WebRTCBin.ON_ICE_CANDIDATE listener)
on-ice-candidate signal.listener - public void createOffer(WebRTCBin.CREATE_OFFER listener)
In most cases setLocalDescription(org.freedesktop.gstreamer.webrtc.WebRTCSessionDescription) should be called after an
answer is created
listener - callback that is called when a offer is createdpublic void createAnswer(WebRTCBin.CREATE_ANSWER listener)
Should be called after setRemoteDescription(org.freedesktop.gstreamer.webrtc.WebRTCSessionDescription) is called
In most cases setLocalDescription(org.freedesktop.gstreamer.webrtc.WebRTCSessionDescription) should be called after an
answer is created
listener - callback that is called when an answer is created.public void addIceCandidate(int sdpMLineIndex,
String candidate)
sdpMLineIndex - the zero-based index of the m-line attribute within
the SDP to which the candidate should be associated tocandidate - the ICE candidatepublic void setLocalDescription(WebRTCSessionDescription description)
createOffer(org.freedesktop.gstreamer.webrtc.WebRTCBin.CREATE_OFFER) or #createAnser is called.description - the WebRTCSessionDescription to set for the
local descriptionpublic void setRemoteDescription(WebRTCSessionDescription description)
description - the WebRTCSessionDescription to set for the
remote descriptionpublic void setStunServer(String server)
stun-server property for this WebRTCBin
which is use to gather ICE dataserver - STUN server urlpublic String getStunServer()
public void setTurnServer(String server)
turn-server property for this WebRTCBin
which is used whenever a direct peer-to-peer connection can be
establishedserver - TURN server urlpublic String getTurnServer()
public WebRTCPeerConnectionState getConnectionState()
WebRTCBin is currently inWebRTCPeerConnectionState describing the connection
statepublic WebRTCICEGatheringState getICEGatheringState()
WebRTCBin is currently inWebRTCICEGatheringState describing gathering statepublic WebRTCSessionDescription getLocalDescription()
WebRTCBinWebRTCSessionDescriptionpublic WebRTCSessionDescription getRemoteDescription()
WebRTCBinWebRTCSessionDescriptionCopyright © 2021 gstreamer-java. All rights reserved.