data = http_request_get_data(request, &datalen);
if (data) {
sdp_t *sdp;
- const char *remotestr, *fmtpstr, *aeskeystr, *aesivstr;
+ const char *remotestr, *rtpmapstr, *fmtpstr, *aeskeystr, *aesivstr;
sdp = sdp_init(data, datalen);
remotestr = sdp_get_connection(sdp);
+ rtpmapstr = sdp_get_rtpmap(sdp);
fmtpstr = sdp_get_fmtp(sdp);
aeskeystr = sdp_get_rsaaeskey(sdp);
aesivstr = sdp_get_aesiv(sdp);
logger_log(conn->raop->logger, LOGGER_DEBUG, "connection: %s", remotestr);
+ logger_log(conn->raop->logger, LOGGER_DEBUG, "rtpmap: %s", rtpmapstr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "fmtp: %s", fmtpstr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "rsaaeskey: %s", aeskeystr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "aesiv: %s", aesivstr);
raop_rtp_destroy(conn->raop_rtp);
conn->raop_rtp = NULL;
}
- conn->raop_rtp = raop_rtp_init(raop->logger, &raop->callbacks, remotestr, fmtpstr, aeskey, aesiv);
+ conn->raop_rtp = raop_rtp_init(raop->logger, &raop->callbacks, remotestr, rtpmapstr, fmtpstr, aeskey, aesiv);
sdp_destroy(sdp);
}
} else if (!strcmp(method, "SETUP")) {
}
raop_buffer_t *
-raop_buffer_init(const char *fmtp,
+raop_buffer_init(const char *rtpmap,
+ const char *fmtp,
const unsigned char *aeskey,
const unsigned char *aesiv)
{
ALACSpecificConfig *alacConfig;
int i;
+ assert(rtpmap);
assert(fmtp);
assert(aeskey);
assert(aesiv);
typedef int (*raop_resend_cb_t)(void *opaque, unsigned short seqno, unsigned short count);
-raop_buffer_t *raop_buffer_init(const char *fmtp,
+raop_buffer_t *raop_buffer_init(const char *rtpmap,
+ const char *fmtp,
const unsigned char *aeskey,
const unsigned char *aesiv);
raop_rtp_t *
raop_rtp_init(logger_t *logger, raop_callbacks_t *callbacks, const char *remote,
- const char *fmtp, const unsigned char *aeskey, const unsigned char *aesiv)
+ const char *rtpmap, const char *fmtp,
+ const unsigned char *aeskey, const unsigned char *aesiv)
{
raop_rtp_t *raop_rtp;
assert(logger);
assert(callbacks);
assert(remote);
+ assert(rtpmap);
assert(fmtp);
raop_rtp = calloc(1, sizeof(raop_rtp_t));
}
raop_rtp->logger = logger;
memcpy(&raop_rtp->callbacks, callbacks, sizeof(raop_callbacks_t));
- raop_rtp->buffer = raop_buffer_init(fmtp, aeskey, aesiv);
+ raop_rtp->buffer = raop_buffer_init(rtpmap, fmtp, aeskey, aesiv);
if (!raop_rtp->buffer) {
free(raop_rtp);
return NULL;
typedef struct raop_rtp_s raop_rtp_t;
raop_rtp_t *raop_rtp_init(logger_t *logger, raop_callbacks_t *callbacks, const char *remote,
- const char *fmtp, const unsigned char *aeskey, const unsigned char *aesiv);
+ const char *rtpmap, const char *fmtp,
+ const unsigned char *aeskey, const unsigned char *aesiv);
void raop_rtp_start(raop_rtp_t *raop_rtp, int use_udp, unsigned short control_rport, unsigned short timing_rport,
unsigned short *control_lport, unsigned short *timing_lport, unsigned short *data_lport);
void raop_rtp_set_volume(raop_rtp_t *raop_rtp, float volume);