1 #ifndef foortspclienthfoo
2 #define foortspclienthfoo
5 This file is part of PulseAudio.
7 Copyright 2008 Colin Guthrie
9 PulseAudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 PulseAudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with PulseAudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <sys/socket.h>
27 #include <sys/types.h>
30 #include <pulsecore/memblockq.h>
31 #include <pulsecore/memchunk.h>
32 #include <pulsecore/socket-client.h>
33 #include <pulse/mainloop-api.h>
35 #include "headerlist.h"
37 typedef struct pa_rtsp_client pa_rtsp_client
;
48 typedef void (*pa_rtsp_cb_t
)(pa_rtsp_client
*c
, pa_rtsp_state state
, pa_headerlist
* hl
, void *userdata
);
50 pa_rtsp_client
* pa_rtsp_client_new(pa_mainloop_api
*mainloop
, const char* hostname
, uint16_t port
, const char* useragent
);
51 void pa_rtsp_client_free(pa_rtsp_client
* c
);
53 int pa_rtsp_connect(pa_rtsp_client
* c
);
54 void pa_rtsp_set_callback(pa_rtsp_client
*c
, pa_rtsp_cb_t callback
, void *userdata
);
56 void pa_rtsp_disconnect(pa_rtsp_client
* c
);
58 const char* pa_rtsp_localip(pa_rtsp_client
* c
);
59 uint32_t pa_rtsp_serverport(pa_rtsp_client
* c
);
60 void pa_rtsp_set_url(pa_rtsp_client
* c
, const char* url
);
61 void pa_rtsp_add_header(pa_rtsp_client
*c
, const char* key
, const char* value
);
62 void pa_rtsp_remove_header(pa_rtsp_client
*c
, const char* key
);
64 int pa_rtsp_announce(pa_rtsp_client
* c
, const char* sdp
);
66 int pa_rtsp_setup(pa_rtsp_client
* c
);
67 int pa_rtsp_record(pa_rtsp_client
* c
, uint16_t* seq
, uint32_t* rtptime
);
68 int pa_rtsp_teardown(pa_rtsp_client
* c
);
70 int pa_rtsp_setparameter(pa_rtsp_client
* c
, const char* param
);
71 int pa_rtsp_flush(pa_rtsp_client
* c
, uint16_t seq
, uint32_t rtptime
);