From 1fb046536a687e7c5eef9a440f66d111cd0e8cb4 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 10 May 2008 23:01:37 +0000 Subject: 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 --- src/modules/rtp/raop_client.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/modules/rtp/raop_client.h') 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 #include +#include 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 -- cgit