1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Merge pull request #1 from iroh-eh/temp

modified wifi supplicant for windows 10
This commit is contained in:
AnuragIroh 2023-09-21 16:32:43 +05:30 committed by GitHub
commit 1bac2c0dfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 2 deletions

2
.gitignore vendored
View file

@ -41,4 +41,6 @@ cmake_install.cmake
CMakeCache.txt
libmiracle-shared.a
install_manifest.txt
.miracle-sink.history
/tags
/build/

View file

@ -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}

2
res/run-vlc.sh Executable file
View file

@ -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

View file

@ -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");
}
}

View file

@ -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",

View file

@ -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;