Add new capabilities field to determine what optional features are included.

This commit is contained in:
Adam Sutton 2012-12-19 21:21:05 +00:00
parent 87f6f58215
commit 99b69cb860
3 changed files with 19 additions and 0 deletions

View file

@ -672,6 +672,7 @@ htsp_method_hello(htsp_connection_t *htsp, htsmsg_t *in)
htsmsg_t *l, *r = htsmsg_create_map();
uint32_t v;
const char *name;
int i = 0;
if(htsmsg_get_u32(in, "htspversion", &v))
return htsp_error("Missing argument 'htspversion'");
@ -691,6 +692,10 @@ htsp_method_hello(htsp_connection_t *htsp, htsmsg_t *in)
/* Capabilities */
l = htsmsg_create_list();
while (tvheadend_capabilities[i]) {
htsmsg_add_str(l, NULL, tvheadend_capabilities[i]);
i++;
}
htsmsg_add_msg(r, "servercapability", l);
/* Set version to lowest num */

View file

@ -78,6 +78,19 @@ int htsp_port;
int htsp_port_extra;
char *tvheadend_cwd;
const char *tvheadend_capabilities[] = {
#if ENABLE_CWC
"cwc",
#endif
#if ENABLE_V4L
"v4l",
#endif
#if ENABLE_LINUXDVB
"linuxdvb",
#endif
NULL
};
static void
handle_sigpipe(int x)
{

View file

@ -36,6 +36,7 @@
extern const char *tvheadend_version;
extern char *tvheadend_cwd;
extern const char *tvheadend_capabilities[];
#define PTS_UNSET INT64_C(0x8000000000000000)