Add TIZEN_FEATURE_STREAMING define
[platform/core/api/mediademuxer.git] / src / port_gst / mediademuxer_port_gst.c
index 38a3ac8..1cef964 100755 (executable)
@@ -875,7 +875,9 @@ static int _gst_create_pipeline(mdgst_handle_t *gst_handle, char *uri)
        int ret = MD_ERROR_NONE;
        GstBus *bus = NULL;
        char *path = NULL;
+#ifdef TIZEN_FEATURE_STREAMING
        int remote_streaming = 0;
+#endif
        /* Initialize GStreamer */
        /* Note: Replace the arguments of gst_init to pass the command line args to GStreamer. */
        gst_init(NULL, NULL);
@@ -890,9 +892,14 @@ static int _gst_create_pipeline(mdgst_handle_t *gst_handle, char *uri)
 
        /* Create the elements */
        if ((path = strstr(uri, "http://"))) {
+#ifdef TIZEN_FEATURE_STREAMING
                gst_handle->filesrc  = gst_element_factory_make("souphttpsrc", NULL);
                remote_streaming = 1;
                MD_I("Source is http stream. \n");
+#else
+               MD_I("Source is http stream. Didn't support streaming\n");
+               goto ERROR;
+#endif
        } else {
                gst_handle->filesrc = gst_element_factory_make("filesrc", NULL);
                MD_I("Source is file stream \n");
@@ -904,9 +911,11 @@ static int _gst_create_pipeline(mdgst_handle_t *gst_handle, char *uri)
        }
 
        /* Modify the source's properties */
+#ifdef TIZEN_FEATURE_STREAMING
        if (remote_streaming == 1)
                g_object_set(G_OBJECT(gst_handle->filesrc), "location", uri, NULL);
        else
+#endif
                g_object_set(G_OBJECT(gst_handle->filesrc), "location", uri + 7, NULL);
        gst_handle->typefind = gst_element_factory_make("typefind", NULL);
        if (!gst_handle->typefind) {