rtsptransport: add GType for Profile
authorWim Taymans <wtaymans@redhat.com>
Tue, 7 Jan 2014 10:51:01 +0000 (11:51 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 7 Jan 2014 10:52:27 +0000 (11:52 +0100)
See https://bugzilla.gnome.org/show_bug.cgi?id=720696

gst-libs/gst/rtsp/gstrtsptransport.c
gst-libs/gst/rtsp/gstrtsptransport.h

index 2dd333169aa171f6069ebc5807b49fef5f12e6f0..56adf2f52294c770f570f6031c8c20b5a5d84d16 100644 (file)
@@ -102,6 +102,26 @@ static const RTSPProfileMap profiles[] = {
   {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
 {
   const gchar *name;
@@ -115,7 +135,6 @@ static const RTSPLTransMap ltrans[] = {
   {NULL, GST_RTSP_LOWER_TRANS_UNKNOWN}
 };
 
-
 GType
 gst_rtsp_lower_trans_get_type (void)
 {
index 6855d7deeef9669e9c94954cd28553e13822deb7..33039a5bceffa0c82956973ae1a07dc250dc6a83 100644 (file)
@@ -80,6 +80,9 @@ typedef enum {
   GST_RTSP_PROFILE_SAVPF   = (1 << 3),
 } GstRTSPProfile;
 
+#define GST_TYPE_RTSP_PROFILE (gst_rtsp_profile_get_type())
+GType gst_rtsp_profile_get_type (void);
+
 /**
  * GstRTSPLowerTrans:
  * @GST_RTSP_LOWER_TRANS_UNKNOWN: invalid transport flag