int tda_rawmode;
+ int tda_bytes;
+
// Full mux streaming, protected via the delivery mutex
streaming_pad_t tda_streaming_pad;
#include "service.h"
#include "epggrab.h"
#include "diseqc.h"
+#include "atomic.h"
struct th_dvb_adapter_queue dvb_adapters;
struct th_dvb_mux_instance_tree dvb_muxes;
}
}
r += c;
+ atomic_add(&tda->tda_bytes, c);
/* not enough data */
if (r < 188) continue;
#include "dvr/dvr.h"
#include "service.h"
#include "streaming.h"
+#include "atomic.h"
#include "epggrab.h"
{
th_dvb_adapter_t *tda = aux;
fe_status_t fe_status;
- int status, v, vv, i, fec, q;
+ int status, v, vv, i, fec, q, bw;
th_dvb_mux_instance_t *tdmi = tda->tda_mux_current;
char buf[50];
signal_status_t sigstat;
}
}
+ bw = atomic_exchange(&tda->tda_bytes, 0);
+
if(notify) {
htsmsg_t *m = htsmsg_create_map();
htsmsg_add_str(m, "id", tdmi->tdmi_identifier);
htsmsg_add_u32(m, "ber", tdmi->tdmi_ber);
htsmsg_add_u32(m, "unc", tdmi->tdmi_unc);
htsmsg_add_dbl(m, "uncavg", tdmi->tdmi_unc_avg);
+ htsmsg_add_u32(m, "bw", bw);
notify_by_msg("tvAdapter", m);
}
colored : true
});
+ function renderBw(value) {
+ return parseInt(value / 125);
+ }
+
var cm = new Ext.grid.ColumnModel([{
width : 50,
header : "Name",
width : 100,
header : "Currently tuned to",
dataIndex : 'currentMux'
+ },{
+ width : 100,
+ header : "Bandwidth (kb/s)",
+ dataIndex : 'bw',
+ renderer: renderBw
},{
width : 50,
header : "Bit error rate",
return panel;
}
-
-
-
tvheadend.status = function() {
var panel = new Ext.Panel({
fields : [ 'identifier', 'type', 'name', 'path', 'devicename',
'hostconnection', 'currentMux', 'services', 'muxes', 'initialMuxes',
'satConf', 'deliverySystem', 'freqMin', 'freqMax', 'freqStep',
- 'symrateMin', 'symrateMax', 'signal', 'snr', 'ber', 'unc', 'uncavg'],
+ 'symrateMin', 'symrateMax', 'signal', 'snr', 'ber', 'unc', 'uncavg', 'bw'],
url : 'tv/adapter'
});