diff --git a/.gitignore b/.gitignore index dd6862d..9ef78e9 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,6 @@ cmake_install.cmake CMakeCache.txt libmiracle-shared.a install_manifest.txt +.miracle-sink.history +/tags /build/ diff --git a/res/miracle-vlc b/res/miracle-vlc index a4e61c7..d2d18ef 100755 --- a/res/miracle-vlc +++ b/res/miracle-vlc @@ -63,7 +63,7 @@ while getopts "r:d:as:p:h" optname esac done -RUN="vlc rtp://@:$PORT" +RUN="cvlc --no-osd --fullscreen --no-video-title-show --network-caching=50 rtp://@:$PORT" echo "running: $RUN" exec ${RUN} diff --git a/res/run-vlc.sh b/res/run-vlc.sh new file mode 100755 index 0000000..b43ed46 --- /dev/null +++ b/res/run-vlc.sh @@ -0,0 +1,2 @@ +export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=200 rtp://@:7236" letsving +#export DISPLAY=:0 && su -c "cvlc --no-osd --no-video-title-show --network-caching=200 --no-ts-trust-pcr --h264-fps=23 rtp://@:7236" letsving diff --git a/src/ctl/sinkctl.c b/src/ctl/sinkctl.c index cecf667..aa369d8 100644 --- a/src/ctl/sinkctl.c +++ b/src/ctl/sinkctl.c @@ -491,6 +491,7 @@ static void spawn_gst(struct ctl_sink *s) } } + void launch_player(struct ctl_sink *s) { char *argv[64]; char resolution[64]; @@ -576,9 +577,28 @@ void launch_uibc_daemon(int port) { static void kill_gst(void) { + char *argv[64]; + int i = 0, vlc_pid = 0; + if (sink_pid <= 0) return; + cli_debug("killing vlc [start]"); + char *command = "pgrep vlc"; + cli_debug("killing vlc [using command : pgrep vlc]"); + FILE* file = popen(command, "r"); + cli_debug("killing vlc [opening file]"); + + while (fscanf(file, "%d", &vlc_pid) != EOF) { + cli_debug("killing vlc [pid : %d]", vlc_pid); + kill(vlc_pid, SIGTERM); + cli_debug("killed vlc [pid : %d]", vlc_pid); + } + + pclose(file); + cli_debug(" Closed file, kill [end]"); + + cli_debug("killing pid : %d", sink_pid); kill(sink_pid, SIGTERM); sink_pid = 0; } @@ -597,6 +617,9 @@ void ctl_fn_sink_disconnected(struct ctl_sink *s) } else { cli_notice("SINK disconnected"); sink_connected = false; + cli_notice("Killing Player..."); + kill_gst(); + cli_notice("Killed Player"); } } diff --git a/src/wifi/wifid-supplicant.c b/src/wifi/wifid-supplicant.c index 9d8ef91..ba3a3c5 100644 --- a/src/wifi/wifid-supplicant.c +++ b/src/wifi/wifid-supplicant.c @@ -2629,6 +2629,10 @@ 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" "# End of configuration\n", s->l->friendly_name ?: "unknown", "1-0050F204-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;