summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp/raop_client.h
diff options
context:
space:
mode:
authorColin Guthrie <pulse@colin.guthr.ie>2008-05-10 23:01:37 +0000
committerColin Guthrie <pulse@colin.guthr.ie>2008-10-08 20:32:07 +0100
commit1fb046536a687e7c5eef9a440f66d111cd0e8cb4 (patch)
treec151649d7499e5e7abb2e9ebfeed24ceb8b064a1 /src/modules/rtp/raop_client.h
parent41e31ab204ca48ea749c416eb270ebfa2f74b086 (diff)
Combine pa_raop_client_new and pa_raop_client_connect (no point in having them separate)
Convert the iochannel to an fd and do not call a pa_iochannel_cb_t callback but rather trigger the callback on connection and pass the fd. Change pa_raop_client_send_sample to pa_raop_client_encode_sample and work with memchunks. Fix a subtle size bug in the bit writer that techincally isn't triggered in normal operation. Clean up the _free function to actually free stuff. Do the actual ALAC encoding. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2394 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/rtp/raop_client.h')
-rw-r--r--src/modules/rtp/raop_client.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/rtp/raop_client.h b/src/modules/rtp/raop_client.h
index 1dcf779f..68a1cdb0 100644
--- a/src/modules/rtp/raop_client.h
+++ b/src/modules/rtp/raop_client.h
@@ -26,18 +26,16 @@
#include <pulse/mainloop-api.h>
#include <pulsecore/iochannel.h>
+#include <pulsecore/memchunk.h>
typedef struct pa_raop_client pa_raop_client;
-pa_raop_client* pa_raop_client_new(void);
+pa_raop_client* pa_raop_client_new(pa_mainloop_api *mainloop, const char* host);
void pa_raop_client_free(pa_raop_client* c);
-int pa_raop_client_connect(pa_raop_client* c, pa_mainloop_api *mainloop, const char* host);
+pa_memchunk pa_raop_client_encode_sample(pa_raop_client* c, pa_mempool* mempool, pa_memchunk* raw);
-void pa_raop_client_disconnect(pa_raop_client* c);
-
-void pa_raop_client_send_sample(pa_raop_client* c, const uint8_t* buffer, uint16_t count);
-
-void pa_raop_client_set_callback(pa_raop_client* c, pa_iochannel_cb_t callback, void *userdata);
+typedef void (*pa_raop_client_cb_t)(int fd, void *userdata);
+void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata);
#endif