/* Add the service for HTSP */
if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC,
AVAHI_PROTO_UNSPEC, 0, name,
- "_htsp._tcp", NULL, NULL, 9982,
+ "_htsp._tcp", NULL, NULL,htsp_port,
NULL)) < 0) {
if (ret == AVAHI_ERR_COLLISION)
/* Add the service for HTTP */
if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC,
AVAHI_PROTO_UNSPEC, 0, name,
- "_http._tcp", NULL, NULL, 9981,
+ "_http._tcp", NULL, NULL, webui_port,
"path=/",
NULL)) < 0) {
void
htsp_init(void)
{
- htsp_server = tcp_server_create(9982, htsp_serve, NULL);
+ htsp_server = tcp_server_create(htsp_port, htsp_serve, NULL);
}
/**
void
http_server_init(void)
{
- http_server = tcp_server_create(9981, http_serve, NULL);
+ http_server = tcp_server_create(webui_port, http_serve, NULL);
}
int log_debug_to_syslog;
int log_debug_to_console;
+int webui_port;
+int htsp_port;
char *tvheadend_cwd;
static void
" to your Tvheadend installation until you edit\n"
" the access-control from within the Tvheadend UI\n");
printf(" -s Log debug to syslog\n");
+ printf(" -w <portnumber> WebUI access port [default 9981]\n");
+ printf(" -e <portnumber> HTSP access port [default 9982]\n");
printf("\n");
printf("Development options\n");
printf("\n");
char *p, *endp;
uint32_t adapter_mask = 0xffffffff;
int crash = 0;
+ webui_port = 9981;
+ htsp_port = 9982;
/* Get current directory */
tvheadend_cwd = dirname(dirname(strdup(argv[0])));
// make sure the timezone is set
tzset();
- while((c = getopt(argc, argv, "Aa:fp:u:g:c:Chdr:j:s")) != -1) {
+ while((c = getopt(argc, argv, "Aa:fp:u:g:c:Chdr:j:sw:e:")) != -1) {
switch(c) {
case 'a':
adapter_mask = 0x0;
case 'p':
pidpath = optarg;
break;
+ case 'w':
+ webui_port = atoi(optarg);
+ break;
+ case 'e':
+ htsp_port = atoi(optarg);
+ break;
case 'u':
usernam = optarg;
break;
extern pthread_mutex_t ffmpeg_lock;
extern pthread_mutex_t fork_lock;
+extern int webui_port;
+extern int htsp_port;
+
typedef struct source_info {
char *si_device;
char *si_adapter;