Lines Matching full:http
125 pvc->profile->http.rtp_vlanid = vr.vlr_tag;
127 pvc->profile->http.rtp_vlanid = 0;
193 uint16_t port = atoi(pvc->profile->http.rtp_port);
227 pkt.rtp.header16[1] = htobe16(pvc->profile->http.rtp_seqnum);
236 pvc->profile->http.rtp_seqnum++;
237 pvc->profile->http.rtp_ts += len / (2 * pvc->channels);
264 for (x = 0; x < pvc->profile->http.nstate; x++)
265 usage += (pvc->profile->http.state[x].fd != -1);
420 fprintf(io, "HTTP/1.1 206 Partial Content\r\n"
430 fprintf(io, "HTTP/1.0 200 OK\r\n"
473 /* dump HTTP request header */
497 fprintf(io, "HTTP/1.0 200 OK\r\n"
504 "<meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />"
505 "<meta http-equiv=\"Pragma\" content=\"no-cache\" />"
506 "<meta http-equiv=\"Expires\" content=\"0\" />"
516 "<li>Enter, copy or share this network address to VLC: <a href=\"http://%s:%s/stream.m3u\">http://%s:%s/stream.m3u</a></li>"
526 pvc->profile->http.host, pvc->profile->http.port,
527 pvc->profile->http.host, pvc->profile->http.port);
529 if (x == pvc->profile->http.nstate)
532 fprintf(io, "<h2>There are %zu free slots (%zu active)</h2>", pvc->profile->http.nstate - x, x);
537 for (x = 0; x < pvc->profile->http.nstate; x++) {
538 if (pvc->profile->http.state[x].fd >= 0)
550 pvc->profile->http.state[x].ts =
552 pvc->profile->http.state[x].fd = fd;
558 fprintf(io, "HTTP/1.1 416 Range Not Satisfiable\r\n"
566 fprintf(io, "HTTP/1.0 503 Out of Resources\r\n"
571 fprintf(io, "HTTP/1.0 200 OK\r\n"
577 if (sa->sin_family == AF_INET && pvc->profile->http.rtp_port != NULL) {
578 fprintf(io, "rtp://239.255.0.1:%s\r\n", pvc->profile->http.rtp_port);
580 fprintf(io, "http://%s:%s/stream.wav\r\n",
581 pvc->profile->http.host, pvc->profile->http.port);
585 fprintf(io, "HTTP/1.0 404 Not Found\r\n"
640 if (listen(s, pvc->profile->http.nstate) == 0) {
669 const char *host = pvc->profile->http.host;
670 const char *port = pvc->profile->http.port;
736 if (pvc->profile->http.rtp_fd > -1) {
737 voss_httpd_send_rtp(pvc, pvc->profile->http.rtp_fd,
738 ptr, len, pvc->profile->http.rtp_ts);
741 /* send HTTP data, if any */
742 for (x = 0; x < pvc->profile->http.nstate; x++) {
743 int fd = pvc->profile->http.state[x].fd;
744 uint64_t delta = ts - pvc->profile->http.state[x].ts;
752 pvc->profile->http.state[x].fd = -1;
755 pvc->profile->http.state[x].fd = -1;
758 pvc->profile->http.state[x].fd = -1;
763 pvc->profile->http.state[x].fd = -1;
767 pvc->profile->http.state[x].ts = ts;
784 if (pvp->http.host == NULL || pvp->http.port == NULL || pvp->http.nstate == 0)
787 pvp->http.state = malloc(sizeof(pvp->http.state[0]) * pvp->http.nstate);
788 if (pvp->http.state == NULL)
789 return ("Could not allocate HTTP states");
791 for (x = 0; x != pvp->http.nstate; x++) {
792 pvp->http.state[x].fd = -1;
793 pvp->http.state[x].ts = 0;
798 return ("Could not allocate client for HTTP server");
802 if (pvp->http.rtp_ifname != NULL) {
809 perr = voss_httpd_bind_rtp(pvc, pvp->http.rtp_ifname,
810 &pvp->http.rtp_fd);
818 pvp->http.rtp_fd = -1;
828 return ("Could not allocate buffers for HTTP server");
841 return ("Could not create HTTP daemon thread");
843 return ("Could not create HTTP streamer thread");