From: Jaroslav Kysela Date: Thu, 8 Oct 2015 18:37:09 +0000 (+0200) Subject: rtsp: cleanup rtpc -> rtcp X-Git-Tag: v4.2.1~1962 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c9b5b2ec6953f29344cc4f17b210fdae8d4939d;p=thirdparty%2Ftvheadend.git rtsp: cleanup rtpc -> rtcp --- diff --git a/src/http.h b/src/http.h index 2759f6d75..e56546e5f 100644 --- a/src/http.h +++ b/src/http.h @@ -319,7 +319,7 @@ struct http_client { char *hc_rtsp_session; char *hc_rtp_dest; int hc_rtp_port; - int hc_rtpc_port; + int hc_rtcp_port; int hc_rtp_tcp; int hc_rtcp_tcp; int hc_rtcp_server_port; @@ -377,7 +377,7 @@ static inline int rtsp_options( http_client_t *hc ) { int rtsp_setup_decode( http_client_t *hc, int satip ); int rtsp_setup( http_client_t *hc, const char *path, const char *query, - const char *multicast_addr, int rtp_port, int rtpc_port ); + const char *multicast_addr, int rtp_port, int rtcp_port ); static inline int rtsp_play( http_client_t *hc, const char *path, const char *query ) { diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 8e8074dfe..b8696c946 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1179,7 +1179,7 @@ new_tune: if ((rtsp_flags & SATIP_SETUP_TCP) == 0) { if (udp_bind_double(&rtp, &rtcp, - "satip", "rtp", "rtpc", + "satip", "rtp", "rtcp", satip_frontend_bindaddr(lfe), lfe->sf_udp_rtp_port, NULL, SATIP_BUF_SIZE, 16384, 4*1024, 4*1024) < 0) { satip_frontend_tuning_error(lfe, tr); @@ -1423,7 +1423,7 @@ new_tune: break; if (r < 0 || ((rtsp_flags & SATIP_SETUP_TCP) == 0 && (rtsp->hc_rtp_port != rtp_port || - rtsp->hc_rtpc_port != rtp_port + 1)) || + rtsp->hc_rtcp_port != rtp_port + 1)) || ((rtsp_flags & SATIP_SETUP_TCP) != 0 && (rtsp->hc_rtp_tcp < 0 || rtsp->hc_rtcp_tcp < 0))) { tvhlog(LOG_ERR, "satip", "%s - RTSP SETUP error %d (%s) [%i-%i]", diff --git a/src/rtsp.c b/src/rtsp.c index 489afe9b2..dd52a85f5 100644 --- a/src/rtsp.c +++ b/src/rtsp.c @@ -61,7 +61,7 @@ rtsp_clear_session( http_client_t *hc ) free(hc->hc_rtsp_session); free(hc->hc_rtp_dest); hc->hc_rtp_port = 0; - hc->hc_rtpc_port = 0; + hc->hc_rtcp_port = 0; hc->hc_rtsp_session = NULL; hc->hc_rtp_dest = NULL; hc->hc_rtp_multicast = 0; @@ -150,7 +150,7 @@ rtsp_setup_decode( http_client_t *hc, int satip ) hc->hc_rtp_tcp = -1; hc->hc_rtcp_tcp = -1; hc->hc_rtp_port = -1; - hc->hc_rtpc_port = -1; + hc->hc_rtcp_port = -1; if (!strcasecmp(argv[0], "RTP/AVP/TCP")) { for (i = 1; i < n; i++) { if (strncmp(argv[i], "interleaved=", 12) == 0) { @@ -185,8 +185,8 @@ rtsp_setup_decode( http_client_t *hc, int satip ) if (hc->hc_rtp_port <= 0) return -EIO; if (j > 1) { - hc->hc_rtpc_port = atoi(argv2[1]); - if (hc->hc_rtpc_port <= 0) + hc->hc_rtcp_port = atoi(argv2[1]); + if (hc->hc_rtcp_port <= 0) return -EIO; } } else { @@ -214,21 +214,21 @@ int rtsp_setup( http_client_t *hc, const char *path, const char *query, const char *multicast_addr, - int rtp_port, int rtpc_port ) + int rtp_port, int rtcp_port ) { http_arg_list_t h; char transport[256]; - if (rtpc_port < 0) { + if (rtcp_port < 0) { snprintf(transport, sizeof(transport), "RTP/AVP/TCP;interleaved=%d-%d", rtp_port, rtp_port + 1); } else if (multicast_addr) { snprintf(transport, sizeof(transport), "RTP/AVP;multicast;destination=%s;ttl=1;client_port=%i-%i", - multicast_addr, rtp_port, rtpc_port); + multicast_addr, rtp_port, rtcp_port); } else { snprintf(transport, sizeof(transport), - "RTP/AVP;unicast;client_port=%i-%i", rtp_port, rtpc_port); + "RTP/AVP;unicast;client_port=%i-%i", rtp_port, rtcp_port); } http_arg_init(&h);