Merge pull request #412 from dmarion/osx
fix static port and webroot in avahi and bonjour, add OSX section in README.md
This commit is contained in:
commit
fff6f2dbd9
3 changed files with 20 additions and 4 deletions
|
@ -40,6 +40,15 @@ Thus, to start it, just type:
|
|||
|
||||
Settings are stored in `$HOME/.hts/tvheadend`.
|
||||
|
||||
How to build for OS X
|
||||
---------------------
|
||||
|
||||
Same build procedure applies to OS X.
|
||||
After build, the binary resides in `build.darwin` directory.
|
||||
|
||||
Only network sources (IPTV, SAT>IP) are supported on OS X.
|
||||
There is no support for DVB USB sticks and PCI cards.
|
||||
Transcoding is currently not supported.
|
||||
|
||||
Further information
|
||||
-------------------
|
||||
|
|
|
@ -112,6 +112,7 @@ static void
|
|||
create_services(AvahiClient *c)
|
||||
{
|
||||
char *n;
|
||||
char *path;
|
||||
int ret;
|
||||
assert(c);
|
||||
|
||||
|
@ -147,14 +148,18 @@ create_services(AvahiClient *c)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
path = malloc(strlen(tvheadend_webroot) + 6);
|
||||
sprintf(path, "path=%s", tvheadend_webroot);
|
||||
|
||||
/* 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, tvheadend_webui_port,
|
||||
"path=/",
|
||||
path,
|
||||
NULL)) < 0) {
|
||||
|
||||
free(path);
|
||||
|
||||
if (ret == AVAHI_ERR_COLLISION)
|
||||
goto collision;
|
||||
|
||||
|
|
|
@ -104,12 +104,14 @@ void
|
|||
bonjour_init(void)
|
||||
{
|
||||
txt_rec_t txt_rec_http[] = {
|
||||
{ "path", "/" },
|
||||
{ "path", tvheadend_webroot },
|
||||
{ .key = NULL }
|
||||
};
|
||||
|
||||
bonjour_start_service(&svc_http, "_http._tcp", 9981, txt_rec_http);
|
||||
bonjour_start_service(&svc_htsp, "_htsp._tcp", 9982, NULL);
|
||||
bonjour_start_service(&svc_http, "_http._tcp", tvheadend_webui_port,
|
||||
txt_rec_http);
|
||||
|
||||
bonjour_start_service(&svc_htsp, "_htsp._tcp", tvheadend_htsp_port, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue