Farstream.StreamTransmitter

g Farstream.StreamTransmitter Farstream.StreamTransmitter GObject.Object GObject.Object GObject.Object->Farstream.StreamTransmitter

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
  add_remote_candidates (candidates)
  emit_error (error_no, error_msg)
  force_remote_candidates (remote_candidates)
  gather_local_candidates ()
  stop ()

Virtual Methods

Inherited:GObject.Object (7)
  do_add_remote_candidates (candidates)
  do_force_remote_candidates (remote_candidates)
  do_gather_local_candidates ()
  do_stop ()

Properties

Name Type Flags Short Description
associate-on-source bool r/w/co Whether to associate incoming data stream based on the source address
preferred-local-candidates   r/w/co A GLib.List of FsCandidates
sending bool r/w If set to False, the transmitter will stop sending to this person

Signals

Inherited:GObject.Object (1)
Name Short Description
error This signal is emitted in any error condition
known-source-packet-received This signal is emitted when a buffer coming from a confirmed known source is received.
local-candidates-prepared This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer.
new-active-candidate-pair This signal is emitted when there is a new active chandidate pair that has been established.
new-local-candidate This signal is emitted when a new local candidate is discovered.
state-changed This signal is emitted when the ICE state (or equivalent) of the component changes

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class Farstream.StreamTransmitter(**kwargs)
Bases:GObject.Object
Abstract:Yes
Structure:Farstream.StreamTransmitterClass

All members are private, access them using methods and properties

add_remote_candidates(candidates)
Parameters:candidates ([Farstream.Candidate]) – a GLib.List of the remote candidates
Raises:GLib.Error
Returns:True of the candidate could be added, False if it couldnt (and the GLib.Error will be set)
Return type:bool

This function is used to add remote candidates to the transmitter

emit_error(error_no, error_msg)
Parameters:
  • error_no (int) – The number of the error
  • error_msg (str) – Error message (for the programmer)

This function emit the “error” signal on a Farstream.StreamTransmitter, it should only be called by subclasses.

force_remote_candidates(remote_candidates)
Parameters:remote_candidates ([Farstream.Candidate]) – a GLib.List of Farstream.Candidate to force
Raises:GLib.Error
Returns:True if the candidates could be forced, False otherwise
Return type:bool

This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component.

gather_local_candidates()
Raises:GLib.Error
Returns:True if it succeeds (or is not implemented), False otherwise
Return type:bool

This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function.

stop()

This functions stops the Farstream.StreamTransmitter, it must be called before the last reference is dropped.

do_add_remote_candidates(candidates) virtual
Parameters:candidates ([Farstream.Candidate]) – a GLib.List of the remote candidates
Returns:True of the candidate could be added, False if it couldnt (and the GLib.Error will be set)
Return type:bool

This function is used to add remote candidates to the transmitter

do_force_remote_candidates(remote_candidates) virtual
Parameters:remote_candidates ([Farstream.Candidate]) – a GLib.List of Farstream.Candidate to force
Returns:True if the candidates could be forced, False otherwise
Return type:bool

This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component.

do_gather_local_candidates() virtual
Returns:True if it succeeds (or is not implemented), False otherwise
Return type:bool

This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function.

do_stop() virtual

This functions stops the Farstream.StreamTransmitter, it must be called before the last reference is dropped.

Signal Details

Farstream.StreamTransmitter.signals.error(stream_transmitter, errorno, error_msg)
Signal Name:

error

Flags:

RUN_LAST

Parameters:

This signal is emitted in any error condition

Farstream.StreamTransmitter.signals.known_source_packet_received(stream_transmitter, component, buffer)
Signal Name:

known-source-packet-received

Flags:

RUN_LAST

Parameters:

This signal is emitted when a buffer coming from a confirmed known source is received.

Farstream.StreamTransmitter.signals.local_candidates_prepared(stream_transmitter)
Signal Name:local-candidates-prepared
Flags:RUN_LAST
Parameters:stream_transmitter (Farstream.StreamTransmitter) – The object which received the signal

This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer.

Farstream.StreamTransmitter.signals.new_active_candidate_pair(stream_transmitter, local_candidate, remote_candidate)
Signal Name:

new-active-candidate-pair

Flags:

RUN_LAST

Parameters:

This signal is emitted when there is a new active chandidate pair that has been established. This is specially useful for ICE where the active candidate pair can change automatically due to network conditions. The user must not modify the candidates and must copy them if he wants to use them outside the callback scope.

Farstream.StreamTransmitter.signals.new_local_candidate(stream_transmitter, local_candidate)
Signal Name:

new-local-candidate

Flags:

RUN_LAST

Parameters:

This signal is emitted when a new local candidate is discovered.

Farstream.StreamTransmitter.signals.state_changed(stream_transmitter, component, state)
Signal Name:

state-changed

Flags:

RUN_LAST

Parameters:

This signal is emitted when the ICE state (or equivalent) of the component changes

Property Details

Farstream.StreamTransmitter.props.associate_on_source
Name:associate-on-source
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

This tells the stream transmitter to associate incoming data with this based on the source without looking at the content if possible.

Farstream.StreamTransmitter.props.preferred_local_candidates
Name:preferred-local-candidates
Type:
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

A GLib.List of FsCandidates

Farstream.StreamTransmitter.props.sending
Name:sending
Type:bool
Default Value:True
Flags:READABLE, WRITABLE

A network source Gst.Element to be used by the Farstream.Session