1 /** 2 * Copyright (C) 2011-2012 Juho Vähä-Herttua 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 */ 14 15 #ifndef RAOP_RTP_H 16 #define RAOP_RTP_H 17 18 /* For raop_callbacks_t */ 19 #include "raop.h" 20 #include "logger.h" 21 22 #define RAOP_AESKEY_LEN 16 23 #define RAOP_AESIV_LEN 16 24 #define RAOP_PACKET_LEN 32768 25 26 typedef struct raop_rtp_s raop_rtp_t; 27 28 raop_rtp_t *raop_rtp_init(logger_t *logger, raop_callbacks_t *callbacks, const char *remote, 29 const char *rtpmap, const char *fmtp, 30 const unsigned char *aeskey, const unsigned char *aesiv); 31 void raop_rtp_start(raop_rtp_t *raop_rtp, int use_udp, unsigned short control_rport, unsigned short timing_rport, 32 unsigned short *control_lport, unsigned short *timing_lport, unsigned short *data_lport); 33 void raop_rtp_set_volume(raop_rtp_t *raop_rtp, float volume); 34 void raop_rtp_set_metadata(raop_rtp_t *raop_rtp, const char *data, int datalen); 35 void raop_rtp_set_coverart(raop_rtp_t *raop_rtp, const char *data, int datalen); 36 void raop_rtp_remote_control_id(raop_rtp_t *raop_rtp, const char *dacp_id, const char *active_remote_header); 37 void raop_rtp_set_progress(raop_rtp_t *raop_rtp, unsigned int start, unsigned int curr, unsigned int end); 38 void raop_rtp_flush(raop_rtp_t *raop_rtp, int next_seq); 39 void raop_rtp_stop(raop_rtp_t *raop_rtp); 40 void raop_rtp_destroy(raop_rtp_t *raop_rtp); 41 42 #endif 43