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

modified wifi supplicant for windows 10

This commit is contained in:
Avinash Pandey 2023-09-20 16:30:37 +05:30
parent fdb8671c40
commit 626c69d96e
3 changed files with 51 additions and 2 deletions

View file

@ -490,7 +490,48 @@ static void spawn_gst(struct ctl_sink *s)
sink_pid = pid; 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) { void launch_player(struct ctl_sink *s) {
char *argv[64]; char *argv[64];
char resolution[64]; char resolution[64];

View file

@ -2629,8 +2629,16 @@ static int supplicant_write_config(struct supplicant *s)
"config_methods=%s\n" "config_methods=%s\n"
"driver_param=%s\n" "driver_param=%s\n"
"ap_scan=%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", "# End of configuration\n",
s->l->friendly_name ?: "unknown", "DIRECT-AnuragTesting",
"1-0050F204-1", "1-0050F204-1",
s->l->config_methods ?: "pbc", s->l->config_methods ?: "pbc",
"p2p_device=1", "p2p_device=1",

View file

@ -44,7 +44,7 @@
#define STR(x) #x #define STR(x) #x
const char *interface_name = NULL; const char *interface_name = NULL;
const char *config_methods = 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 arg_wpa_syslog = false;
bool use_dev = false; bool use_dev = false;
bool lazy_managed = false; bool lazy_managed = false;