mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
rename raop_stop/start to add "_httpd" for clarity
This commit is contained in:
@@ -612,7 +612,7 @@ void
|
||||
raop_destroy(raop_t *raop) {
|
||||
if (raop) {
|
||||
raop_destroy_airplay_video(raop);
|
||||
raop_stop(raop);
|
||||
raop_stop_httpd(raop);
|
||||
pairing_destroy(raop->pairing);
|
||||
httpd_destroy(raop->httpd);
|
||||
logger_destroy(raop->logger);
|
||||
@@ -725,14 +725,14 @@ raop_set_dnssd(raop_t *raop, dnssd_t *dnssd) {
|
||||
|
||||
|
||||
int
|
||||
raop_start(raop_t *raop, unsigned short *port) {
|
||||
raop_start_httpd(raop_t *raop, unsigned short *port) {
|
||||
assert(raop);
|
||||
assert(port);
|
||||
return httpd_start(raop->httpd, port);
|
||||
}
|
||||
|
||||
void
|
||||
raop_stop(raop_t *raop) {
|
||||
raop_stop_httpd(raop_t *raop) {
|
||||
assert(raop);
|
||||
httpd_stop(raop->httpd);
|
||||
}
|
||||
|
||||
@@ -121,9 +121,9 @@ RAOP_API void raop_set_udp_ports(raop_t *raop, unsigned short port[3]);
|
||||
RAOP_API void raop_set_tcp_ports(raop_t *raop, unsigned short port[2]);
|
||||
RAOP_API unsigned short raop_get_port(raop_t *raop);
|
||||
RAOP_API void *raop_get_callback_cls(raop_t *raop);
|
||||
RAOP_API int raop_start(raop_t *raop, unsigned short *port);
|
||||
RAOP_API int raop_start_httpd(raop_t *raop, unsigned short *port);
|
||||
RAOP_API int raop_is_running(raop_t *raop);
|
||||
RAOP_API void raop_stop(raop_t *raop);
|
||||
RAOP_API void raop_stop_httpd(raop_t *raop);
|
||||
RAOP_API void raop_set_dnssd(raop_t *raop, dnssd_t *dnssd);
|
||||
RAOP_API void raop_destroy(raop_t *raop);
|
||||
RAOP_API void raop_remove_known_connections(raop_t * raop);
|
||||
|
||||
15
uxplay.cpp
15
uxplay.cpp
@@ -377,7 +377,7 @@ static gboolean feedback_callback(gpointer loop) {
|
||||
if (!nofreeze) {
|
||||
close_window = false; /* leave "frozen" window open if reset_video is false */
|
||||
}
|
||||
raop_stop(raop);
|
||||
raop_stop_httpd(raop);
|
||||
reset_loop = true;
|
||||
} else if (missed_feedback > 2) {
|
||||
LOGE("%u missed client feedback signals (expected once per second); client may be offline", missed_feedback);
|
||||
@@ -444,6 +444,7 @@ static void main_loop() {
|
||||
g_assert(n_renderers <= 2);
|
||||
GMainLoop *loop = g_main_loop_new(NULL,FALSE);
|
||||
relaunch_video = false;
|
||||
reset_loop = false;
|
||||
if (use_video) {
|
||||
relaunch_video = true;
|
||||
if (url.empty()) {
|
||||
@@ -1645,7 +1646,7 @@ extern "C" void conn_reset (void *cls, int reason) {
|
||||
if (!nofreeze) {
|
||||
close_window = false; /* leave "frozen" window open */
|
||||
}
|
||||
raop_stop(raop);
|
||||
raop_stop_httpd(raop);
|
||||
reset_loop = true;
|
||||
}
|
||||
|
||||
@@ -2042,7 +2043,7 @@ static int start_raop_server (unsigned short display[5], unsigned short tcp[3],
|
||||
raop_set_udp_ports(raop, udp);
|
||||
|
||||
raop_port = raop_get_port(raop);
|
||||
raop_start(raop, &raop_port);
|
||||
raop_start_httpd(raop, &raop_port);
|
||||
raop_set_port(raop, raop_port);
|
||||
|
||||
/* use raop_port for airplay_port (instead of tcp[2]) */
|
||||
@@ -2374,10 +2375,8 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
main_loop();
|
||||
if (relaunch_video || reset_loop) {
|
||||
if(reset_loop) {
|
||||
reset_loop = false;
|
||||
} else {
|
||||
raop_stop(raop);
|
||||
if(reset_loop == false) {
|
||||
raop_stop_httpd(raop);
|
||||
}
|
||||
if (use_audio) audio_renderer_stop();
|
||||
if (use_video && (close_window || preserve_connections)) {
|
||||
@@ -2396,7 +2395,7 @@ int main (int argc, char *argv[]) {
|
||||
}
|
||||
if (relaunch_video) {
|
||||
unsigned short port = raop_get_port(raop);
|
||||
raop_start(raop, &port);
|
||||
raop_start_httpd(raop, &port);
|
||||
raop_set_port(raop, port);
|
||||
goto reconnect;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user