Revert "node-manager: adding node support for pactl" 07/113907/1 accepted/tizen/3.0/common/20170213.160809 accepted/tizen/3.0/ivi/20170213.035331 accepted/tizen/3.0/mobile/20170213.035204 accepted/tizen/3.0/tv/20170213.035252 accepted/tizen/3.0/wearable/20170213.035315 submit/tizen_3.0/20170210.094941
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 9 Feb 2017 08:18:59 +0000 (17:18 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 9 Feb 2017 08:29:07 +0000 (17:29 +0900)
This reverts commit 4400addd3f276c78630e9e8f6a21ad69292e8f34.

Conflicts:

src/utils/pactl.c

Change-Id: Iff65550ce5718452647b8e6f5385c4b28f5d1645

src/utils/pactl.c

index 489a8e0..e25cf72 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <pulse/pulseaudio.h>
 #include <pulse/ext-device-restore.h>
-#include <pulse/ext-node-manager.h>
 
 #include <pulsecore/i18n.h>
 #include <pulsecore/macro.h>
@@ -98,10 +97,6 @@ static int actions = 0;
 
 static bool nl = false;
 
-static uint32_t src_node_id;
-static uint32_t dst_node_id;
-static uint32_t conn_id;
-
 static enum {
     NONE,
     EXIT,
@@ -132,9 +127,7 @@ static enum {
     SET_SOURCE_OUTPUT_MUTE,
     SET_SINK_FORMATS,
     SET_PORT_LATENCY_OFFSET,
-    SUBSCRIBE,
-    NODE_CONNECT,
-    NODE_DISCONNECT
+    SUBSCRIBE
 } action = NONE;
 
 static void quit(int ret) {
@@ -1014,30 +1007,6 @@ static void source_output_toggle_mute_callback(pa_context *c, const pa_source_ou
     pa_operation_unref(pa_context_set_source_output_mute(c, o->index, !o->mute, simple_callback, NULL));
 }
 
-static void node_list_callback(pa_context *c,
-                const pa_ext_node_manager_info *info,
-                int eol,
-                void *userdata) {
-
-    if (!eol) {
-        const char *node_id = pa_proplist_gets(info->props, "index");
-        if (node_id != NULL) {
-            printf("Node #%s (%s)\n", node_id, info->name);
-            printf("%s\n", pa_proplist_to_string(info->props));
-        }
-    } else
-        complete_action();
-}
-
-static void node_connect_callback(pa_context *c,
-                uint32_t conne_id,
-                void *userdata) {
-
-    printf("New connection id: %d\n", conne_id);
-
-    complete_action();
-}
-
 /* PA_MAX_FORMATS is defined in internal.h so we just define a sane value here */
 #define MAX_FORMATS 256
 
@@ -1457,20 +1426,6 @@ static void context_state_callback(pa_context *c, void *userdata) {
                                              NULL);
                     break;
 
-                case NODE_CONNECT:
-                    pa_operation_unref(pa_ext_node_manager_connect_nodes(c,
-                                       src_node_id,
-                                       dst_node_id,
-                                       node_connect_callback,
-                                       NULL));
-                    break;
-
-                case NODE_DISCONNECT:
-                    pa_operation_unref(pa_ext_node_manager_disconnect_nodes(c, conn_id,
-                                       simple_callback,
-                                       NULL));
-                    break;
-
                 default:
                     pa_assert_not_reached();
             }
@@ -1602,9 +1557,6 @@ static void help(const char *argv0) {
     printf("%s %s %s\n",    argv0, _("[options]"), "subscribe");
     printf(_("\nThe special names @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@\n"
              "can be used to specify the default sink, source and monitor.\n"));
-    printf("%s %s %s\n",    argv0, _("[options]"), "node-list ");
-    printf("%s %s %s %s %s\n", argv0, _("[options]"), "node-connect ", _("#N"), _("#N"));
-    printf("%s %s %s %s\n", argv0, _("[options]"), "node-disconnect ", _("#N"));
 
     printf(_("\n"
              "  -h, --help                            Show this help\n"
@@ -1701,7 +1653,7 @@ int main(int argc, char *argv[]) {
                 if (pa_streq(argv[i], "modules") || pa_streq(argv[i], "clients") ||
                     pa_streq(argv[i], "sinks")   || pa_streq(argv[i], "sink-inputs") ||
                     pa_streq(argv[i], "sources") || pa_streq(argv[i], "source-outputs") ||
-                    pa_streq(argv[i], "samples") || pa_streq(argv[i], "cards") || pa_streq(argv[i], "nodes")) {
+                    pa_streq(argv[i], "samples") || pa_streq(argv[i], "cards")) {
                     list_type = pa_xstrdup(argv[i]);
                 } else if (pa_streq(argv[i], "short")) {
                     short_list_format = true;
@@ -2070,27 +2022,6 @@ int main(int argc, char *argv[]) {
                 pa_log(_("Could not parse latency offset"));
                 goto quit;
             }
-
-        } else if (pa_streq(argv[optind], "node-connect")) {
-            action = NODE_CONNECT;
-
-            if (argc != optind+3) {
-                pa_log(_("You have to specify a source and destination node indexes"));
-                goto quit;
-            }
-
-            src_node_id = (uint32_t) atoi(argv[optind+1]);
-            dst_node_id = (uint32_t) atoi(argv[optind+2]);
-
-        } else if (pa_streq(argv[optind], "node-disconnect")) {
-            action = NODE_DISCONNECT;
-
-            if (argc != optind+2) {
-                pa_log(_("You have to specify a connection id"));
-                goto quit;
-            }
-
-            conn_id = (uint32_t) atoi(argv[optind+1]);
         } else if (pa_streq(argv[optind], "help")) {
             help(bn);
             ret = 0;