Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstNet.buffer_add_net_address_meta(buffer, addr)[source]¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Bufferaddr (
Gio.SocketAddress) – a GSocketAddress to connect to buffer
- Returns:
a
GstNet.NetAddressMetaconnected to buffer- Return type:
Attaches addr as metadata in a
GstNet.NetAddressMetato buffer.
- GstNet.buffer_add_net_control_message_meta(buffer, message)[source]¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffermessage (
Gio.SocketControlMessage) – a GSocketControlMessage to attach to buffer
- Returns:
a
GstNet.NetControlMessageMetaconnected to buffer- Return type:
Attaches message as metadata in a
GstNet.NetControlMessageMetato buffer.
- GstNet.buffer_get_net_address_meta(buffer)[source]¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffer- Returns:
the
GstNet.NetAddressMetaorNonewhen there is no such metadata on buffer.- Return type:
Find the
GstNet.NetAddressMetaon buffer.
- GstNet.net_time_packet_receive(socket)[source]¶
- Parameters:
socket (
Gio.Socket) – socket to receive the time packet on- Raises:
- Returns:
a new
GstNet.NetTimePacket, orNoneon error. Free withGstNet.NetTimePacket.free() when done.- src_address:
address of variable to return sender address
- Return type:
(
GstNet.NetTimePacket, src_address:Gio.SocketAddress)
Receives a
GstNet.NetTimePacketover a socket. Handles interrupted system calls, but otherwise returnsNoneon error.
- GstNet.net_utils_set_socket_tos(socket, qos_dscp)[source]¶
- Parameters:
socket (
Gio.Socket) – Socket to configureqos_dscp (
int) – QoS DSCP value
- Returns:
- Return type:
Configures IP_TOS value of socket, i.e. sets QoS DSCP.
New in version 1.18.
- GstNet.ptp_deinit()[source]¶
Deinitialize the GStreamer PTP subsystem and stop the PTP clock. If there are any remaining
GstNet.PtpClockinstances, they won’t be further synchronized to the PTP network clock.New in version 1.6.
- GstNet.ptp_init(clock_id, interfaces)[source]¶
- Parameters:
clock_id (
int) – PTP clock id of this process’ clock orGstNet.PTP_CLOCK_ID_NONEinterfaces ([
str] orNone) – network interfaces to run the clock on
- Returns:
Trueif the GStreamer PTP clock subsystem could be initialized.- Return type:
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_init_full(config)[source]¶
- Parameters:
config (
Gst.Structure) – Configuration for initializing the GStreamer PTP subsystem- Returns:
Trueif the GStreamer PTP clock subsystem could be initialized.- Return type:
Initialize the GStreamer PTP subsystem and create a PTP ordinary clock in slave-only mode according to the config.
config is a
Gst.Structurewith the following optional fields:#guint64
clock-id: The clock ID to use for the local clock. If the clock-id is not provided orGstNet.PTP_CLOCK_ID_NONEis provided, a clock id is automatically generated from the MAC address of the first network interface.#GStrv
interfaces: The interface names to listen on for PTP packets. If none are provided then all compatible interfaces will be used.intttl: The TTL to use for multicast packets sent out by GStreamer. This defaults to 1, i.e. packets will not leave the local network.
This function is automatically called by
GstNet.PtpClock.new() with default parameters if it wasn’t called before.New in version 1.24.
- GstNet.ptp_is_initialized()[source]¶
-
Check if the GStreamer PTP clock subsystem is initialized.
New in version 1.6.
- GstNet.ptp_is_supported()[source]¶
- Returns:
Trueif PTP clocks are generally supported on this system, and previous initializations did not fail.- Return type:
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)[source]¶
- Parameters:
callback (
GstNet.PtpStatisticsCallback) –GstNet.PtpStatisticsCallbackto call
- Returns:
Id for the callback that can be passed to
GstNet.ptp_statistics_callback_remove()- Return type:
Installs a new statistics callback for gathering PTP statistics. See
GstNet.PtpStatisticsCallbackfor a list of statistics that are provided.New in version 1.6.
- GstNet.ptp_statistics_callback_remove(id)[source]¶
- 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.