rtsp: Use glib-mkenums to generate GstRTSPProfile and GstRTSPLowerTrans GTypes
This commit is contained in:
parent
0a3b584aa0
commit
1a1d8a0b61
@ -42,7 +42,7 @@ CLEANFILES = $(BUILT_SOURCES)
|
|||||||
|
|
||||||
glib_gen_prefix = __gst_rtsp
|
glib_gen_prefix = __gst_rtsp
|
||||||
glib_enum_define = gst_rtsp
|
glib_enum_define = gst_rtsp
|
||||||
glib_enum_headers = gstrtspdefs.h
|
glib_enum_headers = $(libgstrtspinclude_HEADERS)
|
||||||
glib_gen_basename = gstrtsp
|
glib_gen_basename = gstrtsp
|
||||||
|
|
||||||
include $(top_srcdir)/common/gst-glib-gen.mak
|
include $(top_srcdir)/common/gst-glib-gen.mak
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "gstrtsptransport.h"
|
#include "gstrtsptransport.h"
|
||||||
|
#include "gstrtsp-enumtypes.h"
|
||||||
|
|
||||||
#define MAX_MANAGERS 2
|
#define MAX_MANAGERS 2
|
||||||
|
|
||||||
@ -118,26 +119,6 @@ static const RTSPProfileMap profiles[] = {
|
|||||||
{NULL, GST_RTSP_PROFILE_UNKNOWN}
|
{NULL, GST_RTSP_PROFILE_UNKNOWN}
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
|
||||||
gst_rtsp_profile_get_type (void)
|
|
||||||
{
|
|
||||||
static volatile gsize rtsp_profile_type = 0;
|
|
||||||
static const GFlagsValue rtsp_profile[] = {
|
|
||||||
{GST_RTSP_PROFILE_AVP, "GST_RTSP_PROFILE_AVP", "avp"},
|
|
||||||
{GST_RTSP_PROFILE_SAVP, "GST_RTSP_PROFILE_SAVP", "savp"},
|
|
||||||
{GST_RTSP_PROFILE_AVPF, "GST_RTSP_PROFILE_AVPF", "avpf"},
|
|
||||||
{GST_RTSP_PROFILE_SAVPF, "GST_RTSP_PROFILE_SAVPF", "savpf"},
|
|
||||||
{0, NULL, NULL},
|
|
||||||
};
|
|
||||||
|
|
||||||
if (g_once_init_enter (&rtsp_profile_type)) {
|
|
||||||
GType tmp = g_flags_register_static ("GstRTSPProfile", rtsp_profile);
|
|
||||||
g_once_init_leave (&rtsp_profile_type, tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (GType) rtsp_profile_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
@ -151,28 +132,6 @@ 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 volatile gsize rtsp_lower_trans_type = 0;
|
|
||||||
static const GFlagsValue rtsp_lower_trans[] = {
|
|
||||||
{GST_RTSP_LOWER_TRANS_UDP, "GST_RTSP_LOWER_TRANS_UDP", "udp-unicast"},
|
|
||||||
{GST_RTSP_LOWER_TRANS_UDP_MCAST, "GST_RTSP_LOWER_TRANS_UDP_MCAST",
|
|
||||||
"udp-multicast"},
|
|
||||||
{GST_RTSP_LOWER_TRANS_TCP, "GST_RTSP_LOWER_TRANS_TCP", "tcp"},
|
|
||||||
{GST_RTSP_LOWER_TRANS_HTTP, "GST_RTSP_LOWER_TRANS_HTTP", "http"},
|
|
||||||
{GST_RTSP_LOWER_TRANS_TLS, "GST_RTSP_LOWER_TRANS_TLS", "tls"},
|
|
||||||
{0, NULL, NULL},
|
|
||||||
};
|
|
||||||
|
|
||||||
if (g_once_init_enter (&rtsp_lower_trans_type)) {
|
|
||||||
GType tmp = g_flags_register_static ("GstRTSPLowerTrans", rtsp_lower_trans);
|
|
||||||
g_once_init_leave (&rtsp_lower_trans_type, tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (GType) 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) \
|
||||||
|
@ -80,9 +80,6 @@ typedef enum {
|
|||||||
GST_RTSP_PROFILE_SAVPF = (1 << 3),
|
GST_RTSP_PROFILE_SAVPF = (1 << 3),
|
||||||
} GstRTSPProfile;
|
} GstRTSPProfile;
|
||||||
|
|
||||||
#define GST_TYPE_RTSP_PROFILE (gst_rtsp_profile_get_type())
|
|
||||||
GType gst_rtsp_profile_get_type (void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstRTSPLowerTrans:
|
* GstRTSPLowerTrans:
|
||||||
* @GST_RTSP_LOWER_TRANS_UNKNOWN: invalid transport flag
|
* @GST_RTSP_LOWER_TRANS_UNKNOWN: invalid transport flag
|
||||||
@ -103,9 +100,6 @@ typedef enum {
|
|||||||
GST_RTSP_LOWER_TRANS_TLS = (1 << 5)
|
GST_RTSP_LOWER_TRANS_TLS = (1 << 5)
|
||||||
} GstRTSPLowerTrans;
|
} GstRTSPLowerTrans;
|
||||||
|
|
||||||
#define GST_TYPE_RTSP_LOWER_TRANS (gst_rtsp_lower_trans_get_type())
|
|
||||||
GType gst_rtsp_lower_trans_get_type (void);
|
|
||||||
|
|
||||||
typedef struct _GstRTSPRange GstRTSPRange;
|
typedef struct _GstRTSPRange GstRTSPRange;
|
||||||
typedef struct _GstRTSPTransport GstRTSPTransport;
|
typedef struct _GstRTSPTransport GstRTSPTransport;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user