diff --git a/README.html b/README.html
index 1350ff5..f68a27f 100644
--- a/README.html
+++ b/README.html
@@ -1,4 +1,4 @@
-
- GPLv3, open source.
@@ -74,10 +74,11 @@
Also: image transforms that had been added to RPiPlay have been ported to UxPlay:
-f {H|V|I} implements “videoflip” image transforms: H = horizontal flip (right-left flip, or mirror image); V = vertical flip ; I = 180 degree rotation or inversion (which is the combination of H with V).
-r {R|L} 90 degree Right (clockwise) or Left (counter-clockwise) rotations; these are carried out after any -f transforms.
--vs videosink chooses the GStreamer videosink, instead of letting autovideosink pick it for you. Some videosink choices are: ximagesink, xvimagesink, vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), or fpsdisplaysink (which shows the streaming framerate in fps). Using quotes “…” might allow some parameters to be included with the videosink name. (Some choices of videosink might not work on your system.)
+-vs videosink chooses the GStreamer videosink, instead of letting autovideosink pick it for you. Some videosink choices are: ximagesink, xvimagesink, vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), or fpsdisplaysink (which shows the streaming framerate in fps). Using quotes “…” allows some parameters to be included with the videosink name. As an example, a user has reported success in getting fullscreen mode (which is supported by the vaapisink plugin) by using quotes in -vs "vaapisink fullscreen=true". (The syntax of such options is specific to a given plugin; some choices of videosink might not work on your system.)
-vs 0 suppresses display of streamed video, but plays streamed audio. (The client’s screen is still mirrored at a reduced rate of 1 frame per second, but is not rendered or displayed.) This feature (which streams audio in AAC audio format) is now probably unneeded, as UxPlay can now stream superior-quality Apple Lossless audio without video in Airplay non-mirror mode.
-as audiosink chooses the GStreamer audiosink, instead of letting autoaudiosink pick it for you. Some audiosink choices are: pulsesink, alsasink, osssink, oss4sink, and osxaudiosink (for macOS). Using quotes “…” might allow some parameters to be included with the audiosink name. (Some choices of audiosink might not work on your system.)
-as 0 (or just -a) suppresses playing of streamed audio, but displays streamed video.
+-nc maintains previous UxPlay < 1.45 behavior that does not close the video window when the the client sends the “Stop Mirroring” signal.
-t timeout will cause the server to relaunch (without stopping uxplay) if no connections have been present during the previous timeout seconds. You may wish to use this if the Server is not visible to new Clients that were inactive when the Server was launched, and an idle Bonjour registration eventually becomes unavailable for new connections (this is a workaround for what may be due to a problem with your DNS-SD or Avahi setup). This option should not be used on macOS, as a window created by GStreamer does not terminate correctly (it causes a segfault) if it is still open when the GStreamer pipeline is closed.
Troubleshooting
Note: uxplay is run from a terminal command line, and informational messages are written to the terminal.
@@ -103,6 +104,7 @@
This triggers an unending stream of error messages, and means that the audio decryption key (also used in video decryption) was not correctly extracted from data sent by the client. This should not happen for iOS 9.3 or later clients. However, if a client uses the same older version of the protocol that is used by the Windows-based AirPlay client emulator AirMyPC, the protocol can be switched to the older version by the setting OLD_PROTOCOL_CLIENT_USER_AGENT_LIST in lib/global.h. UxPlay reports the client’s “User Agent” string when it connects. If some other client also fails to decrypt all audio and video, try adding its “User Agent” string in place of “xxx” in the entry “AirMyPC/2.0;xxx” in global.h and rebuild uxplay.
Note that Uxplay declares itself to be an AppleTV2,1 with a sourceVersion 220.68; this can also be changed in global.h. It is crucial for UxPlay to declare this old value of sourceVersion, as this prompts the Apple client to use a less-encrypted “legacy” protocol needed by third-generation Apple TV’s, which are 32-bit devices that cannot run modern tvOS; it is probably not necessary for UxPlay to claim to be such an old AppleTV model.
ChangeLog
+1.45 2022-01-10 New behavior: close video window when client requests “stop mirroring”. (A new “no close” option “-nc” is added for users who wish to retain previous behavior that does not close the video window).
1.44 2021-12-13 Omit hash of aeskey with ecdh_secret for an AirMyPC client; make an internal rearrangement of where this hash is done. Fully report all initial communications between client and server in -d debug mode. Replace decodebin in GStreamer video pipeline by h264-specific elements.
1.43 2021-12-07 Various internal changes, such as tests for successful decryption, uniform treatment of informational/debug messages, etc., updated README.
1.42 2021-11-20 Fix MAC detection to work with modern Linux interface naming practices, MacOS and *BSD.
@@ -141,7 +143,7 @@
RPiPlay authors
The code in this repository accumulated from various sources over time. Here is my (fdrachbacher) attempt at listing the various authors and the components they created:
-- dsafa22: Created an AirPlay 2 mirroring server (seems gone now, but code is preserved here, and see here for dsafa22’s description of the analysis of the AirPlay 2 mirror protocol that made RPiPlay possible) for Android based on ShairPlay. This project is basically a port of dsafa22’s code to the Raspberry Pi, utilizing OpenMAX and OpenSSL for better performance on the Pi. All code in
lib/ concerning mirroring is dsafa22’s work. License: GNU LGPLv2.1+
+- dsafa22: Created an AirPlay 2 mirroring server AirplayServer (seems gone now), [added: but code is preserved here, and see here for the description of the analysis of the AirPlay 2 mirror protocol that made RPiPlay possible, by the AirplayServer author (who uses the name droidfang)] for Android based on ShairPlay. This project (RPiPlay) is basically a port of dsafa22’s code to the Raspberry Pi, utilizing OpenMAX and OpenSSL for better performance on the Pi. All code in
lib/ concerning mirroring is dsafa22’s work. License: GNU LGPLv2.1+
- Juho Vähä-Herttua and contributors: Created an AirPlay audio server called ShairPlay, including support for Fairplay based on PlayFair. Most of the code in
lib/ originally stems from this project. License: GNU LGPLv2.1+
- EstebanKubata: Created a FairPlay library called PlayFair. Located in the
lib/playfair folder. License: GNU GPL
- Joyent, Inc and contributors: Created an http library called llhttp. Located at
lib/llhttp/. License: MIT
diff --git a/README.md b/README.md
index 419261a..47b0e5a 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# UxPlay 1.44: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
+# UxPlay 1.45: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
Highlights:
@@ -305,8 +305,11 @@ Also: image transforms that had been added to RPiPlay have been ported to UxPlay
autovideosink pick it for you. Some videosink choices are: ximagesink, xvimagesink,
vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), or
fpsdisplaysink (which shows the streaming framerate in fps). Using quotes
- "..." might allow some parameters to be included with the videosink name.
- (Some choices of videosink might not work on your system.)
+ "..." allows some parameters to be included with the videosink name.
+ As an example, a user has reported success in
+ getting **fullscreen** mode (which is supported by the vaapisink plugin) by using
+ quotes in ``-vs "vaapisink fullscreen=true"``.
+ (The syntax of such options is specific to a given plugin; some choices of videosink might not work on your system.)
**-vs 0** suppresses display of streamed video, but plays streamed audio. (The client's screen
is still mirrored at a reduced rate of 1 frame per second, but is not rendered or displayed.) This
@@ -321,6 +324,9 @@ Also: image transforms that had been added to RPiPlay have been ported to UxPlay
**-as 0** (or just **-a**) suppresses playing of streamed audio, but displays streamed video.
+**-nc** maintains previous UxPlay < 1.45 behavior that does **not close** the video window when the the client
+ sends the "Stop Mirroring" signal.
+
**-t _timeout_** will cause the server to relaunch (without stopping uxplay) if no connections
have been present during the previous _timeout_ seconds. You may wish to use this if the Server
is not visible to new Clients that were inactive when the Server was launched, and an idle Bonjour
@@ -439,6 +445,9 @@ devices that cannot run modern tvOS; it is probably
not necessary for UxPlay to claim to be such an old AppleTV model.
# ChangeLog
+1.45 2022-01-10 New behavior: close video window when client requests "stop mirroring". (A new "no close" option "-nc" is added
+ for users who wish to retain previous behavior that does not close the video window).
+
1.44 2021-12-13 Omit hash of aeskey with ecdh_secret for an AirMyPC client; make an internal rearrangement of where this hash is
done. Fully report all initial communications between client and server in -d debug mode. Replace decodebin in GStreamer
video pipeline by h264-specific elements.
@@ -566,9 +575,12 @@ Given the large number of third-party AirPlay receivers (mostly closed-source) a
The code in this repository accumulated from various sources over time. Here
is my (__fdrachbacher__) attempt at listing the various authors and the components they created:
-* **dsafa22**: Created an [AirPlay 2 mirroring server](https://github.com/dsafa22/AirplayServer) (seems gone now, _but code is preserved
+* **dsafa22**: Created an AirPlay 2 mirroring server [AirplayServer](https://github.com/dsafa22/AirplayServer) (seems gone now), _\[added: but code is preserved
[here](https://github.com/KqSMea8/AirplayServer), and [see here](https://github.com/FDH2/UxPlay/wiki/AirPlay2) for
-dsafa22's description of the analysis of the AirPlay 2 mirror protocol that made RPiPlay possible_) for Android based on ShairPlay. This project is basically a port of dsafa22's code to the Raspberry Pi, utilizing OpenMAX and OpenSSL for better performance on the Pi. All code in `lib/` concerning mirroring is dsafa22's work. License: GNU LGPLv2.1+
+the description of the analysis of the AirPlay 2 mirror protocol that made RPiPlay possible, by the AirplayServer author (who uses the name **droidfang**)\]_
+for Android based on ShairPlay.
+This project (RPiPlay) is basically a port of dsafa22's code to the Raspberry Pi, utilizing OpenMAX and OpenSSL for better performance on the Pi.
+All code in `lib/` concerning mirroring is dsafa22's work. License: GNU LGPLv2.1+
* **Juho Vähä-Herttua** and contributors: Created an AirPlay audio server called [ShairPlay](https://github.com/juhovh/shairplay), including support for Fairplay based on PlayFair. Most of the code in `lib/` originally stems from this project. License: GNU LGPLv2.1+
* **EstebanKubata**: Created a FairPlay library called [PlayFair](https://github.com/EstebanKubata/playfair). Located in the `lib/playfair` folder. License: GNU GPL
* **Joyent, Inc and contributors**: Created an http library called [llhttp](https://github.com/nodejs/llhttp). Located at `lib/llhttp/`. License: MIT
diff --git a/README.txt b/README.txt
index 8b5fbb4..5c2fb7b 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-UxPlay 1.44: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
+UxPlay 1.45: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
======================================================================
Highlights:
@@ -384,9 +384,13 @@ rotations; these are carried out after any **-f** transforms.
autovideosink pick it for you. Some videosink choices are: ximagesink,
xvimagesink, vaapisink (for intel graphics), gtksink, glimagesink,
waylandsink, osximagesink (for macOS), or fpsdisplaysink (which shows
-the streaming framerate in fps). Using quotes "..." might allow some
-parameters to be included with the videosink name. (Some choices of
-videosink might not work on your system.)
+the streaming framerate in fps). Using quotes "..." allows some
+parameters to be included with the videosink name. As an example, a user
+has reported success in getting **fullscreen** mode (which is supported
+by the vaapisink plugin) by using quotes in
+`-vs "vaapisink fullscreen=true"`. (The syntax of such options is
+specific to a given plugin; some choices of videosink might not work on
+your system.)
**-vs 0** suppresses display of streamed video, but plays streamed
audio. (The client's screen is still mirrored at a reduced rate of 1
@@ -404,6 +408,10 @@ name. (Some choices of audiosink might not work on your system.)
**-as 0** (or just **-a**) suppresses playing of streamed audio, but
displays streamed video.
+**-nc** maintains previous UxPlay \< 1.45 behavior that does **not
+close** the video window when the the client sends the "Stop Mirroring"
+signal.
+
**-t *timeout*** will cause the server to relaunch (without stopping
uxplay) if no connections have been present during the previous
*timeout* seconds. You may wish to use this if the Server is not visible
@@ -553,6 +561,10 @@ to be such an old AppleTV model.
ChangeLog
=========
+1.45 2022-01-10 New behavior: close video window when client requests
+"stop mirroring". (A new "no close" option "-nc" is added for users who
+wish to retain previous behavior that does not close the video window).
+
1.44 2021-12-13 Omit hash of aeskey with ecdh\_secret for an AirMyPC
client; make an internal rearrangement of where this hash is done. Fully
report all initial communications between client and server in -d debug
@@ -716,16 +728,17 @@ The code in this repository accumulated from various sources over time.
Here is my (**fdrachbacher**) attempt at listing the various authors and
the components they created:
-- **dsafa22**: Created an [AirPlay 2 mirroring
- server](https://github.com/dsafa22/AirplayServer) (seems gone now,
- *but code is preserved
+- **dsafa22**: Created an AirPlay 2 mirroring server
+ [AirplayServer](https://github.com/dsafa22/AirplayServer) (seems
+ gone now), *\[added: but code is preserved
[here](https://github.com/KqSMea8/AirplayServer), and [see
- here](https://github.com/FDH2/UxPlay/wiki/AirPlay2) for dsafa22's
+ here](https://github.com/FDH2/UxPlay/wiki/AirPlay2) for the
description of the analysis of the AirPlay 2 mirror protocol that
- made RPiPlay possible*) for Android based on ShairPlay. This project
- is basically a port of dsafa22's code to the Raspberry Pi, utilizing
- OpenMAX and OpenSSL for better performance on the Pi. All code in
- `lib/` concerning mirroring is dsafa22's work. License: GNU
+ made RPiPlay possible, by the AirplayServer author (who uses the
+ name **droidfang**)\]* for Android based on ShairPlay. This project
+ (RPiPlay) is basically a port of dsafa22's code to the Raspberry Pi,
+ utilizing OpenMAX and OpenSSL for better performance on the Pi. All
+ code in `lib/` concerning mirroring is dsafa22's work. License: GNU
LGPLv2.1+
- **Juho Vähä-Herttua** and contributors: Created an AirPlay audio
server called [ShairPlay](https://github.com/juhovh/shairplay),
diff --git a/lib/raop.c b/lib/raop.c
index 06af49d..6f88db6 100755
--- a/lib/raop.c
+++ b/lib/raop.c
@@ -273,8 +273,8 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) {
}
}
}
- if (conn->raop->callbacks.teardown_request) {
- conn->raop->callbacks.teardown_request(conn->raop->callbacks.cls, &teardown_96, &teardown_110);
+ if (conn->raop->callbacks.conn_teardown) {
+ conn->raop->callbacks.conn_teardown(conn->raop->callbacks.cls, &teardown_96, &teardown_110);
}
logger_log(conn->raop->logger, LOGGER_DEBUG, "TEARDOWN request, 96=%d, 110=%d", teardown_96, teardown_110);
diff --git a/lib/raop.h b/lib/raop.h
index 8154606..53dd0f0 100755
--- a/lib/raop.h
+++ b/lib/raop.h
@@ -37,11 +37,10 @@ struct raop_callbacks_s {
void (*audio_process)(void *cls, raop_ntp_t *ntp, aac_decode_struct *data);
void (*video_process)(void *cls, raop_ntp_t *ntp, h264_decode_struct *data);
-
/* Optional but recommended callback functions */
void (*conn_init)(void *cls);
void (*conn_destroy)(void *cls);
- void (*teardown_request)(void *cls, bool *teardown_96, bool *teardown_110 );
+ void (*conn_teardown)(void *cls, bool *teardown_96, bool *teardown_110 );
void (*audio_flush)(void *cls);
void (*video_flush)(void *cls);
void (*audio_set_volume)(void *cls, float volume);
@@ -50,6 +49,7 @@ struct raop_callbacks_s {
void (*audio_remote_control_id)(void *cls, const char *dacp_id, const char *active_remote_header);
void (*audio_set_progress)(void *cls, unsigned int start, unsigned int curr, unsigned int end);
void (*audio_get_format)(void *cls, unsigned char *ct, unsigned short *spf, bool *usingScreen, bool *isMedia, uint64_t *audioFormat);
+ void (*video_report_size)(void *cls, float *width_source, float *height_source, float *width, float *height);
};
typedef struct raop_callbacks_s raop_callbacks_t;
diff --git a/lib/raop_rtp_mirror.c b/lib/raop_rtp_mirror.c
index 627006d..90c30f9 100755
--- a/lib/raop_rtp_mirror.c
+++ b/lib/raop_rtp_mirror.c
@@ -359,6 +359,9 @@ raop_rtp_mirror_thread(void *arg)
float height_source = byteutils_get_float(packet, 44);
float width = byteutils_get_float(packet, 56);
float height = byteutils_get_float(packet, 60);
+ if (raop_rtp_mirror->callbacks.video_report_size) {
+ raop_rtp_mirror->callbacks.video_report_size(raop_rtp_mirror->callbacks.cls, &width_source, &height_source, &width, &height);
+ }
logger_log(raop_rtp_mirror->logger, LOGGER_DEBUG, "raop_rtp_mirror width_source = %f height_source = %f width = %f height = %f",
width_source, height_source, width, height);
diff --git a/renderers/video_renderer.h b/renderers/video_renderer.h
index 2869dcb..f5e5947 100644
--- a/renderers/video_renderer.h
+++ b/renderers/video_renderer.h
@@ -52,7 +52,8 @@ void video_renderer_render_buffer (raop_ntp_t *ntp, unsigned char* data, int dat
void video_renderer_flush ();
unsigned int video_renderer_listen(void *loop);
void video_renderer_destroy ();
-
+void video_renderer_size(float *width_source, float *height_source, float *width, float *height);
+
/* not implemented for gstreamer */
void video_renderer_update_background (int type);
diff --git a/renderers/video_renderer_gstreamer.c b/renderers/video_renderer_gstreamer.c
index 81db257..7f1e5af 100644
--- a/renderers/video_renderer_gstreamer.c
+++ b/renderers/video_renderer_gstreamer.c
@@ -95,6 +95,15 @@ static void append_videoflip (GString *launch, const videoflip_t *flip, const vi
static video_renderer_t *renderer = NULL;
static logger_t *logger = NULL;
static bool broken_video;
+static unsigned short width, height, width_source, height_source; /* not currently used */
+
+void video_renderer_size(float *f_width_source, float *f_height_source, float *f_width, float *f_height) {
+ width_source = (unsigned short) *f_width_source;
+ height_source = (unsigned short) *f_height_source;
+ width = (unsigned short) *f_width;
+ height = (unsigned short) *f_height;
+ logger_log(logger, LOGGER_INFO, "begin video stream wxh = %dx%d; source %dx%d", width, height, width_source, height_source);
+}
void video_renderer_init(logger_t *render_logger, const char *server_name, videoflip_t videoflip[2], const char *videosink) {
GError *error = NULL;
diff --git a/uxplay.1 b/uxplay.1
index 8b5b197..9a63942 100644
--- a/uxplay.1
+++ b/uxplay.1
@@ -1,11 +1,11 @@
-.TH UXPLAY "1" "December 2021" "1.44" "User Commands"
+.TH UXPLAY "1" "January 2022" "1.45" "User Commands"
.SH NAME
uxplay \- start AirPlay server
.SH SYNOPSIS
.B uxplay
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]] [more \fI OPTIONS \/\fR ...]
.SH DESCRIPTION
-UxPlay 1.44: An open\-source AirPlay mirroring server based on RPiPlay
+UxPlay 1.45: An open\-source AirPlay mirroring server based on RPiPlay
.SH OPTIONS
.TP
.B
@@ -53,6 +53,8 @@ UxPlay 1.44: An open\-source AirPlay mirroring server based on RPiPlay
.TP
\fB\-as\fR 0 (or \fB\-a\fR) Turn audio off, streamed video only.
.TP
+\fB\-nc\fR do not close video window when client stops mirroring
+.TP
\fB\-d\fR Enable debug logging
.TP
\fB\-v\fR or \fB\-h\fR Displays this help and version information
diff --git a/uxplay.cpp b/uxplay.cpp
index 2cb300c..b374cb2 100755
--- a/uxplay.cpp
+++ b/uxplay.cpp
@@ -44,13 +44,14 @@
#include "renderers/video_renderer.h"
#include "renderers/audio_renderer.h"
-#define VERSION "1.44"
+#define VERSION "1.45"
#define DEFAULT_NAME "UxPlay"
#define DEFAULT_DEBUG_LOG false
#define LOWEST_ALLOWED_PORT 1024
#define HIGHEST_PORT 65535
+static std::string server_name = DEFAULT_NAME;
static int start_raop_server (std::vector hw_addr, std::string name, unsigned short display[5],
unsigned short tcp[3], unsigned short udp[3], bool debug_log);
static int stop_raop_server ();
@@ -65,10 +66,13 @@ static uint open_connections = 0;
static bool connections_stopped = false;
static unsigned int server_timeout = 0;
static unsigned int counter;
+static std::string videosink = "autovideosink";
+static videoflip_t videoflip[2] = { NONE , NONE };
static bool use_video = true;
static unsigned char compression_type = 0;
static std::string audiosink = "autoaudiosink";
static bool use_audio = true;
+static bool previous_no_close_behavior = false;
gboolean connection_callback (gpointer loop){
if (!connections_stopped) {
@@ -161,7 +165,6 @@ static std::string find_mac () {
return mac;
}
-
#define MULTICAST 0
#define LOCAL 1
#define OCTETS 6
@@ -205,6 +208,7 @@ static void print_info (char *name) {
printf("-as Choose the GStreamer audiosink; default \"autoaudiosink\"\n");
printf(" choices: pulsesink,alsasink,osssink,oss4sink,osxaudiosink,etc.\n");
printf("-as 0 (or -a) Turn audio off, streamed video only\n");
+ printf("-nc do not close video window when client stops mirroring\n");
printf("-d Enable debug logging\n");
printf("-v or -h Displays this help and version information\n");
}
@@ -329,14 +333,11 @@ static void append_hostname(std::string &server_name) {
}
int main (int argc, char *argv[]) {
- std::string server_name = DEFAULT_NAME;
std::vector server_hw_addr;
bool do_append_hostname = true;
bool use_random_hw_addr = false;
bool debug_log = DEFAULT_DEBUG_LOG;
unsigned short display[5] = {0}, tcp[3] = {0}, udp[3] = {0};
- videoflip_t videoflip[2] = { NONE , NONE };
- std::string videosink = "autovideosink";
#ifdef SUPPRESS_AVAHI_COMPAT_WARNING
// suppress avahi_compat nag message. avahi emits a "nag" warning (once)
@@ -424,7 +425,9 @@ int main (int argc, char *argv[]) {
if (!option_has_value(i, argc, argv[i], argv[i+1])) exit(1);
server_timeout = 0;
get_value(argv[++i], &server_timeout);
- } else {
+ } else if (arg == "-nc") {
+ previous_no_close_behavior = true;
+ } else {
LOGE("unknown option %s, stopping\n",argv[i]);
exit(1);
}
@@ -521,6 +524,15 @@ extern "C" void conn_destroy (void *cls) {
}
}
+extern "C" void conn_teardown(void *cls, bool *teardown_96, bool *teardown_110) {
+ if (*teardown_110 && !previous_no_close_behavior) {
+ audio_renderer_stop();
+ video_renderer_destroy();
+ video_renderer_init(render_logger, server_name.c_str(), videoflip, videosink.c_str());
+ video_renderer_start();
+ }
+}
+
extern "C" void audio_process (void *cls, raop_ntp_t *ntp, aac_decode_struct *data) {
if (use_audio) {
audio_renderer_render_buffer(ntp, data->data, data->data_len, data->pts);
@@ -558,10 +570,10 @@ extern "C" void audio_get_format (void *cls, unsigned char *ct, unsigned short *
}
}
-extern "C" void teardown(void *cls, bool *teardown_96, bool *teardown_110) {
- LOGI("received TEARDOWN request from client, 96=%d 110 =%d", *teardown_96, *teardown_110);
+extern "C" void video_report_size(void *cls, float *width_source, float *height_source, float *width, float *height) {
+ video_renderer_size(width_source, height_source, width, height);
}
-
+
extern "C" void log_callback (void *cls, int level, const char *msg) {
switch (level) {
case LOGGER_DEBUG: {
@@ -592,13 +604,15 @@ int start_raop_server (std::vector hw_addr, std::string name, unsigned sho
memset(&raop_cbs, 0, sizeof(raop_cbs));
raop_cbs.conn_init = conn_init;
raop_cbs.conn_destroy = conn_destroy;
+ raop_cbs.conn_teardown = conn_teardown;
raop_cbs.audio_process = audio_process;
raop_cbs.video_process = video_process;
raop_cbs.audio_flush = audio_flush;
raop_cbs.video_flush = video_flush;
raop_cbs.audio_set_volume = audio_set_volume;
raop_cbs.audio_get_format = audio_get_format;
-
+ raop_cbs.video_report_size = video_report_size;
+
raop = raop_init(10, &raop_cbs);
if (raop == NULL) {
LOGE("Error initializing raop!");