diff --git a/htmlui.c b/htmlui.c
index 352e9021..89517450 100644
--- a/htmlui.c
+++ b/htmlui.c
@@ -36,6 +36,7 @@
#include "pvr.h"
#include "strtab.h"
#include "dvb.h"
+#include "v4l.h"
#include "iptv_input.h"
static struct strtab recstatustxt[] = {
@@ -785,6 +786,7 @@ page_status(http_connection_t *hc, const char *remain, void *opaque)
tcp_queue_t tq;
int simple = is_client_simple(hc);
th_dvb_adapter_t *tda;
+ th_v4l_adapter_t *tva;
th_subscription_t *s;
th_transport_t *t;
th_dvb_mux_instance_t *tdmi;
@@ -807,7 +809,7 @@ page_status(http_connection_t *hc, const char *remain, void *opaque)
box_top(&tq, "box");
tcp_qprintf(&tq, "
");
- tcp_qprintf(&tq, "
DVB source adapters");
+ tcp_qprintf(&tq, "
DVB adapters");
if(LIST_FIRST(&dvb_adapters_running) == NULL) {
tcp_qprintf(&tq, "No DVB adapters configured
");
@@ -884,7 +886,7 @@ page_status(http_connection_t *hc, const char *remain, void *opaque)
box_top(&tq, "box");
tcp_qprintf(&tq, "
");
- tcp_qprintf(&tq, "IPTV sources
");
+ tcp_qprintf(&tq, "
IPTV sources
");
LIST_FOREACH(t, &all_transports, tht_global_link) {
if(t->tht_type != TRANSPORT_IPTV)
@@ -898,9 +900,34 @@ page_status(http_connection_t *hc, const char *remain, void *opaque)
tcp_qprintf(&tq, "");
box_bottom(&tq);
+ tcp_qprintf(&tq, "
");
+
+ /* Video4Linux adapters */
+
+ box_top(&tq, "box");
+ tcp_qprintf(&tq, "
");
+ tcp_qprintf(&tq, "
Video4Linux adapters");
+
+ LIST_FOREACH(tva, &v4l_adapters, tva_link) {
+ tcp_qprintf(&tq, "
%s
",
+ tva->tva_path);
+
+ if(tva->tva_dispatch_handle == NULL) {
+ tcp_qprintf(&tq, "Not currently active
");
+ } else {
+ tcp_qprintf(&tq, "Tuned to %.3f MHz
",
+ (float)tva->tva_frequency/1000000.0);
+ }
+ }
tcp_qprintf(&tq, "");
+ box_bottom(&tq);
+ tcp_qprintf(&tq, "
");
+
+
+
+
/* Active transports */
tcp_qprintf(&tq, "");
@@ -941,7 +968,7 @@ page_status(http_connection_t *hc, const char *remain, void *opaque)
case TRANSPORT_V4L:
t1 = tmptxt;
- snprintf(tmptxt, sizeof(tmptxt), "V4L: %.2f MHz",
+ snprintf(tmptxt, sizeof(tmptxt), "V4L: %.3f MHz",
(float)t->tht_v4l_frequency / 1000000.0f);
t2 = t->tht_v4l_adapter->tva_path;
break;
diff --git a/tvhead.h b/tvhead.h
index 01940849..ba13a2de 100644
--- a/tvhead.h
+++ b/tvhead.h
@@ -103,7 +103,6 @@ typedef struct th_v4l_adapter {
struct th_transport_list tva_transports;
int tva_frequency;
- int tva_running;
pthread_cond_t tva_run_cond;
diff --git a/v4l.c b/v4l.c
index 8f156906..8044bc6c 100644
--- a/v4l.c
+++ b/v4l.c
@@ -45,7 +45,7 @@
#include "transports.h"
#include "pes.h"
-static struct th_v4l_adapter_list v4l_adapters;
+struct th_v4l_adapter_list v4l_adapters;
static void v4l_fd_callback(int events, void *opaque, int fd);
diff --git a/v4l.h b/v4l.h
index bee92bf2..2d6b4647 100644
--- a/v4l.h
+++ b/v4l.h
@@ -19,6 +19,8 @@
#ifndef V4L_H_
#define V4L_H_
+extern struct th_v4l_adapter_list v4l_adapters;
+
void v4l_init(void);
int v4l_configure_transport(th_transport_t *t, const char *muxname,