media_streamer_test: Fix bug related to custom nodes test 80/255980/1
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 26 Mar 2021 01:28:13 +0000 (10:28 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 26 Mar 2021 01:31:21 +0000 (10:31 +0900)
Creating nodes for the test was missing. Now it is added.
_create_app_test() is renamed to _create_custom_nodes().

[Version] 0.1.135
[Issue type] Test application

Change-Id: Iee9db7ac32859c3a1b789f18750d967cf7016ebb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-streamer.spec
test/media_streamer_test.c

index 0afe97f..bc5b87e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamer
 Summary:    A Media Streamer API
-Version:    0.1.134
+Version:    0.1.135
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 4282f21..baf0aea 100644 (file)
@@ -1664,32 +1664,26 @@ static void eos_cb(media_streamer_node_h node, void *user_data)
        g_print("Got EOS cb from appsink\n");
 }
 
-static void _create_app_test(void)
+static void _create_custom_nodes(void)
 {
-       g_print("== _create_appsrc \n");
+       g_print("\n _create_custom_nodes \n");
 
-       /* ********************** app_src *********************************** */
        media_streamer_node_h app_src = NULL;
        media_streamer_node_create_src(MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM, &app_src);
        media_streamer_node_add(current_media_streamer, app_src);
        APPEND_NODE(app_src);
 
-       /* ********************** app_sink *********************************** */
        media_streamer_node_h app_sink = NULL;
        media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM, &app_sink);
        media_streamer_node_set_pad_format(app_sink, "sink", vfmt_i420);
        media_streamer_node_add(current_media_streamer, app_sink);
        APPEND_NODE(app_sink);
 
-       /*====================Linking ======================================== */
        media_streamer_node_link(app_src, "src", app_sink, "sink");
-       /*====================================================================== */
 
        media_streamer_src_set_buffer_status_cb(app_src, buffer_status_cb, NULL);
        media_streamer_sink_set_data_ready_cb(app_sink, new_buffer_cb, NULL);
        media_streamer_sink_set_eos_cb(app_sink, eos_cb, NULL);
-
-       g_print("== success appsrc part \n");
 }
 
 /***************************************************************/
@@ -2189,7 +2183,7 @@ void run_playing_preset(void)
        else if (g_scenario_mode == SCENARIO_MODE_HTTP_VIDEO_AUDIO)
                _create_http_playing();
        else if ((g_scenario_mode == SCENARIO_MODE_APPSRC_APPSINK))
-               _create_app_test();
+               _create_custom_nodes();
        else
                g_print("Invalid playing menu preset was selected!");
 }
@@ -2353,6 +2347,7 @@ void _interpret_static_link_playing_scenario_menu(char *cmd)
        if (len == 1) {
                if (!strncmp(cmd, "1", len)) {
                        g_scenario_mode = SCENARIO_MODE_APPSRC_APPSINK;
+                       run_playing_preset();
                } else if (!strncmp(cmd, "2", len)) {
                        g_scenario_mode = SCENARIO_MODE_FILE_PLAY_AAC_AUDIO;
                        g_sub_menu_state = SUBMENU_STATE_GETTING_FILE_URI;