Project

General

Profile

Feature #685 ยป enable-descrambler.patch

Marc Perrudin, 2011-09-07 14:45

View differences:

tvheadend/configure 2011-09-07 14:11:08.000000000 +0200
38 38
enable avahi
39 39
enable linuxdvb
40 40
enable v4l
41
enable descrambler
41 42

  
42 43
for opt do
43 44
  optval="${opt#*=}"
......
101 102
    die
102 103
fi
103 104

  
104

  
105
if checkccarg "-mmmx"; then
106
   enable mmx
107
fi
108

  
109
if checkccarg "-msse2"; then
110
   enable sse2
105
if enabled descrambler; then
106
	if checkccarg "-mmmx"; then
107
		enable mmx
108
	fi
109

  
110
	if checkccarg "-msse2"; then
111
		enable sse2
112
	fi
111 113
fi
112 114

  
113 115
check_header_c() {
tvheadend/Makefile 2011-09-07 14:11:07.000000000 +0200
101 101
#
102 102
# cwc
103 103
#
104
SRCS += src/cwc.c \
104
SRCS-${CONFIG_DESCRAMBLER} += src/cwc.c \
105 105
	src/capmt.c \
106 106
	src/ffdecsa/ffdecsa_interface.c \
107 107
	src/ffdecsa/ffdecsa_int.c
......
124 124
#
125 125
# Extra modules
126 126
#
127
SRCS_EXTRA = src/extra/capmt_ca.c
127
SRCS_EXTRA-${CONFIG_DESCRAMBLER} = src/extra/capmt_ca.c
128 128

  
129 129
#
130 130
# AVAHI interface
tvheadend/src/dvb/dvb_tables.c 2011-09-07 14:11:08.000000000 +0200
820 820
dvb_ca_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
821 821
		uint8_t tableid, void *opaque)
822 822
{
823
#if ENABLE_DESCRAMBLER
823 824
  cwc_emm(ptr, len);
825
#endif
824 826
  return 0;
825 827
}
826 828

  
tvheadend/src/main.c 2011-09-07 14:11:08.000000000 +0200
385 385
  webui_init(TVHEADEND_CONTENT_PATH);
386 386

  
387 387
  serviceprobe_init();
388

  
388
#if ENABLE_DESCRAMBLER
389 389
  cwc_init();
390 390

  
391 391
  capmt_init();
392

  
392
#endif
393 393
  epg_init();
394 394

  
395 395
  dvr_init();
396 396

  
397 397
  htsp_init();
398

  
398
#if ENABLE_DESCRAMBLER
399 399
  ffdecsa_init();
400
  
400
#endif
401 401
  if(rawts_input != NULL)
402 402
    rawts_init(rawts_input);
403 403

  
tvheadend/src/service.c 2011-09-07 14:11:08.000000000 +0200
202 202
  if((r = t->s_start_feed(t, weight, force_start)))
203 203
    return r;
204 204

  
205
#if ENABLE_DESCRAMBLER
205 206
  cwc_service_start(t);
206 207
  capmt_service_start(t);
208
#endif
207 209

  
208 210
  pthread_mutex_lock(&t->s_stream_mutex);
209 211

  
tvheadend/src/tsdemux.c 2011-09-07 14:11:08.000000000 +0200
219 219
    service_set_streaming_status_flags(t, TSS_INPUT_SERVICE);
220 220

  
221 221
  avgstat_add(&t->s_rate, 188, dispatch_clock);
222

  
222
#if ENABLE_DESCRAMBLER
223 223
  if((tsb[3] & 0xc0) ||
224 224
      (t->s_scrambled_seen && st->es_type != SCT_CA &&
225 225
       st->es_type != SCT_PAT && st->es_type != SCT_PMT)) {
226

  
226
#else
227
  if(0) {
228
#endif
227 229
    /**
228 230
     * Lock for descrambling, but only if packet was not in error
229 231
     */
tvheadend/src/webui/extjs.c 2011-09-07 14:11:08.000000000 +0200
120 120
  extjs_load(hq, "static/app/tableeditor.js");
121 121
  extjs_load(hq, "static/app/cteditor.js");
122 122
  extjs_load(hq, "static/app/acleditor.js");
123
#if ENABLE_DESCRAMBLER
123 124
  extjs_load(hq, "static/app/cwceditor.js");
124 125
  extjs_load(hq, "static/app/capmteditor.js");
126
#else
127
  extjs_load(hq, "static/app/nodescrambler.js");
128
#endif
125 129
  extjs_load(hq, "static/app/tvadapters.js");
126 130
#if ENABLE_LINUXDVB
127 131
  extjs_load(hq, "static/app/dvb.js");
......
205 209
}
206 210

  
207 211

  
212
#if !ENABLE_DESCRAMBLER
213
/**
214
 *
215
 */
216
static int
217
page_disabled(http_connection_t *hc, const char *remain, void *opaque)
218
{
219
  htsbuf_queue_t *hq = &hc->hc_reply;
220

  
221
  htsbuf_qprintf(hq,
222
		 "<center>"
223
		 "<div class=\"disabled-title\">"
224
		 "Support disabled"
225
		 "</div>"
226
		 "</center>");
227

  
228
  http_output_html(hc);
229
  return 0;
230
}
231
#endif
232

  
233

  
208 234
/**
209 235
 *
210 236
 */
......
1543 1569
  http_path_add("/tv/adapter", 
1544 1570
		NULL, extjs_tvadapter, ACCESS_ADMIN);
1545 1571

  
1572
#if !ENABLE_DESCRAMBLER
1573
  http_path_add("/disabled.html",  NULL, page_disabled,        ACCESS_WEB_INTERFACE);
1574
#endif
1575

  
1546 1576
#if ENABLE_LINUXDVB
1547 1577
  extjs_start_dvb();
1548 1578
#endif
tvheadend/src/webui/static/app/nodescrambler.js 2011-09-07 14:11:08.000000000 +0200
1
tvheadend.cwceditor = function() {
2

  
3
    var cwcdisabled = new Ext.Panel({
4
	    border: false,
5
	    layout:'fit', 
6
	    title:'Code Word Client',
7
	    iconCls:'remove',
8
	    autoLoad: 'disabled.html'
9
	});
10
	
11
	return cwcdisabled;
12
}
13

  
14
tvheadend.capmteditor = function() {
15

  
16
    var capmtdisabled = new Ext.Panel({
17
	    border: false,
18
	    layout:'fit', 
19
	    title:'Capmt Connections',
20
	    iconCls:'remove',
21
        autoLoad: 'disabled.html'
22
	});
23
	
24
	return capmtdisabled;
25
}
26

  
tvheadend/support/configure.inc 2011-09-07 14:11:07.000000000 +0200
27 27
 linuxdvb
28 28
 v4l
29 29
 execinfo
30
 descrambler
30 31
"
31 32

  
32 33
die() {
    (1-1/1)