GstNet.NetTimePacket¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| local_time | int | r/w | the local time when this packet was sent | 
| remote_time | int | r/w | the remote time observation | 
Methods¶
| class | new(buffer) | 
| class | receive(socket) | 
| copy() | |
| free() | |
| send(socket, dest_address) | |
| serialize() | 
Details¶
- 
class GstNet.NetTimePacket¶
- Various functions for receiving, sending an serializing - GstNet.NetTimePacketstructures.- 
classmethod new(buffer)[source]¶
- Parameters: - buffer ( - bytes) – a buffer from which to construct the packet, or- None- Returns: - The new - GstNet.NetTimePacket.- Return type: - GstNet.NetTimePacket- Creates a new - GstNet.NetTimePacketfrom a buffer received over the network. The caller is responsible for ensuring that buffer is at least- GstNet.NET_TIME_PACKET_SIZEbytes long.- If buffer is - None, the local and remote times will be set to- Gst.CLOCK_TIME_NONE.- MT safe. Caller owns return value ( - GstNet.NetTimePacket.freeto free).
 - 
classmethod receive(socket)[source]¶
- Parameters: - socket ( - Gio.Socket) – socket to receive the time packet on- Raises: - GLib.Error- Returns: - a new - GstNet.NetTimePacket, or- Noneon 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.NetTimePacketover a socket. Handles interrupted system calls, but otherwise returns- Noneon error.
 - 
copy()[source]¶
- Returns: - a copy of self, free with - GstNet.NetTimePacket.free().- Return type: - GstNet.NetTimePacket- Make a copy of self. 
 - 
send(socket, dest_address)[source]¶
- Parameters: - socket (Gio.Socket) – socket to send the time packet on
- dest_address (Gio.SocketAddress) – address to send the time packet to
 - Raises: - Returns: - Return type: - Sends a - GstNet.NetTimePacketover a socket.- MT safe. 
- socket (
 - 
serialize()[source]¶
- Returns: - A newly allocated sequence of - GstNet.NET_TIME_PACKET_SIZEbytes.- Return type: - int- Serialized a - GstNet.NetTimePacketinto a newly-allocated sequence of- GstNet.NET_TIME_PACKET_SIZEbytes, in network byte order. The value returned is suitable for passing to write(2) or sendto(2) for communication over the network.- MT safe. Caller owns return value ( - GLib.freeto free).
 
- 
classmethod