mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-15 00:34:05 +09:00
fix for issue #496 (switch from mirror mode to hls)
This commit is contained in:
@@ -179,6 +179,7 @@ http_handler_set_property(raop_conn_t *conn,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
||||||
|
assert(airplay_video);
|
||||||
if (!strcmp(property, "selectedMediaArray")) {
|
if (!strcmp(property, "selectedMediaArray")) {
|
||||||
/* verify that this request contains a binary plist*/
|
/* verify that this request contains a binary plist*/
|
||||||
char *header_str = NULL;
|
char *header_str = NULL;
|
||||||
@@ -467,6 +468,7 @@ http_handler_action(raop_conn_t *conn, http_request_t *request, http_response_t
|
|||||||
|
|
||||||
raop_t *raop = conn->raop;
|
raop_t *raop = conn->raop;
|
||||||
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
||||||
|
assert(airplay_video);
|
||||||
bool data_is_plist = false;
|
bool data_is_plist = false;
|
||||||
plist_t req_root_node = NULL;
|
plist_t req_root_node = NULL;
|
||||||
uint64_t uint_val = 0;
|
uint64_t uint_val = 0;
|
||||||
@@ -964,6 +966,7 @@ http_handler_hls(raop_conn_t *conn, http_request_t *request, http_response_t *r
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
airplay_video_t *airplay_video = (airplay_video_t *) hls_get_current_video(raop);
|
||||||
|
assert(airplay_video);
|
||||||
if (!strcmp(url, "/master.m3u8")){
|
if (!strcmp(url, "/master.m3u8")){
|
||||||
char * master_playlist = get_master_playlist(airplay_video);
|
char * master_playlist = get_master_playlist(airplay_video);
|
||||||
if (master_playlist) {
|
if (master_playlist) {
|
||||||
|
|||||||
@@ -946,6 +946,7 @@ raop_handler_setup(raop_conn_t *conn,
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 110: {
|
case 110: {
|
||||||
// Mirroring
|
// Mirroring
|
||||||
|
raop_destroy_airplay_video(raop, -1); //cleanup any hls data still present when mirror video starts
|
||||||
unsigned short dport = raop->mirror_data_lport;
|
unsigned short dport = raop->mirror_data_lport;
|
||||||
plist_t stream_id_node = plist_dict_get_item(req_stream_node, "streamConnectionID");
|
plist_t stream_id_node = plist_dict_get_item(req_stream_node, "streamConnectionID");
|
||||||
uint64_t stream_connection_id = 0;
|
uint64_t stream_connection_id = 0;
|
||||||
|
|||||||
@@ -3225,7 +3225,6 @@ int main (int argc, char *argv[]) {
|
|||||||
if (use_video && (close_window || preserve_connections)) {
|
if (use_video && (close_window || preserve_connections)) {
|
||||||
video_renderer_destroy();
|
video_renderer_destroy();
|
||||||
if (!preserve_connections) {
|
if (!preserve_connections) {
|
||||||
raop_destroy_airplay_video(raop, -1);
|
|
||||||
url.erase();
|
url.erase();
|
||||||
raop_remove_known_connections(raop);
|
raop_remove_known_connections(raop);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user