Functions

candidate_list_copy (candidate_list)

codec_list_are_equal (list1, list2)

codec_list_copy (codec_list)

codec_list_from_keyfile (filename)

error_quark ()

media_type_to_string (media_type)

parse_error (object, message)

rtp_header_extension_list_copy (extensions)

rtp_header_extension_list_from_keyfile (filename, media_type)

utils_get_default_codec_preferences (element)

utils_get_default_rtp_header_extension_preferences (element, media_type)

utils_set_bitrate (element, bitrate)

value_set_candidate_list (value, candidates)

Details

Farstream.candidate_list_copy(candidate_list)
Parameters:

candidate_list ([Farstream.Codec]) – A GLib.List of Farstream.Candidate

Returns:

a new GLib.List of Farstream.Candidate

Return type:

[Farstream.Codec]

Copies a GLib.List of Farstream.Candidate and its contents

Farstream.codec_list_are_equal(list1, list2)
Parameters:
Returns:

True if they are identical, False otherwise

Return type:

bool

Verifies if two glist of fscodecs are identical

Farstream.codec_list_copy(codec_list)
Parameters:

codec_list ([Farstream.Codec]) – a GLib.List of Farstream.Codec to copy

Returns:

The new list.

Return type:

[Farstream.Codec]

Copies a list of Farstream.Codec structures.

Farstream.codec_list_from_keyfile(filename)
Parameters:

filename (str) – Name of the GLib.KeyFile to read the codecs parameters from

Raises:

GLib.Error

Returns:

The GLib.List of Farstream.Codec or None if the keyfile was empty or an error occured.

Return type:

[Farstream.Codec]

Reads the content of a GLib.KeyFile of the following format into a GLib.List of Farstream.Codec structures.

Example:

[audio/codec1]
clock-rate=8000

[audio/codec1:1]
clock-rate=16000

[audio/codec2]
one_param=QCIF
another_param=WOW

[video/codec3]
wierd_param=42
feedback:nack/pli=1
feedback:tfrc=
Farstream.error_quark()
Return type:

int

Farstream.media_type_to_string(media_type)
Parameters:

media_type (Farstream.MediaType) – A media type

Returns:

a static string representing the media type

Return type:

str

Gives a user-printable string representing the media type

Farstream.parse_error(object, message)
Parameters:
Returns:

True if the message matches the object and is valid.

error:

Returns the Farstream.Error error number in the message if not None.

error_msg:

Returns the error message if not None

Return type:

(bool, error: Farstream.Error, error_msg: str)

Parses a “farstream-farstream” message and checks if it matches the object parameters.

Farstream.rtp_header_extension_list_copy(extensions)
Parameters:

extensions ([Farstream.RtpHeaderExtension]) – a GLib.List of Farstream.RtpHeaderExtension

Returns:

a new GLib.List of Farstream.RtpHeaderExtension

Return type:

[Farstream.RtpHeaderExtension]

Does a deep copy of a GLib.List of Farstream.RtpHeaderExtension

Farstream.rtp_header_extension_list_from_keyfile(filename, media_type)
Parameters:
  • filename (str) – Name of the GLib.KeyFile to read the RTP Header Extensions from

  • media_type (Farstream.MediaType) – The media type for which to get header extensions

Raises:

GLib.Error

Returns:

a GLib.List of Farstream.RtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy()

Return type:

[Farstream.RtpHeaderExtension]

Reads the content of a GLib.KeyFile of the following format into a GLib.List of Farstream.RtpHeaderExtension structures.

The groups have a format “rtp-hdrext:audio:XXX” or “rtp-hdrext:video:XXX” where XXX is a unique string (per media type).

The valid keys are:

  • id: a int between in the 1-255 and 4096-4351 ranges

  • uri: a URI describing the RTP Header Extension

  • direction (optional): To only send or receive a RTP Header Extension, possible values are “send”, “receive”, “none” or “both”. Defaults to “both”

Example:

[rtp-hdrext:audio:a]
id=1
uri=urn:ietf:params:rtp-hdrext:toffset

[rtp-hdrext:audio:abc]
id=3
uri=urn:ietf:params:rtp-hdrext:ntp-64
direction=receive
Farstream.utils_get_default_codec_preferences(element)
Parameters:

element (Gst.Element) – Element for which to fetch default codec preferences

Returns:

The default codec preferences for this plugin. This GLib.List should be freed with fs_codec_list_destroy()

Return type:

[Farstream.Codec]

These default codec preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.

Farstream.utils_get_default_rtp_header_extension_preferences(element, media_type)
Parameters:
Returns:

The default rtp header extension preferences for this plugin, this GLib.List should be freed with fs_codec_list_destroy()

Return type:

[Farstream.Codec]

These default rtp header extension preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.

Farstream.utils_set_bitrate(element, bitrate)
Parameters:

This allows setting the bitrate on all elements that have a “bitrate” property without having to know the type or of the unit used by that element.

This will be obsolete in 0.11 (when all elements use bit/sec for the “bitrate” property.

Farstream.value_set_candidate_list(value, candidates)
Parameters:

This is for the bindings benefit. Works around the limitations of GObject.Object introspection.