mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
docs/libs/: Don't try to GObject scan the netbuffer as it's not a GObject.
Original commit message from CVS: * docs/libs/Makefile.am: * docs/libs/gst-plugins-base-libs-sections.txt: * docs/libs/gst-plugins-base-libs.types: Don't try to GObject scan the netbuffer as it's not a GObject. Fixes #351308. * gst-libs/gst/netbuffer/gstnetbuffer.c: * gst-libs/gst/netbuffer/gstnetbuffer.h: Document GstNetBuffer.
This commit is contained in:
parent
8c663f7cb6
commit
f212805058
6 changed files with 101 additions and 16 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2006-08-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* docs/libs/Makefile.am:
|
||||
* docs/libs/gst-plugins-base-libs-sections.txt:
|
||||
* docs/libs/gst-plugins-base-libs.types:
|
||||
Don't try to GObject scan the netbuffer as it's not a GObject.
|
||||
Fixes #351308.
|
||||
|
||||
* gst-libs/gst/netbuffer/gstnetbuffer.c:
|
||||
* gst-libs/gst/netbuffer/gstnetbuffer.h:
|
||||
Document GstNetBuffer.
|
||||
|
||||
2006-08-21 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* tests/check/elements/audioconvert.c: (GST_START_TEST),
|
||||
|
|
|
@ -69,7 +69,6 @@ SCANOBJ_DEPS = \
|
|||
$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/netbuffer/libgstnetbuffer-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
|
||||
$(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la
|
||||
|
|
|
@ -489,6 +489,7 @@ gst_x_overlay_get_type
|
|||
<INCLUDE>gst/netbuffer/gstnetbuffer.h</INCLUDE>
|
||||
GstNetBuffer
|
||||
GstNetType
|
||||
GstNetAddress
|
||||
|
||||
gst_netbuffer_new
|
||||
gst_netaddress_get_ip4_address
|
||||
|
|
|
@ -40,10 +40,6 @@ gst_tuner_norm_get_type
|
|||
gst_x_overlay_get_type
|
||||
|
||||
|
||||
#include <gst/netbuffer/gstnetbuffer.h>
|
||||
gst_netbuffer_get_type
|
||||
|
||||
|
||||
#include <gst/rtp/gstbasertpdepayload.h>
|
||||
gst_base_rtp_depayload_get_type
|
||||
#include <gst/rtp/gstbasertppayload.h>
|
||||
|
|
|
@ -20,6 +20,14 @@
|
|||
/**
|
||||
* SECTION:gstnetbuffer
|
||||
* @short_description: Buffer for use in network sources and sinks
|
||||
*
|
||||
* #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)
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
@ -95,6 +103,13 @@ gst_netbuffer_copy (GstNetBuffer * nbuf)
|
|||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_netbuffer_new:
|
||||
*
|
||||
* Create a new network buffer.
|
||||
*
|
||||
* Returns: a new #GstNetBuffer.
|
||||
*/
|
||||
GstNetBuffer *
|
||||
gst_netbuffer_new (void)
|
||||
{
|
||||
|
@ -105,6 +120,14 @@ gst_netbuffer_new (void)
|
|||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_netaddress_set_ip4_address:
|
||||
* @naddr: a network address
|
||||
* @address: an IPv4 network address.
|
||||
* @port: a port number to set.
|
||||
*
|
||||
* Set @naddr with the IPv4 @address and @port pair.
|
||||
*/
|
||||
void
|
||||
gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
|
||||
guint16 port)
|
||||
|
@ -116,6 +139,14 @@ gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
|
|||
naddr->port = port;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_netaddress_set_ip6_address:
|
||||
* @naddr: a network address
|
||||
* @address: an IPv6 network address.
|
||||
* @port: a port number to set.
|
||||
*
|
||||
* Set @naddr with the IPv6 @address and @port pair.
|
||||
*/
|
||||
void
|
||||
gst_netaddress_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
||||
guint16 port)
|
||||
|
@ -127,7 +158,14 @@ gst_netaddress_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
|||
naddr->port = port;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gst_netaddress_get_net_type:
|
||||
* @naddr: a network address
|
||||
*
|
||||
* Get the type of address stored in @naddr.
|
||||
*
|
||||
* Returns: the network type stored in @naddr.
|
||||
*/
|
||||
GstNetType
|
||||
gst_netaddress_get_net_type (GstNetAddress * naddr)
|
||||
{
|
||||
|
@ -136,6 +174,16 @@ gst_netaddress_get_net_type (GstNetAddress * naddr)
|
|||
return naddr->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_netaddress_get_ip4_address:
|
||||
* @naddr: a network address
|
||||
* @address: a location to store the address.
|
||||
* @port: a location to store the port.
|
||||
*
|
||||
* Get the IPv4 address stored in @naddr into @address.
|
||||
*
|
||||
* Returns: TRUE if the address could be retrieved.
|
||||
*/
|
||||
gboolean
|
||||
gst_netaddress_get_ip4_address (GstNetAddress * naddr, guint32 * address,
|
||||
guint16 * port)
|
||||
|
@ -153,6 +201,16 @@ gst_netaddress_get_ip4_address (GstNetAddress * naddr, guint32 * address,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_netaddress_get_ip6_address:
|
||||
* @naddr: a network address
|
||||
* @address: a location to store the result.
|
||||
* @port: a location to store the port.
|
||||
*
|
||||
* Get the IPv6 address stored in @naddr into @address.
|
||||
*
|
||||
* Returns: TRUE if the address could be retrieved.
|
||||
*/
|
||||
gboolean
|
||||
gst_netaddress_get_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
||||
guint16 * port)
|
||||
|
|
|
@ -26,6 +26,7 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef struct _GstNetBuffer GstNetBuffer;
|
||||
typedef struct _GstNetBufferClass GstNetBufferClass;
|
||||
typedef struct _GstNetAddress GstNetAddress;
|
||||
|
||||
#define GST_TYPE_NETBUFFER (gst_netbuffer_get_type())
|
||||
#define GST_IS_NETBUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NETBUFFER))
|
||||
|
@ -34,9 +35,13 @@ typedef struct _GstNetBufferClass GstNetBufferClass;
|
|||
#define GST_NETBUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_NETBUFFER, GstNetBuffer))
|
||||
#define GST_NETBUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_NETBUFFER, GstNetBufferClass))
|
||||
|
||||
/* buffer for use in network sources and sinks.
|
||||
/**
|
||||
* GstNetType:
|
||||
* @GST_NET_TYPE_UNKNOWN: unknown address type
|
||||
* @GST_NET_TYPE_IP4: an IPv4 address type
|
||||
* @GST_NET_TYPE_IP6: and IPv6 address type
|
||||
*
|
||||
* It contains the source or destination address of the buffer.
|
||||
* The Address type used in #GstNetAddress.
|
||||
*/
|
||||
typedef enum {
|
||||
GST_NET_TYPE_UNKNOWN,
|
||||
|
@ -44,8 +49,13 @@ typedef enum {
|
|||
GST_NET_TYPE_IP6,
|
||||
} GstNetType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/**
|
||||
* GstNetAddress:
|
||||
*
|
||||
* An opaque network address as used in #GstNetBuffer.
|
||||
*/
|
||||
struct _GstNetAddress {
|
||||
/*< private >*/
|
||||
GstNetType type;
|
||||
union {
|
||||
guint8 ip6[16];
|
||||
|
@ -54,8 +64,17 @@ typedef struct
|
|||
guint16 port;
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstNetAddress;
|
||||
};
|
||||
|
||||
/**
|
||||
* GstNetBuffer:
|
||||
* @buffer: the parent #GstBuffer
|
||||
* @from: the address where this buffer came from.
|
||||
* @to: the address where this buffer should go to.
|
||||
*
|
||||
* buffer for use in network sources and sinks.
|
||||
* It contains the source or destination address of the buffer.
|
||||
*/
|
||||
struct _GstNetBuffer {
|
||||
GstBuffer buffer;
|
||||
|
||||
|
@ -79,12 +98,12 @@ GType gst_netbuffer_get_type (void);
|
|||
GstNetBuffer* gst_netbuffer_new (void);
|
||||
|
||||
/* address operations */
|
||||
void gst_netaddress_set_ip4_address (GstNetAddress *nadd, guint32 address, guint16 port);
|
||||
void gst_netaddress_set_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 port);
|
||||
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);
|
||||
|
||||
GstNetType gst_netaddress_get_net_type (GstNetAddress *nadd);
|
||||
gboolean gst_netaddress_get_ip4_address (GstNetAddress *nadd, guint32 *address, guint16 *port);
|
||||
gboolean gst_netaddress_get_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 *port);
|
||||
GstNetType gst_netaddress_get_net_type (GstNetAddress *naddr);
|
||||
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);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue