Functions

buffer_add_net_address_meta (buffer, addr)

buffer_add_net_control_message_meta (buffer, message)

buffer_get_net_address_meta (buffer)

net_address_meta_api_get_type ()

net_address_meta_get_info ()

net_control_message_meta_api_get_type ()

net_control_message_meta_get_info ()

net_time_packet_receive (socket)

net_utils_set_socket_tos (socket, qos_dscp)

ptp_deinit ()

ptp_init (clock_id, interfaces)

ptp_is_initialized ()

ptp_is_supported ()

ptp_statistics_callback_add (callback, *user_data)

ptp_statistics_callback_remove (id)

Details

GstNet.buffer_add_net_address_meta(buffer, addr)
Parameters:
Returns:

a GstNet.NetAddressMeta connected to buffer

Return type:

GstNet.NetAddressMeta

Attaches addr as metadata in a GstNet.NetAddressMeta to buffer.

GstNet.buffer_add_net_control_message_meta(buffer, message)
Parameters:
Returns:

a GstNet.NetControlMessageMeta connected to buffer

Return type:

GstNet.NetControlMessageMeta

Attaches message as metadata in a GstNet.NetControlMessageMeta to buffer.

GstNet.buffer_get_net_address_meta(buffer)
Parameters:

buffer (Gst.Buffer) – a Gst.Buffer

Returns:

the GstNet.NetAddressMeta or None when there is no such metadata on buffer.

Return type:

GstNet.NetAddressMeta or None

Find the GstNet.NetAddressMeta on buffer.

GstNet.net_address_meta_api_get_type()
Return type:

GObject.GType

GstNet.net_address_meta_get_info()
Return type:

Gst.MetaInfo

GstNet.net_control_message_meta_api_get_type()
Return type:

GObject.GType

GstNet.net_control_message_meta_get_info()
Return type:

Gst.MetaInfo

GstNet.net_time_packet_receive(socket)
Parameters:

socket (Gio.Socket) – socket to receive the time packet on

Raises:

GLib.Error

Returns:

a new GstNet.NetTimePacket, or None on error. Free with GstNet.NetTimePacket.free() when done.

src_address:

address of variable to return sender address

Return type:

(GstNet.NetTimePacket, src_address: Gio.SocketAddress)

Receives a GstNet.NetTimePacket over a socket. Handles interrupted system calls, but otherwise returns None on error.

GstNet.net_utils_set_socket_tos(socket, qos_dscp)
Parameters:
  • socket (Gio.Socket) – Socket to configure

  • qos_dscp (int) – QoS DSCP value

Returns:

True if successful, False in case an error occurred.

Return type:

bool

Configures IP_TOS value of socket, i.e. sets QoS DSCP.

New in version 1.18.

GstNet.ptp_deinit()

Deinitialize the GStreamer PTP subsystem and stop the PTP clock. If there are any remaining GstNet.PtpClock instances, they won’t be further synchronized to the PTP network clock.

New in version 1.6.

GstNet.ptp_init(clock_id, interfaces)
Parameters:
Returns:

True if the GStreamer PTP clock subsystem could be initialized.

Return type:

bool

Initialize the GStreamer PTP subsystem and create a PTP ordinary clock in slave-only mode for all domains on the given interfaces with the given clock_id.

If clock_id is GstNet.PTP_CLOCK_ID_NONE, a clock id is automatically generated from the MAC address of the first network interface.

This function is automatically called by GstNet.PtpClock.new() with default parameters if it wasn’t called before.

New in version 1.6.

GstNet.ptp_is_initialized()
Returns:

True if the GStreamer PTP clock subsystem is initialized.

Return type:

bool

Check if the GStreamer PTP clock subsystem is initialized.

New in version 1.6.

GstNet.ptp_is_supported()
Returns:

True if PTP clocks are generally supported on this system, and previous initializations did not fail.

Return type:

bool

Check if PTP clocks are generally supported on this system, and if previous initializations did not fail.

New in version 1.6.

GstNet.ptp_statistics_callback_add(callback, *user_data)
Parameters:
Returns:

Id for the callback that can be passed to GstNet.ptp_statistics_callback_remove()

Return type:

int

Installs a new statistics callback for gathering PTP statistics. See GstNet.PtpStatisticsCallback for a list of statistics that are provided.

New in version 1.6.

GstNet.ptp_statistics_callback_remove(id)
Parameters:

id (int) – Callback id to remove

Removes a PTP statistics callback that was previously added with GstNet.ptp_statistics_callback_add().

New in version 1.6.