summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp/rtsp.h
diff options
context:
space:
mode:
authorColin Guthrie <pulse@colin.guthr.ie>2008-05-04 00:43:31 +0000
committerColin Guthrie <pulse@colin.guthr.ie>2008-10-08 20:32:06 +0100
commit405cf720dc5190f14eee6e2eaad51aa52ff18c62 (patch)
treeaeec9b9fc46d12bb4bffe9dc4136329581aca22c /src/modules/rtp/rtsp.h
parentce9a41ef06e0b6c619b985415ccac6f0fddd68b8 (diff)
Convert to using pa_socket_client rather than using blocking IO.
This change requires a reference to the mainloop api be passed during initial connection. In addition, the passing in of the session id during connect has been deprecated. A new function pa_rtsp_set_url has been added to allow the URL to be set by external code. The concept of sid is something specific to raop, not to the rtsp client. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2360 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/rtp/rtsp.h')
-rw-r--r--src/modules/rtp/rtsp.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/rtp/rtsp.h b/src/modules/rtp/rtsp.h
index 7b3df8f3..8d86f7ba 100644
--- a/src/modules/rtp/rtsp.h
+++ b/src/modules/rtp/rtsp.h
@@ -32,28 +32,31 @@
#include <pulsecore/memblockq.h>
#include <pulsecore/memchunk.h>
#include <pulsecore/socket-client.h>
+#include <pulse/mainloop-api.h>
#include "headerlist.h"
typedef struct pa_rtsp_context {
- int fd;
+ pa_socket_client *sc;
+ pa_iochannel *io;
const char* useragent;
pa_headerlist* headers;
+ char* localip;
char* url;
uint32_t port;
uint32_t cseq;
char* session;
char* transport;
- struct in_addr local_addr;
} pa_rtsp_context;
pa_rtsp_context* pa_rtsp_context_new(const char* useragent);
void pa_rtsp_context_free(pa_rtsp_context* c);
-int pa_rtsp_connect(pa_rtsp_context* c, const char* hostname, uint16_t port, const char* sid);
+int pa_rtsp_connect(pa_rtsp_context* c, pa_mainloop_api *mainloop, const char* hostname, uint16_t port);
void pa_rtsp_disconnect(pa_rtsp_context* c);
const char* pa_rtsp_localip(pa_rtsp_context* c);
+void pa_rtsp_set_url(pa_rtsp_context* c, const char* url);
int pa_rtsp_announce(pa_rtsp_context* c, const char* sdp);
int pa_rtsp_setup(pa_rtsp_context* c, pa_headerlist** response_headers);