rtsp-client: don't use g_object_unref on GstRTSPSessionMedia
[platform/upstream/gstreamer.git] / gst / rtsp-server / rtsp-media-factory-uri.c
index 2d38eea..c544449 100644 (file)
@@ -34,13 +34,10 @@ enum
 
 
 #define RAW_VIDEO_CAPS \
-    "video/x-raw-yuv; " \
-    "video/x-raw-rgb; " \
-    "video/x-raw-gray"
+    "video/x-raw"
 
 #define RAW_AUDIO_CAPS \
-    "audio/x-raw-int; " \
-    "audio/x-raw-float"
+    "audio/x-raw"
 
 static GstStaticCaps raw_video_caps = GST_STATIC_CAPS (RAW_VIDEO_CAPS);
 static GstStaticCaps raw_audio_caps = GST_STATIC_CAPS (RAW_AUDIO_CAPS);
@@ -124,7 +121,6 @@ typedef struct
 static gboolean
 payloader_filter (GstPluginFeature * feature, FilterData * data)
 {
-  gboolean res;
   const gchar *klass;
   GstElementFactory *fact;
   GList **list = NULL;
@@ -166,7 +162,7 @@ gst_rtsp_media_factory_uri_init (GstRTSPMediaFactoryURI * factory)
   factory->use_gstpay = DEFAULT_USE_GSTPAY;
 
   /* get the feature list using the filter */
-  gst_default_registry_feature_filter ((GstPluginFeatureFilter)
+  gst_registry_feature_filter (gst_registry_get (), (GstPluginFeatureFilter)
       payloader_filter, FALSE, &data);
   /* sort */
   factory->demuxers =
@@ -293,7 +289,7 @@ gst_rtsp_media_factory_uri_get_uri (GstRTSPMediaFactoryURI * factory)
 static GstElementFactory *
 find_payloader (GstRTSPMediaFactoryURI * urifact, GstCaps * caps)
 {
-  GList *list, *tmp;
+  GList *list;
   GstElementFactory *factory = NULL;
 
   /* first find a demuxer that can link */
@@ -340,10 +336,8 @@ static gboolean
 autoplug_continue_cb (GstElement * uribin, GstPad * pad, GstCaps * caps,
     GstElement * element)
 {
-  GList *list, *tmp;
   FactoryData *data;
   GstElementFactory *factory;
-  gboolean res;
 
   GST_DEBUG ("found pad %s:%s of caps %" GST_PTR_FORMAT,
       GST_DEBUG_PAD_NAME (pad), caps);
@@ -394,13 +388,13 @@ pad_added_cb (GstElement * uribin, GstPad * pad, GstElement * element)
 
   /* get pad caps first, then call get_caps, then fail */
   if ((caps = gst_pad_get_current_caps (pad)) == NULL)
-    if ((caps = gst_pad_get_caps (pad, NULL)) == NULL)
+    if ((caps = gst_pad_query_caps (pad, NULL)) == NULL)
       goto no_caps;
 
   /* check for raw caps */
   if (gst_caps_can_intersect (caps, urifact->raw_vcaps)) {
     /* we have raw video caps, insert converter */
-    convert = gst_element_factory_make ("ffmpegcolorspace", NULL);
+    convert = gst_element_factory_make ("videoconvert", NULL);
   } else if (gst_caps_can_intersect (caps, urifact->raw_acaps)) {
     /* we have raw audio caps, insert converter */
     convert = gst_element_factory_make ("audioconvert", NULL);
@@ -422,7 +416,7 @@ pad_added_cb (GstElement * uribin, GstPad * pad, GstElement * element)
     /* continue with new pad and caps */
     pad = gst_element_get_static_pad (convert, "src");
     if ((caps = gst_pad_get_current_caps (pad)) == NULL)
-      if ((caps = gst_pad_get_caps (pad, NULL)) == NULL)
+      if ((caps = gst_pad_query_caps (pad, NULL)) == NULL)
         goto no_caps;
   }