rtsp: add GType for transport flags
Make a method to register the transport flags as a GType.
This commit is contained in:
parent
58a92964c6
commit
6e8ed14a9d
@ -44,6 +44,7 @@
|
|||||||
#define __GST_RTSP_DEFS_H__
|
#define __GST_RTSP_DEFS_H__
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -117,6 +117,26 @@ static const RTSPLTransMap ltrans[] = {
|
|||||||
{NULL, GST_RTSP_LOWER_TRANS_UNKNOWN}
|
{NULL, GST_RTSP_LOWER_TRANS_UNKNOWN}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_rtsp_lower_trans_get_type (void)
|
||||||
|
{
|
||||||
|
static GType rtsp_lower_trans_type = 0;
|
||||||
|
static const GFlagsValue rtsp_lower_trans[] = {
|
||||||
|
{GST_RTSP_LOWER_TRANS_UDP, "UDP Unicast Mode", "udp-unicast"},
|
||||||
|
{GST_RTSP_LOWER_TRANS_UDP_MCAST, "UDP Multicast Mode", "udp-multicast"},
|
||||||
|
{GST_RTSP_LOWER_TRANS_TCP, "TCP interleaved mode", "tcp"},
|
||||||
|
{GST_RTSP_LOWER_TRANS_HTTP, "HTTP tunneled mode", "http"},
|
||||||
|
{0, NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!rtsp_lower_trans_type) {
|
||||||
|
rtsp_lower_trans_type =
|
||||||
|
g_flags_register_static ("GstRTSPLowerTrans", rtsp_lower_trans);
|
||||||
|
}
|
||||||
|
return rtsp_lower_trans_type;
|
||||||
|
}
|
||||||
|
|
||||||
#define RTSP_TRANSPORT_PARAMETER_IS_UNIQUE(param) \
|
#define RTSP_TRANSPORT_PARAMETER_IS_UNIQUE(param) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if ((transport_params & (param)) != 0) \
|
if ((transport_params & (param)) != 0) \
|
||||||
|
@ -93,6 +93,9 @@ typedef enum {
|
|||||||
GST_RTSP_LOWER_TRANS_HTTP = (1 << 4)
|
GST_RTSP_LOWER_TRANS_HTTP = (1 << 4)
|
||||||
} GstRTSPLowerTrans;
|
} GstRTSPLowerTrans;
|
||||||
|
|
||||||
|
#define GST_TYPE_RTSP_LOWER_TRANS (gst_rtsp_lower_trans_get_type())
|
||||||
|
GType gst_rtsp_lower_trans_get_type (void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstRTSPRange:
|
* GstRTSPRange:
|
||||||
* @min: minimum value of the range
|
* @min: minimum value of the range
|
||||||
|
Loading…
x
Reference in New Issue
Block a user