mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
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
This commit is contained in:
parent
ce9a41ef06
commit
405cf720dc
2 changed files with 73 additions and 65 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue