Add URL for RTSP streaming
This commit is contained in:
parent
7085b134e0
commit
4ea99d9e7a
1 changed files with 19 additions and 0 deletions
|
@ -16,6 +16,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -23,6 +27,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include "tvhead.h"
|
||||
#include "http.h"
|
||||
#include "ajaxui.h"
|
||||
|
@ -131,6 +136,7 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
th_channel_t *ch;
|
||||
th_channel_group_t *tcg;
|
||||
char dispname[20];
|
||||
struct sockaddr_in *si;
|
||||
|
||||
if(remain == NULL || (tcg = channel_group_by_tag(atoi(remain))) == NULL)
|
||||
return HTTP_STATUS_NOT_FOUND;
|
||||
|
@ -146,6 +152,8 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
|
||||
ajax_box_begin(tq, AJAX_BOX_SIDEBOX, NULL, NULL, dispname);
|
||||
|
||||
/* inner */
|
||||
|
||||
tcp_qprintf(tq,
|
||||
"<div style=\"width: 100%%; overflow: hidden; height:36px\">");
|
||||
|
||||
|
@ -158,6 +166,17 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
ch->ch_icon);
|
||||
}
|
||||
|
||||
tcp_qprintf(tq, "</div>");
|
||||
|
||||
tcp_qprintf(tq, "<div style=\"float:left; text-align: right\">");
|
||||
|
||||
si = (struct sockaddr_in *)&hc->hc_tcp_session.tcp_self_addr;
|
||||
|
||||
tcp_qprintf(tq,
|
||||
"<a href=\"rtsp://%s:%d/%s\">Stream</a>",
|
||||
inet_ntoa(si->sin_addr), ntohs(si->sin_port),
|
||||
ch->ch_sname);
|
||||
|
||||
tcp_qprintf(tq, "</div>");
|
||||
tcp_qprintf(tq, "</div>");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue