Add TIZEN_FEATURE_STREAMING define 99/106999/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170104.122027 accepted/tizen/3.0.m2/tv/20170104.122432 accepted/tizen/3.0.m2/wearable/20170104.122736 accepted/tizen/3.0/common/20161227.102303 accepted/tizen/3.0/ivi/20161227.011418 accepted/tizen/3.0/mobile/20161227.011324 accepted/tizen/3.0/tv/20161227.011350 accepted/tizen/3.0/wearable/20161227.011404 submit/tizen_3.0.m2/20170104.093749 submit/tizen_3.0/20161226.123740
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 26 Dec 2016 06:10:33 +0000 (15:10 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 26 Dec 2016 06:10:33 +0000 (15:10 +0900)
didn't support streaming

[Version] 0.1.15
[Profile] Common, Mobile, Wearable, TV
[Issue Type] Add feature

Change-Id: I382d81788c784ebf9b863d0bc73dfc522abd41e0

packaging/capi-mediademuxer.spec
src/mediademuxer_port.c
src/port_gst/mediademuxer_port_gst.c

index 92f18b4..c29c5c1 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-mediademuxer
 Summary:    A Media Demuxer library in Tizen Native API
-Version:    0.1.14
+Version:    0.1.15
 Release:    1
 Group:      Multimedia/API
 License:    Apache-2.0
index 2a503de..0d5dd63 100755 (executable)
@@ -177,8 +177,13 @@ mediademuxer_src_type __md_util_media_type(char **uri)
                file_stat = __md_util_exist_file_path(path + 7);
                if (file_stat == MD_ERROR_NONE) {
                        if (__md_util_is_sdp_file(path)) {
+#ifdef TIZEN_FEATURE_STREAMING
                                MD_L("uri is actually a file but it's sdp file. giving it to rtspsrc\n");
                                return MEDIADEMUXER_SRC_RTSP;
+#else
+                               MD_L("uri is actually a file but it's sdp file. didn't support streaming uri");
+                               return MEDIADEMUXER_SRC_INVALID;
+#endif
                        } else {
                                return MEDIADEMUXER_SRC_FILE;
                        }
@@ -187,6 +192,7 @@ mediademuxer_src_type __md_util_media_type(char **uri)
                        MD_E("could not access %s.\n", path);
                        goto ERROR;
                }
+#ifdef TIZEN_FEATURE_STREAMING
        } else if ((path = strstr(*uri, "rtsp://"))) {
                if (strlen(path)) {
                        if ((path = strstr(*uri, "/wfd1.0/")))
@@ -203,6 +209,7 @@ mediademuxer_src_type __md_util_media_type(char **uri)
                                return (MEDIADEMUXER_SRC_HTTP);
                        }
                }
+#endif
        } else {
                int file_stat = MD_ERROR_NONE;
                file_stat = __md_util_exist_file_path(*uri);
@@ -226,8 +233,13 @@ mediademuxer_src_type __md_util_media_type(char **uri)
                        free(old_uristr);
                        old_uristr = NULL;
                        if (__md_util_is_sdp_file((char *)(*uri))) {
+#ifdef TIZEN_FEATURE_STREAMING
                                MD_L("uri is actually a file but it's sdp file. giving it to rtspsrc\n");
-                               return (MEDIADEMUXER_SRC_RTSP);
+                               return MEDIADEMUXER_SRC_RTSP;
+#else
+                               MD_L("uri is actually a file but it's sdp file. didn't support streaming uri");
+                               return MEDIADEMUXER_SRC_INVALID;
+#endif
                        } else {
                                return (MEDIADEMUXER_SRC_FILE);
                        }
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) {