char *localip;
char *url;
- uint32_t port;
+ uint16_t port;
uint32_t cseq;
char *session;
char *transport;
};
-static int pa_rtsp_exec(pa_rtsp_client* c, const char* cmd,
+static int rtsp_exec(pa_rtsp_client* c, const char* cmd,
const char* content_type, const char* content,
int expect_response,
pa_headerlist* headers) {
while ((token = pa_split(c->transport, delimiters, &token_state))) {
if ((pc = strstr(token, "="))) {
if (0 == strncmp(token, "server_port", 11)) {
- pa_atou(pc+1, &c->port);
+ pa_atou(pc+1, (uint32_t*)(&c->port));
pa_xfree(token);
break;
}
pa_assert(c->callback);
if (!s) {
- pa_ioline_unref(c->ioline);
- c->ioline = NULL;
- pa_rtsp_disconnect(c);
c->callback(c, STATE_DISCONNECTED, NULL, c->userdata);
return;
}
return -1;
c->state = STATE_ANNOUNCE;
- return pa_rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL);
+ return rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL);
}
pa_headerlist_puts(headers, "Transport", "RTP/AVP/TCP;unicast;interleaved=0-1;mode=record");
c->state = STATE_SETUP;
- rv = pa_rtsp_exec(c, "SETUP", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "SETUP", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}
pa_headerlist_puts(headers, "RTP-Info", "seq=0;rtptime=0");
c->state = STATE_RECORD;
- rv = pa_rtsp_exec(c, "RECORD", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "RECORD", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}
pa_assert(c);
c->state = STATE_TEARDOWN;
- return pa_rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL);
+ return rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL);
}
return -1;
c->state = STATE_SET_PARAMETER;
- return pa_rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL);
+ return rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL);
}
pa_headerlist_puts(headers, "RTP-Info", "seq=0;rtptime=0");
c->state = STATE_FLUSH;
- rv = pa_rtsp_exec(c, "FLUSH", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "FLUSH", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}