static GstElement * kms_recorder_endpoint_get_sink_fallback (KmsRecorderEndpoint * self) { GstElement *sink = NULL; gchar *prot; prot = gst_uri_get_protocol (KMS_URI_ENDPOINT (self)->uri); if ((g_strcmp0 (prot, HTTP_PROTO) == 0) || (g_strcmp0 (prot, HTTPS_PROTO) == 0)) { if (kms_is_valid_uri (KMS_URI_ENDPOINT (self)->uri)) { /* We use souphttpclientsink */ sink = gst_element_factory_make ("curlhttpsink", NULL); g_object_set (sink, "blocksize", MEGA_BYTES (1), "qos", FALSE, "async", FALSE, NULL); } else { GST_ERROR ("URL not valid"); } } g_free (prot); /* Add more if required */ return sink; }
static GstElement * kms_recorder_end_point_get_sink_fallback (KmsRecorderEndPoint * self) { GstElement *sink = NULL; gchar *prot; prot = gst_uri_get_protocol (KMS_URI_END_POINT (self)->uri); if ((g_strcmp0 (prot, HTTP_PROTO) == 0) || (g_strcmp0 (prot, HTTPS_PROTO) == 0)) { SoupSession *ss; if (kms_is_valid_uri (KMS_URI_END_POINT (self)->uri)) { /* We use souphttpclientsink */ sink = gst_element_factory_make ("souphttpclientsink", NULL); g_object_set (sink, "blocksize", MEGA_BYTES (1), NULL); ss = soup_session_new_with_options ("timeout", HTTP_TIMEOUT, "ssl-strict", FALSE, NULL); g_object_set (G_OBJECT (sink), "session", ss, NULL); } else { GST_ERROR ("URL not valid"); } } /* Add more if required */ return sink; }