no need to explicitly configure RTSP server IP, instead deduce info from established http connection
This commit is contained in:
parent
3d01c3b914
commit
f0d06575db
3 changed files with 8 additions and 12 deletions
16
htmlui.c
16
htmlui.c
|
@ -425,7 +425,8 @@ page_root(http_connection_t *hc, const char *remain, void *opaque)
|
|||
int simple = is_client_simple(hc);
|
||||
time_t firstend = INT32_MAX;
|
||||
th_channel_group_t *tcg;
|
||||
|
||||
struct sockaddr_in *si;
|
||||
|
||||
if(!html_verify_access(hc, "browse-events"))
|
||||
return HTTP_STATUS_UNAUTHORIZED;
|
||||
|
||||
|
@ -485,13 +486,12 @@ page_root(http_connection_t *hc, const char *remain, void *opaque)
|
|||
"<a href=\"channel/%d\">%s</a></span>",
|
||||
ch->ch_tag, ch->ch_name);
|
||||
|
||||
if(tvheadend_streaming_host != NULL) {
|
||||
tcp_qprintf(&tq,
|
||||
"<i><a href=\"rtsp://%s:%d/%s\">Watch live</a></i><br>",
|
||||
tvheadend_streaming_host, http_port, ch->ch_sname);
|
||||
} else {
|
||||
tcp_qprintf(&tq, "<br>");
|
||||
}
|
||||
si = (struct sockaddr_in *)&hc->hc_tcp_session.tcp_self_addr;
|
||||
|
||||
tcp_qprintf(&tq,
|
||||
"<i><a href=\"rtsp://%s:%d/%s\">Watch live</a></i><br>",
|
||||
inet_ntoa(si->sin_addr), ntohs(si->sin_port),
|
||||
ch->ch_sname);
|
||||
|
||||
e = epg_event_find_current_or_upcoming(ch);
|
||||
|
||||
|
|
3
main.c
3
main.c
|
@ -60,7 +60,6 @@
|
|||
int running;
|
||||
int xmltvreload;
|
||||
int startupcounter;
|
||||
const char *tvheadend_streaming_host;
|
||||
const char *settings_dir;
|
||||
|
||||
static pthread_mutex_t tag_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
@ -205,8 +204,6 @@ main(int argc, char **argv)
|
|||
|
||||
subscriptions_init();
|
||||
|
||||
tvheadend_streaming_host = config_get_str("streaming-host", NULL);
|
||||
|
||||
htmlui_start();
|
||||
|
||||
avgen_init();
|
||||
|
|
1
tvhead.h
1
tvhead.h
|
@ -803,7 +803,6 @@ char *utf8toprintable(const char *in);
|
|||
char *utf8tofilename(const char *in);
|
||||
const char *htstvstreamtype2txt(tv_streamtype_t s);
|
||||
uint32_t tag_get(void);
|
||||
extern const char *tvheadend_streaming_host;
|
||||
extern const char *settings_dir;
|
||||
FILE *settings_open_for_write(const char *name);
|
||||
FILE *settings_open_for_read(const char *name);
|
||||
|
|
Loading…
Add table
Reference in a new issue