aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/raop_output_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-17 19:44:30 +0200
committerMax Kellermann <max@duempel.org>2011-09-17 19:44:30 +0200
commit423ce9557a7d2068292a95ceedc6c57982a231a0 (patch)
treeafc6106a903449f9dbe1d0f296f772d25fb4e4aa /src/output/raop_output_plugin.h
parent947848ebf6eb4706e8b3a88e7506e893b01f9a07 (diff)
downloadmpd-423ce9557a7d2068292a95ceedc6c57982a231a0.tar.gz
mpd-423ce9557a7d2068292a95ceedc6c57982a231a0.tar.xz
mpd-423ce9557a7d2068292a95ceedc6c57982a231a0.zip
output/raop: don't expose internal structs in public header
Diffstat (limited to '')
-rw-r--r--src/output/raop_output_plugin.h98
1 files changed, 2 insertions, 96 deletions
diff --git a/src/output/raop_output_plugin.h b/src/output/raop_output_plugin.h
index 210237179..bdc1e1a75 100644
--- a/src/output/raop_output_plugin.h
+++ b/src/output/raop_output_plugin.h
@@ -20,105 +20,11 @@
#ifndef MPD_OUTPUT_RAOP_PLUGIN_H
#define MPD_OUTPUT_RAOP_PLUGIN_H
-#include "ntp_server.h"
-#include "rtsp_client.h"
-
#include <glib.h>
-#include <stdbool.h>
-#include <sys/time.h>
-#include <openssl/aes.h>
-
-struct play_state {
- bool playing;
- unsigned short seq_num;
- unsigned int rtptime;
- unsigned int sync_src;
- unsigned int start_rtptime;
- struct timeval start_time;
- struct timeval last_send;
-};
-
-/*********************************************************************/
-
-enum pause_state {
- NO_PAUSE = 0,
- OP_PAUSE,
- NODATA_PAUSE,
-};
-
-#define MINIMUM_SAMPLE_SIZE 32
-
-#define RAOP_FD_READ (1<<0)
-#define RAOP_FD_WRITE (1<<1)
-
-/*********************************************************************/
-
-struct encrypt_data {
- AES_KEY ctx;
- unsigned char iv[16]; // initialization vector for aes-cbc
- unsigned char nv[16]; // next vector for aes-cbc
- unsigned char key[16]; // key for aes-cbc
-};
-
-/*********************************************************************/
-
-struct raop_data {
- struct rtspcl_data *rtspcl;
- const char *addr; // target host address
- short rtsp_port;
- struct sockaddr_in ctrl_addr;
- struct sockaddr_in data_addr;
-
- bool is_master;
- struct raop_data *next;
-
- unsigned volume;
- GMutex *control_mutex;
-
- bool started;
- bool paused;
-};
-
-/*********************************************************************/
-
-struct control_data {
- unsigned short port;
- int fd;
-};
-
-/*********************************************************************/
-
-#define NUMSAMPLES 352
-#define RAOP_BUFFER_SIZE NUMSAMPLES * 4
-#define RAOP_HEADER_SIZE 12
-#define ALAC_MAX_HEADER_SIZE 8
-#define RAOP_MAX_PACKET_SIZE RAOP_BUFFER_SIZE + RAOP_HEADER_SIZE + ALAC_MAX_HEADER_SIZE
-
-// session
-struct raop_session_data {
- struct raop_data *raop_list;
- struct ntp_server ntp;
- struct control_data ctrl;
- struct encrypt_data encrypt;
- struct play_state play_state;
-
- int data_fd;
-
- unsigned char buffer[RAOP_BUFFER_SIZE];
- size_t bufferSize;
-
- unsigned char data[RAOP_MAX_PACKET_SIZE];
- int wblk_wsize;
- int wblk_remsize;
-
- GMutex *data_mutex;
- GMutex *list_mutex;
-};
-
-//static struct raop_session_data *raop_session;
+#include <stdbool.h>
-/*********************************************************************/
+struct raop_data;
bool
raop_set_volume(struct raop_data *rd, unsigned volume, GError **error_r);