7 This file is part of PulseAudio.
9 Copyright 2008 Colin Guthrie
11 PulseAudio is free software; you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published
13 by the Free Software Foundation; either version 2 of the License,
14 or (at your option) any later version.
16 PulseAudio is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with PulseAudio; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 #include <sys/socket.h>
29 #include <sys/types.h>
32 #include <pulsecore/memblockq.h>
33 #include <pulsecore/memchunk.h>
34 #include <pulsecore/socket-client.h>
35 #include <pulse/mainloop-api.h>
37 #include "headerlist.h"
39 typedef struct pa_rtsp_context pa_rtsp_context;
49 typedef void (*pa_rtsp_cb_t)(pa_rtsp_context *c, pa_rtsp_state state, pa_headerlist* hl, void *userdata);
51 pa_rtsp_context* pa_rtsp_context_new(const char* useragent);
52 void pa_rtsp_context_free(pa_rtsp_context* c);
54 int pa_rtsp_connect(pa_rtsp_context* c, pa_mainloop_api *mainloop, const char* hostname, uint16_t port);
55 void pa_rtsp_set_callback(pa_rtsp_context *c, pa_rtsp_cb_t callback, void *userdata);
57 void pa_rtsp_disconnect(pa_rtsp_context* c);
59 const char* pa_rtsp_localip(pa_rtsp_context* c);
60 uint32_t pa_rtsp_serverport(pa_rtsp_context* c);
61 void pa_rtsp_set_url(pa_rtsp_context* c, const char* url);
62 void pa_rtsp_add_header(pa_rtsp_context *c, const char* key, const char* value);
63 void pa_rtsp_remove_header(pa_rtsp_context *c, const char* key);
65 int pa_rtsp_announce(pa_rtsp_context* c, const char* sdp);
67 int pa_rtsp_setup(pa_rtsp_context* c);
68 int pa_rtsp_record(pa_rtsp_context* c);
69 int pa_rtsp_teardown(pa_rtsp_context* c);
71 int pa_rtsp_setparameter(pa_rtsp_context* c, const char* param);
72 int pa_rtsp_flush(pa_rtsp_context* c);