FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.53k stars 78 forks source link

Add Development Casting Support to UxPlay #282

Closed GenghisKhanDrip closed 5 months ago

GenghisKhanDrip commented 5 months ago

These changes allow UxPlay to implement video casting into its server, and contains the ability to parse URLs sent by the client for information. Still needed:

fduncanh commented 4 months ago

there is a bug in your casting.c @GenghisKhanDrip

   char protocol[length];
        strncpy(protocol, cast->playback_location, length);

        printf("Result: %s\n", protocol);
        char* hostname1 = "localhost:";
        char* hostname = malloc(strlen(hostname1) + strlen(cast->port));
        strcpy(hostname, hostname1);
        concatenate_string(hostname, cast->port);
        str_replace(cast->playback_location, protocol, "http");
        str_replace(cast->playback_location, "127.0.0.1", hostname);
        str_replace(cast->playback_location, "localhost", hostname);
        printf("String is %s\n", cast->playback_location);

the printf result shows that this does NOT replace "mlhls" by "http" in playback_location

fduncanh commented 4 months ago

fixed your bug. see latest commit here.