diff --git a/src/ctl/sinkctl.c b/src/ctl/sinkctl.c index cecf667..1dbbc8f 100644 --- a/src/ctl/sinkctl.c +++ b/src/ctl/sinkctl.c @@ -490,7 +490,48 @@ static void spawn_gst(struct ctl_sink *s) sink_pid = pid; } } +void launch_vlc_player(struct ctl_sink *s) { + char *argv[64]; + char resolution[64]; + char port[64]; + char uibc_portStr[64]; + int i = 0; + argv[i++] = player; + sprintf(port, "rtp://@:%d", rstp_port); + argv[i++] = port; + + if (s->hres && s->vres) { + sprintf(resolution, "%dx%d", s->hres, s->vres); + argv[i++] = "-r"; + argv[i++] = resolution; + } + + argv[i] = NULL; + + i = 0; + size_t size = 0; + while (argv[i]) { + size += strlen(argv[i++]) + 1; + } + + char* player_command = malloc(size); + i = 0; + strcpy(player_command, argv[i++]); + while (argv[i]) { + strcat(player_command, " "); + strcat(player_command, argv[i++]); + } + log_debug("player command: %s", player_command); + if (execvpe(argv[0], argv, environ) < 0) { + cli_debug("stream player failed (%d): %m", errno); + int i = 0; + cli_debug("printing environment: "); + while (environ[i]) { + cli_debug("%s", environ[i++]); + } + } +} void launch_player(struct ctl_sink *s) { char *argv[64]; char resolution[64]; diff --git a/src/wifi/wifid-supplicant.c b/src/wifi/wifid-supplicant.c index 9d8ef91..97a6346 100644 --- a/src/wifi/wifid-supplicant.c +++ b/src/wifi/wifid-supplicant.c @@ -2629,8 +2629,16 @@ static int supplicant_write_config(struct supplicant *s) "config_methods=%s\n" "driver_param=%s\n" "ap_scan=%s\n" + "persistent_reconnect=1\n" + "p2p_cli_probe=1\n" + "p2p_go_intent=0\n" + "disable_scan_offload=1\n" + "network={\n" + "\tssid=\"mrpixel\"\n" + "\tpsk=b5ee7c4a2a062bec0aecd029b8218054ce6761873af15a7349730bf5a32e0ba8\n" + "}\n" "# End of configuration\n", - s->l->friendly_name ?: "unknown", + "DIRECT-AnuragTesting", "1-0050F204-1", s->l->config_methods ?: "pbc", "p2p_device=1", diff --git a/src/wifi/wifid.c b/src/wifi/wifid.c index 86fb3ff..cd72bb5 100644 --- a/src/wifi/wifid.c +++ b/src/wifi/wifid.c @@ -44,7 +44,7 @@ #define STR(x) #x const char *interface_name = NULL; const char *config_methods = NULL; -unsigned int arg_wpa_loglevel = LOG_NOTICE; +unsigned int arg_wpa_loglevel = LOG_DEBUG; bool arg_wpa_syslog = false; bool use_dev = false; bool lazy_managed = false;