]> code.delx.au - pulseaudio/blobdiff - src/modules/rtp/rtsp_client.c
loopback: add loopback module for direct connections of sinks and sources
[pulseaudio] / src / modules / rtp / rtsp_client.c
index 3b077bec673bac89e574a2e5b4d209cc8ed55c69..72d304e847a1283dd5394a27eafa699a5ad50aa1 100644 (file)
@@ -5,7 +5,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
@@ -30,6 +30,7 @@
 #include <arpa/inet.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include <netinet/in.h>
 
 #ifdef HAVE_SYS_FILIO_H
 #include <sys/filio.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/strbuf.h>
-#include <pulsecore/poll.h>
 #include <pulsecore/ioline.h>
 
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <pulsecore/poll.h>
+#endif
+
 #include "rtsp_client.h"
 
 struct pa_rtsp_client {
@@ -206,7 +212,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
     }
     if (!strlen(s2)) {
         /* End of headers */
-        /* We will have a header left from our looping itteration, so add it in :) */
+        /* We will have a header left from our looping iteration, so add it in :) */
         if (c->last_header) {
             /* This is not a continuation header so let's dump it into our proplist */
             pa_headerlist_puts(c->response_headers, c->last_header, pa_strbuf_tostring_free(c->header_buffer));
@@ -327,7 +333,7 @@ int pa_rtsp_connect(pa_rtsp_client *c) {
     pa_xfree(c->session);
     c->session = NULL;
 
-    if (!(c->sc = pa_socket_client_new_string(c->mainloop, c->hostname, c->port))) {
+    if (!(c->sc = pa_socket_client_new_string(c->mainloop, TRUE, c->hostname, c->port))) {
         pa_log("failed to connect to server '%s:%d'", c->hostname, c->port);
         return -1;
     }
@@ -483,7 +489,7 @@ int pa_rtsp_record(pa_rtsp_client* c, uint16_t* seq, uint32_t* rtptime) {
 
     pa_assert(c);
     if (!c->session) {
-        /* No seesion in progres */
+        /* No session in progress */
         return -1;
     }