![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/netbuffer/gstnetbuffer.h> GstNetBuffer; enum GstNetType; GstNetAddress; GstNetBuffer* gst_netbuffer_new (void); gboolean gst_netaddress_get_ip4_address (GstNetAddress *naddr, guint32 *address, guint16 *port); gboolean gst_netaddress_get_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 *port); GstNetType gst_netaddress_get_net_type (GstNetAddress *naddr); void gst_netaddress_set_ip4_address (GstNetAddress *naddr, guint32 address, guint16 port); void gst_netaddress_set_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 port);
GstNetBuffer is a subclass of a normal GstBuffer that contains two additional metadata fields of type GstNetAddress named 'to' and 'from'. The buffer can be used to store additional information about the origin of the buffer data and is used in various network elements to track the to and from addresses.
Last reviewed on 2006-08-21 (0.10.10)
typedef struct { GstBuffer buffer; GstNetAddress from; GstNetAddress to; } GstNetBuffer;
buffer for use in network sources and sinks. It contains the source or destination address of the buffer.
GstBuffer buffer ; |
the parent GstBuffer |
GstNetAddress from ; |
the address where this buffer came from. |
GstNetAddress to ; |
the address where this buffer should go to. |
typedef enum { GST_NET_TYPE_UNKNOWN, GST_NET_TYPE_IP4, GST_NET_TYPE_IP6, } GstNetType;
The Address type used in GstNetAddress.
GstNetBuffer* gst_netbuffer_new (void);
Create a new network buffer.
Returns : | a new GstNetBuffer. |
gboolean gst_netaddress_get_ip4_address (GstNetAddress *naddr, guint32 *address, guint16 *port);
Get the IPv4 address stored in naddr
into address
.
naddr : |
a network address |
address : |
a location to store the address. |
port : |
a location to store the port. |
Returns : | TRUE if the address could be retrieved. |
gboolean gst_netaddress_get_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 *port);
Get the IPv6 address stored in naddr
into address
.
naddr : |
a network address |
address : |
a location to store the result. |
port : |
a location to store the port. |
Returns : | TRUE if the address could be retrieved. |
GstNetType gst_netaddress_get_net_type (GstNetAddress *naddr);
Get the type of address stored in naddr
.
naddr : |
a network address |
Returns : | the network type stored in naddr .
|
void gst_netaddress_set_ip4_address (GstNetAddress *naddr, guint32 address, guint16 port);
Set naddr
with the IPv4 address
and port
pair.
naddr : |
a network address |
address : |
an IPv4 network address. |
port : |
a port number to set. |
void gst_netaddress_set_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 port);
Set naddr
with the IPv6 address
and port
pair.
naddr : |
a network address |
address : |
an IPv6 network address. |
port : |
a port number to set. |