Compare commits
679 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34251ce19e | ||
|
|
7bec817c62 | ||
|
|
558aaffd5a | ||
|
|
86724c9b87 | ||
|
|
46a1abc03c | ||
|
|
6308070ac2 | ||
|
|
8c476b3056 | ||
|
|
30d5dda637 | ||
|
|
f85652573f | ||
|
|
1db6430a0c | ||
|
|
5bd4e7e1bb | ||
|
|
10e3f72ede | ||
|
|
6efdba41f7 | ||
|
|
449394cfd6 | ||
|
|
ff6f06149f | ||
|
|
919d71078b | ||
|
|
2a2a8cda2c | ||
|
|
f55a83afcb | ||
|
|
3ce4418833 | ||
|
|
cf2f80badf | ||
|
|
307cf64bfb | ||
|
|
0e5e0a9e04 | ||
|
|
83688801c7 | ||
|
|
fcaac62c5f | ||
|
|
b96a7982ac | ||
|
|
74881c1fd2 | ||
|
|
593b769300 | ||
|
|
477ade7b16 | ||
|
|
036bcad109 | ||
|
|
473b14446a | ||
|
|
ce45d89896 | ||
|
|
321b9dcd34 | ||
|
|
950033c06e | ||
|
|
a18834178b | ||
|
|
14c18a2de5 | ||
|
|
9553f6c11c | ||
|
|
22b62bed59 | ||
|
|
d1ff72f766 | ||
|
|
32502a5cf6 | ||
|
|
6fa2333414 | ||
|
|
152ceec969 | ||
|
|
6fbb705947 | ||
|
|
0e0a7de92f | ||
|
|
f02dead4a7 | ||
|
|
ed1cb4be13 | ||
|
|
29092e2ce5 | ||
|
|
114a9fb370 | ||
|
|
9d21adb6f3 | ||
|
|
a36921fbe6 | ||
|
|
c8f3e6708b | ||
|
|
6256e166aa | ||
|
|
a3c3fa5cce | ||
|
|
573e184cf5 | ||
|
|
fe325e7aed | ||
|
|
b088522f57 | ||
|
|
12f55ac1c6 | ||
|
|
b70a270365 | ||
|
|
a1a9217f8e | ||
|
|
91aa5ed603 | ||
|
|
f298846adb | ||
|
|
210b1e85d7 | ||
|
|
95c89a8fcc | ||
|
|
2c4bfc4696 | ||
|
|
b145e22f78 | ||
|
|
ba4f137c73 | ||
|
|
3f94aca091 | ||
|
|
767ec892e2 | ||
|
|
07063e9a40 | ||
|
|
0121c1e36b | ||
|
|
6cb43ead57 | ||
|
|
7262ed18e4 | ||
|
|
3771c8eb3a | ||
|
|
ed925ce674 | ||
|
|
60d8f22457 | ||
|
|
4b9b515e15 | ||
|
|
8f8843c937 | ||
|
|
ea51339ad4 | ||
|
|
bc003a1070 | ||
|
|
3e01e22216 | ||
|
|
0e0f3fb7c5 | ||
|
|
b8e7542999 | ||
|
|
9b7cab907b | ||
|
|
5c23e3fabc | ||
|
|
725aba8db0 | ||
|
|
cf901d6522 | ||
|
|
40d6f0578e | ||
|
|
fdd2a2eb1e | ||
|
|
d63f3bdb8d | ||
|
|
ea82652eb9 | ||
|
|
4c2eb77ff9 | ||
|
|
15505f80ca | ||
|
|
093234a14d | ||
|
|
b7852952ba | ||
|
|
2737a78b57 | ||
|
|
2b840b1dd5 | ||
|
|
ba3b984460 | ||
|
|
902ae4a600 | ||
|
|
8d68698bdb | ||
|
|
b4886ff7cd | ||
|
|
f056ffee6b | ||
|
|
d1edf6f772 | ||
|
|
d4275b65d7 | ||
|
|
1a97097a30 | ||
|
|
a2000b86c0 | ||
|
|
78dc13c2f9 | ||
|
|
58aaa9f266 | ||
|
|
70e6533397 | ||
|
|
ffc8962357 | ||
|
|
20a1612253 | ||
|
|
6069dd14c4 | ||
|
|
2e9cbc83e1 | ||
|
|
7b4edccf81 | ||
|
|
43a2a0d5c0 | ||
|
|
6b9e43b8d6 | ||
|
|
73ed78fbbd | ||
|
|
6b4e607288 | ||
|
|
44bc649684 | ||
|
|
27bf55215b | ||
|
|
f73054755f | ||
|
|
19d7e8ee43 | ||
|
|
ff28651650 | ||
|
|
9bc26c1bc7 | ||
|
|
7e118a4dad | ||
|
|
01a5422d0b | ||
|
|
ec9172bb6f | ||
|
|
c5dbf3d94f | ||
|
|
cc7e9e85af | ||
|
|
fa51bfcf57 | ||
|
|
8c5eecfb37 | ||
|
|
7e4af5d0ab | ||
|
|
b97a1d80b7 | ||
|
|
7ff4063b58 | ||
|
|
f4d7f4cf7a | ||
|
|
95ccc177db | ||
|
|
746bace7d7 | ||
|
|
ff01e1d966 | ||
|
|
3f7618ab9a | ||
|
|
a6e57b5674 | ||
|
|
ecf13324cb | ||
|
|
c546b5979a | ||
|
|
ff79b153c6 | ||
|
|
aa4fbd7ab1 | ||
|
|
7023931d7c | ||
|
|
82eb3158ae | ||
|
|
7fa5143928 | ||
|
|
00a162d5cb | ||
|
|
7b3f683968 | ||
|
|
9507eb48c2 | ||
|
|
ae61666e00 | ||
|
|
980dc049c9 | ||
|
|
e4fa6ff804 | ||
|
|
ff0b3b6465 | ||
|
|
9817b9d937 | ||
|
|
f91baeb8dc | ||
|
|
3d0546ddbc | ||
|
|
c7b3ffe573 | ||
|
|
7945de4290 | ||
|
|
714a3fc2ea | ||
|
|
3e910acdab | ||
|
|
1fbca9e3b3 | ||
|
|
27ae3473ba | ||
|
|
c28895b04d | ||
|
|
168fa73fdb | ||
|
|
cadffc0208 | ||
|
|
8e10d3604a | ||
|
|
25c01ba39c | ||
|
|
7621731a35 | ||
|
|
50a575cd9d | ||
|
|
4e4b826bc7 | ||
|
|
9c2bb7c5ed | ||
|
|
46b83941bf | ||
|
|
d38a928281 | ||
|
|
ff74c4b7ab | ||
|
|
4aadb2013e | ||
|
|
ad905fa334 | ||
|
|
9d2280d6fb | ||
|
|
ad0543112e | ||
|
|
0015373fea | ||
|
|
173b83b28e | ||
|
|
a777d1e3fe | ||
|
|
4a6592e635 | ||
|
|
3b6d0f3e7c | ||
|
|
3b0f62e75a | ||
|
|
8b4aff7d69 | ||
|
|
9eb67f02a9 | ||
|
|
5e21db7499 | ||
|
|
8170ae661f | ||
|
|
afb99f9b76 | ||
|
|
ca8d8a0345 | ||
|
|
b62eb63f10 | ||
|
|
52e5e21226 | ||
|
|
90be8140a5 | ||
|
|
58f400fb35 | ||
|
|
06461b6e7e | ||
|
|
6d16dc9399 | ||
|
|
3b9461b7c0 | ||
|
|
efa8c1d95a | ||
|
|
3640dcdb46 | ||
|
|
632c954cff | ||
|
|
a0c977ddfe | ||
|
|
ce555f26e7 | ||
|
|
f6123f7c87 | ||
|
|
473be051cf | ||
|
|
945a7f338f | ||
|
|
02a6db5ddb | ||
|
|
1de0c74187 | ||
|
|
98ad4cafd3 | ||
|
|
0a8e88c664 | ||
|
|
0849a34c75 | ||
|
|
14f40f50fe | ||
|
|
69649cbcd5 | ||
|
|
c20f1d1b4f | ||
|
|
74283a83e6 | ||
|
|
07b8b99b94 | ||
|
|
f94e159ff5 | ||
|
|
53b857cbe0 | ||
|
|
083d729c00 | ||
|
|
69258d33bf | ||
|
|
bf4f1626e9 | ||
|
|
716b8278dc | ||
|
|
12cfeb37a7 | ||
|
|
c06c559c88 | ||
|
|
030f03896f | ||
|
|
09b0a8d9e1 | ||
|
|
77f8e89bfe | ||
|
|
6b5dc87d62 | ||
|
|
de08817d21 | ||
|
|
9cd1ba2ff4 | ||
|
|
fe22f229a3 | ||
|
|
a1af223fdb | ||
|
|
aed76dd14b | ||
|
|
d51a1d9e32 | ||
|
|
bb68944a2f | ||
|
|
24a9b86e53 | ||
|
|
53c54474b3 | ||
|
|
d7911a0e5f | ||
|
|
fc350227e8 | ||
|
|
5ce4c9b9be | ||
|
|
7b5bb1eccc | ||
|
|
3d5d9bb810 | ||
|
|
af87c06c55 | ||
|
|
004765ff88 | ||
|
|
6a6334f2fd | ||
|
|
9832770f9e | ||
|
|
0691728636 | ||
|
|
f1ef6741d8 | ||
|
|
009708a7d8 | ||
|
|
b080dfb92b | ||
|
|
413556c3a2 | ||
|
|
0e8f009cfa | ||
|
|
5a3251fe52 | ||
|
|
a9ff8d0ca2 | ||
|
|
1c7310c27e | ||
|
|
b66a9560c4 | ||
|
|
b7ae3da30a | ||
|
|
c596b55db7 | ||
|
|
e0280ea6d3 | ||
|
|
a86698dc1d | ||
|
|
780c52e9f2 | ||
|
|
97adc11fa7 | ||
|
|
97259d9047 | ||
|
|
683ab7ee3d | ||
|
|
9e6a81902c | ||
|
|
9900b89dea | ||
|
|
3e6dec890d | ||
|
|
7ac1120db3 | ||
|
|
508f4f6415 | ||
|
|
322f636ba7 | ||
|
|
72a232b76b | ||
|
|
5c3d8fa4d9 | ||
|
|
491e2ae3c4 | ||
|
|
90fbebf51c | ||
|
|
84813a13ac | ||
|
|
918c8836d1 | ||
|
|
9bf0c62589 | ||
|
|
4292d9b3e7 | ||
|
|
a1c9a1d88a | ||
|
|
ee610c5147 | ||
|
|
9b8f50327d | ||
|
|
fdce156ffc | ||
|
|
a4c77ff5df | ||
|
|
c961f399b1 | ||
|
|
76ca1be07c | ||
|
|
07b543cef0 | ||
|
|
2dff1483d6 | ||
|
|
28db923d0c | ||
|
|
76838a2ada | ||
|
|
cd3828a3a0 | ||
|
|
2154b4a443 | ||
|
|
5d479240e7 | ||
|
|
9621472958 | ||
|
|
c2333ca728 | ||
|
|
92e72d5d89 | ||
|
|
87c051620d | ||
|
|
15902be7bc | ||
|
|
0f6c67d008 | ||
|
|
b1f4435aa2 | ||
|
|
95fc06c22c | ||
|
|
248df9fc20 | ||
|
|
5caed7f096 | ||
|
|
09a110462b | ||
|
|
79beae5de9 | ||
|
|
4972ec6b8b | ||
|
|
ef955a58e2 | ||
|
|
1ee9676ad3 | ||
|
|
cbc4468094 | ||
|
|
498742d87b | ||
|
|
6096dde704 | ||
|
|
0a4eef7558 | ||
|
|
cd771304cd | ||
|
|
18c8175bba | ||
|
|
af5e469dd3 | ||
|
|
8588272f4d | ||
|
|
c2ce5cc44c | ||
|
|
abc78fcae4 | ||
|
|
c8e7bcedd4 | ||
|
|
f19d9359d2 | ||
|
|
27e5f314dd | ||
|
|
2d164aa463 | ||
|
|
1be5d14d06 | ||
|
|
02a4a3f7c9 | ||
|
|
dc3cc80344 | ||
|
|
a5edf61734 | ||
|
|
5baaad9e49 | ||
|
|
a59badeef8 | ||
|
|
1c7bb89a88 | ||
|
|
32a349df51 | ||
|
|
2e5e7380b6 | ||
|
|
3997e74461 | ||
|
|
3c924bb4f7 | ||
|
|
3d1c25fc9c | ||
|
|
8dc8bfa136 | ||
|
|
e2ba2dfa80 | ||
|
|
42706f338b | ||
|
|
faaea8141f | ||
|
|
7bf7f5f77a | ||
|
|
3d23d92fbf | ||
|
|
c1a54f9ad5 | ||
|
|
e61c979e2a | ||
|
|
ea7d4c445c | ||
|
|
8db2e6705e | ||
|
|
4448113a7b | ||
|
|
04102ad874 | ||
|
|
bb5c5509f1 | ||
|
|
107e046f43 | ||
|
|
e6bcfb83fd | ||
|
|
f9eab5d248 | ||
|
|
160ce21140 | ||
|
|
dc19d7cfe1 | ||
|
|
792e217186 | ||
|
|
ac61c98340 | ||
|
|
8712868362 | ||
|
|
0155cd74ad | ||
|
|
c566394ae4 | ||
|
|
22d10112de | ||
|
|
e0441dec60 | ||
|
|
2f9488c284 | ||
|
|
4f7ad1833f | ||
|
|
304f24dcbc | ||
|
|
d9d901c707 | ||
|
|
4ed7faeba3 | ||
|
|
1ed44a9b27 | ||
|
|
a7ca4e3979 | ||
|
|
5c0da4607b | ||
|
|
d990769bab | ||
|
|
45d2ecfbf2 | ||
|
|
028a6b291c | ||
|
|
c76e7355c1 | ||
|
|
6dd213329a | ||
|
|
59c41e76a1 | ||
|
|
4e373d99ae | ||
|
|
145fc05656 | ||
|
|
3d54e09252 | ||
|
|
d9e06bd4bd | ||
|
|
6a9d95d161 | ||
|
|
2be7c80a01 | ||
|
|
7b0b4eec6f | ||
|
|
3f3e198c9b | ||
|
|
285acff880 | ||
|
|
82399ef04c | ||
|
|
0aadee2bad | ||
|
|
d2944b96fa | ||
|
|
8fcded8e79 | ||
|
|
5ec4748cfd | ||
|
|
3349daf476 | ||
|
|
79bfcdbee8 | ||
|
|
e243a066b1 | ||
|
|
61130bb896 | ||
|
|
f7d7a8aad8 | ||
|
|
1965e3511c | ||
|
|
bfa75c711f | ||
|
|
8c0a56de90 | ||
|
|
2689cd4218 | ||
|
|
ccc1b39a15 | ||
|
|
ad1115e98e | ||
|
|
79a3a24c00 | ||
|
|
1e82237a1e | ||
|
|
d9111f52a8 | ||
|
|
222856ad82 | ||
|
|
6b8f37c527 | ||
|
|
22c53cb072 | ||
|
|
9c410eaeef | ||
|
|
b21aea287f | ||
|
|
7a3fa0070a | ||
|
|
f8f5eaf1e5 | ||
|
|
924acef40e | ||
|
|
036082503d | ||
|
|
306dd41b5b | ||
|
|
36be00b307 | ||
|
|
ec582089bc | ||
|
|
e646610990 | ||
|
|
e57553ae7d | ||
|
|
31001afd23 | ||
|
|
d8826dcc0d | ||
|
|
810088e698 | ||
|
|
b031e4833f | ||
|
|
357c00e39a | ||
|
|
80c6730a0f | ||
|
|
6712c5db3f | ||
|
|
004a391f18 | ||
|
|
f9607329d4 | ||
|
|
6e9af9e243 | ||
|
|
ff4d26f4ed | ||
|
|
2ee898af1a | ||
|
|
ba920bef8f | ||
|
|
f7c8509269 | ||
|
|
b3e87927b5 | ||
|
|
6cfa01304f | ||
|
|
2117b99bf2 | ||
|
|
3a6b597f45 | ||
|
|
628279039b | ||
|
|
b768e322ed | ||
|
|
64c488c886 | ||
|
|
68fd7478cc | ||
|
|
a20709c1a6 | ||
|
|
81472a7a29 | ||
|
|
cef57bf597 | ||
|
|
73beb73afc | ||
|
|
e18851b6fe | ||
|
|
97c46a02b5 | ||
|
|
582c4ee4bf | ||
|
|
59ba745d77 | ||
|
|
72080b8d9d | ||
|
|
9029c645b0 | ||
|
|
0e45435dfb | ||
|
|
b14d6da9cb | ||
|
|
71ba13443a | ||
|
|
63d7628786 | ||
|
|
d78d5cd647 | ||
|
|
e93eefb02e | ||
|
|
eb5d9ee358 | ||
|
|
3a457f18f6 | ||
|
|
f38091875a | ||
|
|
c33c171d68 | ||
|
|
c71945f6fb | ||
|
|
7242d8a2ff | ||
|
|
96f52fc97f | ||
|
|
4f157cf91a | ||
|
|
d4b844a7ed | ||
|
|
7bd3c9e3cf | ||
|
|
88a0963804 | ||
|
|
584b311f04 | ||
|
|
a853a1e204 | ||
|
|
0bf911e4f5 | ||
|
|
fc61557865 | ||
|
|
aaacf3df82 | ||
|
|
5f8e3a60d1 | ||
|
|
7255c0290c | ||
|
|
19725f077f | ||
|
|
b6c42adf66 | ||
|
|
779a3f01ce | ||
|
|
2482039479 | ||
|
|
60744990c3 | ||
|
|
a346645a0d | ||
|
|
b595704d97 | ||
|
|
f0299e531b | ||
|
|
6eb8ce874b | ||
|
|
bd88997c37 | ||
|
|
ef5d518eb9 | ||
|
|
d2a3685ac9 | ||
|
|
e61360c9d3 | ||
|
|
d0ac425825 | ||
|
|
e1feb956cc | ||
|
|
acdd4c8191 | ||
|
|
747ab28185 | ||
|
|
8012e94bbf | ||
|
|
ee47d62a85 | ||
|
|
a94e7ac428 | ||
|
|
cf17204de0 | ||
|
|
ee0e2a40b8 | ||
|
|
9df9fc94e2 | ||
|
|
51c9997790 | ||
|
|
4807e79b21 | ||
|
|
c35584e32e | ||
|
|
f93c4909d0 | ||
|
|
9d8267461e | ||
|
|
013d435d32 | ||
|
|
2e24540df2 | ||
|
|
52031840e5 | ||
|
|
0e192a0947 | ||
|
|
ab57f8a53b | ||
|
|
d8f296ec61 | ||
|
|
93b88a2c6d | ||
|
|
1a7335f86b | ||
|
|
ddad2a85e0 | ||
|
|
e26479fef0 | ||
|
|
a2784eb384 | ||
|
|
06a7103708 | ||
|
|
403e846d02 | ||
|
|
691852e66d | ||
|
|
f1d9d808a6 | ||
|
|
d888fd8686 | ||
|
|
338c71bf5b | ||
|
|
f747479588 | ||
|
|
cb6325270f | ||
|
|
8ed99522c0 | ||
|
|
1fdc2df4c9 | ||
|
|
8480938b32 | ||
|
|
5174fe32f8 | ||
|
|
1bdf8ab97b | ||
|
|
27f93eee21 | ||
|
|
7b1a13f1fe | ||
|
|
a8fc6b71a4 | ||
|
|
0991e2a7ab | ||
|
|
53c9613e76 | ||
|
|
08aabd4338 | ||
|
|
aceb2552bc | ||
|
|
1285beadd1 | ||
|
|
dae8099efc | ||
|
|
36f99727ee | ||
|
|
bb60e57b60 | ||
|
|
d510db8594 | ||
|
|
7372cde125 | ||
|
|
314b3a76bb | ||
|
|
ff1f7ccbaa | ||
|
|
6d12955c07 | ||
|
|
9421787d2e | ||
|
|
45a6eb522f | ||
|
|
ab35dbe2ae | ||
|
|
8e4534c7b0 | ||
|
|
caeb39c657 | ||
|
|
64615c332e | ||
|
|
c92622b769 | ||
|
|
43411247fc | ||
|
|
78ec06c9dc | ||
|
|
0c3eab9e19 | ||
|
|
7217ea7b0d | ||
|
|
2df1c3527d | ||
|
|
24b6d4cca3 | ||
|
|
19caa4eb6c | ||
|
|
3b1ca9a68b | ||
|
|
a603e3bf18 | ||
|
|
7f2c5787db | ||
|
|
27d4ab0214 | ||
|
|
cf3f73fc65 | ||
|
|
09ecf7bec7 | ||
|
|
f70bb0b4b9 | ||
|
|
cb30d6d14a | ||
|
|
ae8e5a2eb6 | ||
|
|
9eee489036 | ||
|
|
d72ec96fea | ||
|
|
b5eaf5897c | ||
|
|
2b1b614564 | ||
|
|
adf452c234 | ||
|
|
6f03b497c3 | ||
|
|
c691a33edd | ||
|
|
06d902745d | ||
|
|
ad91066201 | ||
|
|
98a19be4c7 | ||
|
|
460e578997 | ||
|
|
f2a987ab77 | ||
|
|
1daaba248f | ||
|
|
3490780d1d | ||
|
|
9912f0635e | ||
|
|
c5b63fe01a | ||
|
|
0b84f525f8 | ||
|
|
726a218430 | ||
|
|
12df4db25c | ||
|
|
8647083a85 | ||
|
|
f8bbf18c09 | ||
|
|
8672ac5b63 | ||
|
|
6f41b37996 | ||
|
|
fd7bef7737 | ||
|
|
482eaffcb2 | ||
|
|
9cb02d21a7 | ||
|
|
13afe88c7e | ||
|
|
c76d5574b7 | ||
|
|
35fdb1f672 | ||
|
|
6c7a388ce1 | ||
|
|
0e084e8fa6 | ||
|
|
cb3c9bfba0 | ||
|
|
087741801e | ||
|
|
43006644d6 | ||
|
|
af68bee9dc | ||
|
|
09109e9259 | ||
|
|
1a9508dceb | ||
|
|
9f77881f53 | ||
|
|
d6f40823fa | ||
|
|
ba214616b3 | ||
|
|
3f9a6d3353 | ||
|
|
a28b8d1fa6 | ||
|
|
2fb1ca693a | ||
|
|
37aff83993 | ||
|
|
ef6cd3a6c3 | ||
|
|
91ebd27b9e | ||
|
|
adb8971ca1 | ||
|
|
ab047bd85a | ||
|
|
3368ae19c0 | ||
|
|
6df5a568d0 | ||
|
|
535f6451f8 | ||
|
|
cca4563b97 | ||
|
|
fc9b765cc9 | ||
|
|
ac02b5fd8f | ||
|
|
f0ed75b919 | ||
|
|
0757e8858d | ||
|
|
bbd4355622 | ||
|
|
f0a6ca107a | ||
|
|
6f4cb57328 | ||
|
|
49869f1686 | ||
|
|
986806a21e | ||
|
|
14c26535be | ||
|
|
41a52e972b | ||
|
|
5cd56586b9 | ||
|
|
53b78bb5ed | ||
|
|
de15aaaf6b | ||
|
|
5ec73a2e7e | ||
|
|
ddc180276a | ||
|
|
ceedce8668 | ||
|
|
2a02a5914e | ||
|
|
bcc13a27a3 | ||
|
|
564d8cf1b4 | ||
|
|
af534fc7a9 | ||
|
|
513f9c98cc | ||
|
|
7f8627cd01 | ||
|
|
6f567364e5 | ||
|
|
88f0cf423f | ||
|
|
8d808bea03 | ||
|
|
f50386d87f | ||
|
|
2ad5beded2 | ||
|
|
b612271f7f | ||
|
|
bd1fe46897 | ||
|
|
617d5bfc45 | ||
|
|
52e8b1e9c7 | ||
|
|
38ee662107 | ||
|
|
a581aee4cc | ||
|
|
52d73089f2 | ||
|
|
a78774bbb0 | ||
|
|
b67f2985d5 | ||
|
|
fc78eb074c | ||
|
|
4f05ddedaa | ||
|
|
2c51355e77 | ||
|
|
2defc5f4bc | ||
|
|
321041a8ba | ||
|
|
53ad9d2478 | ||
|
|
8dcc5c97b8 | ||
|
|
23b0220008 | ||
|
|
7338855b9b | ||
|
|
4c2c481e28 | ||
|
|
3f47dd5ec2 | ||
|
|
88b437dc03 | ||
|
|
5d1977062a | ||
|
|
9b9b98b1a3 | ||
|
|
1774a0a711 | ||
|
|
f811ca5244 | ||
|
|
3765e1ac07 | ||
|
|
99917e437e | ||
|
|
d626253cfc | ||
|
|
bf65f62be8 | ||
|
|
3f5ab0b9ef | ||
|
|
a5ee6b23cb | ||
|
|
7564d70e96 | ||
|
|
aece064802 | ||
|
|
30c4121a0c | ||
|
|
3a0a58f003 | ||
|
|
db9196f8fd | ||
|
|
2a80b33c0d | ||
|
|
4d6a95c553 | ||
|
|
5fad8bb95f | ||
|
|
ea7d19804e |
21
CHANGELOG
@@ -1,20 +1,5 @@
|
||||
OpenELEC (Version 2.1)
|
||||
OpenELEC (Version 3.0)
|
||||
|
||||
Changelog OpenELEC-2.0 to OpenELEC-2.1
|
||||
for a detailed Changelog from OpenELEC-2.0 to OpenELEC-3.0 see:
|
||||
https://github.com/OpenELEC/OpenELEC.tv/compare/2.0.0...3.0.0
|
||||
|
||||
Added packages:
|
||||
- add package 'ppp'
|
||||
- add package 'pptp'
|
||||
|
||||
Package updates:
|
||||
- update linux to linux-3.5
|
||||
- update dialog to dialog-1.1-20120215
|
||||
- update connman to connman-1.4
|
||||
|
||||
Added functions:
|
||||
- sshd can be enabled via OpenELEC Settings addon
|
||||
- add PPTP support
|
||||
|
||||
Changed functions:
|
||||
|
||||
Removed functions:
|
||||
|
||||
@@ -71,7 +71,7 @@ providing cutting edge hardware support to deliver a set-top box experience.
|
||||
read-only with the exception of /var (containing runtime configuration data).
|
||||
* Manual update/downgrade procedure is as follows:
|
||||
Extract the snapshot and navigate to the 'target' directory.
|
||||
Copy KERNEL and SYSTEM to the 'Update' network share (or /storage/.update) on
|
||||
Copy KERNEL and SYSTEM along with KERNEL.md5 and SYSTEM.md5 to the 'Update' network share (or /storage/.update) on
|
||||
your openelec machine. Your system will automatically upgrade during the
|
||||
next reboot.
|
||||
* Automatic mounting of filesystems is supported. Devices such as USB Flash
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<description>
|
||||
@PKG_LONGDESC@
|
||||
</description>
|
||||
<disclaimer>
|
||||
@PKG_DISCLAIMER@
|
||||
</disclaimer>
|
||||
<platform>all</platform>
|
||||
</extension>
|
||||
</addon>
|
||||
|
||||
@@ -34,7 +34,7 @@ fi
|
||||
|
||||
get_graphicdrivers() {
|
||||
if [ "$GRAPHIC_DRIVERS" = "all" ]; then
|
||||
GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 fglrx nvidia vmware virtualbox"
|
||||
GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 fglrx fglrx-legacy nvidia vmware virtualbox"
|
||||
fi
|
||||
|
||||
for drv in $GRAPHIC_DRIVERS; do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# VERSION: set full version, use "devel" for development version
|
||||
OPENELEC_VERSION="2.99.2"
|
||||
OPENELEC_VERSION="3.0.1"
|
||||
|
||||
# OS_VERSION: OS Version
|
||||
OS_VERSION="3.0"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotatoServer"
|
||||
PKG_VERSION="393c14d"
|
||||
PKG_VERSION="a49a00a"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
||||
4
packages/3rdparty/download/SABnzbd/meta
vendored
@@ -19,14 +19,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SABnzbd"
|
||||
PKG_VERSION="0.7.9"
|
||||
PKG_VERSION="0.7.11"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://sabnzbd.org/"
|
||||
PKG_URL="$SOURCEFORGE_SRC/sabnzbdplus/sabnzbdplus/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}-src.tar.gz"
|
||||
PKG_DEPENDS="Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline"
|
||||
PKG_BUILD_DEPENDS="toolchain Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline"
|
||||
PKG_BUILD_DEPENDS="toolchain Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline configobj"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service/downloadmanager"
|
||||
PKG_SHORTDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can."
|
||||
|
||||
2
packages/3rdparty/download/SickBeard/meta
vendored
@@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SickBeard"
|
||||
PKG_VERSION="e6dcfb3"
|
||||
PKG_VERSION="4e57625"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
||||
35
packages/3rdparty/driver/sundtek/meta
vendored
@@ -1,35 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="sundtek"
|
||||
PKG_VERSION="20120912"
|
||||
PKG_REV="0"
|
||||
PKG_ARCH="i386 x86_64 arm"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://support.sundtek.com/"
|
||||
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}-${ARCH}.tar.gz"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS=""
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="driver/dvb"
|
||||
PKG_SHORTDESC="Sundtek USB Stick DVB userspace driver"
|
||||
PKG_LONGDESC="Driver for Sundtek MediaTV Pro (DVB-C, DVB-T, AnalogTV, Composite, S-Video, FM-Radio USB Stick) and Sundtek SkyTV Ultimate (DVB-S/S2 USB)."
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
4
packages/3rdparty/lib/ccid/meta
vendored
@@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ccid"
|
||||
PKG_VERSION="1.4.8"
|
||||
PKG_VERSION="1.4.9"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://pcsclite.alioth.debian.org/ccid.html"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/3768/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/3866/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain pcsc-lite"
|
||||
PKG_PRIORITY="optional"
|
||||
|
||||
45
packages/3rdparty/lib/xine-lib/build
vendored
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
VDR_GUI_ADDON_DIR="/storage/.xbmc/addons/script.video.vdr-gui"
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
strip_lto
|
||||
|
||||
./autogen.sh --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--with-external-ffmpeg \
|
||||
--disable-dxr3 \
|
||||
--disable-aalib \
|
||||
--disable-vcd \
|
||||
--disable-musepack
|
||||
|
||||
sed -i "s|XINE_PLUGINDIR .*|XINE_PLUGINDIR \"$VDR_GUI_ADDON_DIR/lib/xine/plugins/2.1\"|" include/configure.h
|
||||
sed -i "s|XINE_PLUGINROOT .*|XINE_PLUGINROOT \"$VDR_GUI_ADDON_DIR/lib/xine/plugins/2\"|" include/configure.h
|
||||
|
||||
# same for fonts and locales and copy them
|
||||
|
||||
make
|
||||
$MAKEINSTALL
|
||||
@@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="vdr-epgsearch"
|
||||
PKG_VERSION="1.0.0"
|
||||
PKG_VERSION="0fc4817"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://winni.vdr-developer.org/epgsearch/"
|
||||
PKG_URL="http://winni.vdr-developer.org/epgsearch/downloads/${PKG_NAME}-${PKG_VERSION}.tgz"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="vdr"
|
||||
PKG_BUILD_DEPENDS="toolchain vdr"
|
||||
PKG_PRIORITY="optional"
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From 15d08ffb09de612ae1eb53b2aeca2f906f7076a6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Wieninger
|
||||
Date: Sun, 04 Mar 2012 08:44:19 +0000
|
||||
Subject: support for vdr 1.7.25
|
||||
|
||||
---
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0397217..4a72b41 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -64,7 +64,7 @@ CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -Wno-format-y2k
|
||||
|
||||
### The directory environment:
|
||||
|
||||
-DVBDIR = ../../../../DVB
|
||||
+#DVBDIR = ../../../../DVB
|
||||
VDRDIR = ../../..
|
||||
LIBDIR = ../../lib
|
||||
TMPDIR = /tmp
|
||||
diff --git a/conflictcheck.h b/conflictcheck.h
|
||||
index fcc6dcb..7e6fb7a 100644
|
||||
--- a/conflictcheck.h
|
||||
+++ b/conflictcheck.h
|
||||
@@ -163,12 +163,20 @@ class cConflictCheckDevice
|
||||
result = true;
|
||||
#ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
|
||||
else
|
||||
+#if APIVERSNUM < 10725
|
||||
result = Priority >= Setup.PrimaryLimit;
|
||||
+#else
|
||||
+ result = Priority >= 0;
|
||||
+#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
+#if APIVERSNUM < 10725
|
||||
result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
|
||||
+#else
|
||||
+ result = !IsPrimaryDevice() || Priority >= 0;
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
needsDetachReceivers = true;
|
||||
--
|
||||
cgit v0.9.0.2-39-g756e
|
||||
4
packages/3rdparty/multimedia/vdr-iptv/build
vendored
@@ -24,6 +24,10 @@
|
||||
|
||||
VDR_DIR=`basename $BUILD/vdr-[0-9]*`
|
||||
|
||||
CFLAGS="$CFLAGS -fPIC"
|
||||
CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
LDFLAGS="$LDFLAGS -fPIC"
|
||||
|
||||
cd $PKG_BUILD
|
||||
make VDRDIR="../$VDR_DIR" LIBDIR="." LOCALEDIR="./locale"
|
||||
|
||||
|
||||
14
packages/3rdparty/multimedia/vdr-iptv/patches/vdr-iptv-0.5.2-use-our-strip.patch
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d41acd1..58faab1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -5,9 +5,6 @@
|
||||
# Debugging on/off
|
||||
#IPTV_DEBUG = 1
|
||||
|
||||
-# Strip debug symbols? Set eg. to /bin/true if not
|
||||
-STRIP = strip
|
||||
-
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
# By default the main source file also carries this name.
|
||||
@@ -0,0 +1,50 @@
|
||||
From 94a0a210a485ce1fc95c47a6bc67c4c16c89a0f9 Mon Sep 17 00:00:00 2001
|
||||
From: Dieter Hametner
|
||||
Date: Sun, 25 Mar 2012 14:42:12 +0000
|
||||
Subject: Updated LIVE to latest changes in vdr 1.7.27
|
||||
|
||||
- Do not use the direct access to cRecoding members any more.
|
||||
---
|
||||
diff --git a/epg_events.cpp b/epg_events.cpp
|
||||
index a514769..cd4996e 100644
|
||||
--- a/epg_events.cpp
|
||||
+++ b/epg_events.cpp
|
||||
@@ -182,12 +182,20 @@ namespace vdrlive
|
||||
|
||||
time_t EpgRecording::GetStartTime() const
|
||||
{
|
||||
+#if VDRVERSNUM < 10726
|
||||
return m_recording ? m_recording->start : 0;
|
||||
+#else
|
||||
+ return m_recording ? m_recording->Start() : 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
time_t EpgRecording::GetEndTime() const
|
||||
{
|
||||
+#if VDRVERSNUM < 10726
|
||||
return m_recording ? m_recording->start : 0;
|
||||
+#else
|
||||
+ return m_recording ? m_recording->Start() : 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
const string EpgRecording::Name() const
|
||||
diff --git a/recman.cpp b/recman.cpp
|
||||
index fb315d2..6a2fc00 100644
|
||||
--- a/recman.cpp
|
||||
+++ b/recman.cpp
|
||||
@@ -383,7 +383,11 @@ namespace vdrlive {
|
||||
|
||||
time_t RecordingsItemRec::StartTime() const
|
||||
{
|
||||
+#if VDRVERSNUM < 10726
|
||||
return m_recording->start;
|
||||
+#else
|
||||
+ return m_recording->Start();
|
||||
+#endif
|
||||
}
|
||||
|
||||
long RecordingsItemRec::Duration() const
|
||||
--
|
||||
cgit v0.9.0.2-40-g7c79
|
||||
@@ -0,0 +1,40 @@
|
||||
From c3ecf9fabb674bc154f5a08cdd62e74e2b5d0e36 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Ruppert
|
||||
Date: Sun, 03 Jun 2012 23:42:31 +0000
|
||||
Subject: Compile fix for >=vdr-1.7.28
|
||||
|
||||
---
|
||||
diff --git a/tasks.cpp b/tasks.cpp
|
||||
index 9f20190..2a2b8d5 100644
|
||||
--- a/tasks.cpp
|
||||
+++ b/tasks.cpp
|
||||
@@ -60,9 +60,15 @@ void PlayRecordingTask::Action()
|
||||
|
||||
const char *current = NowReplaying();
|
||||
if (!current || (0 != strcmp(current, recording->FileName()))) {
|
||||
+#if VDRVERSNUM >= 10728
|
||||
+ cReplayControl::SetRecording( 0 );
|
||||
+ cControl::Shutdown();
|
||||
+ cReplayControl::SetRecording( recording->FileName() );
|
||||
+#else
|
||||
cReplayControl::SetRecording( 0, 0 );
|
||||
cControl::Shutdown();
|
||||
cReplayControl::SetRecording( recording->FileName(), recording->Title() );
|
||||
+#endif
|
||||
cControl::Launch( new cReplayControl );
|
||||
cControl::Attach();
|
||||
}
|
||||
@@ -122,7 +128,11 @@ void StopRecordingTask::Action()
|
||||
return;
|
||||
}
|
||||
|
||||
+#if VDRVERSNUM >= 10728
|
||||
+ cReplayControl::SetRecording( 0 );
|
||||
+#else
|
||||
cReplayControl::SetRecording( 0, 0 );
|
||||
+#endif
|
||||
cControl::Shutdown();
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-40-g7c79
|
||||
@@ -33,6 +33,7 @@ LDFLAGS="$LDFLAGS -fPIC"
|
||||
|
||||
cd $PKG_BUILD
|
||||
make VDRDIR="../$VDR_DIR" \
|
||||
VDRSRC="../$VDR_DIR" \
|
||||
LIBDIR="." \
|
||||
LOCALEDIR="./locale" \
|
||||
CSAFLAGS="$CFLAGS -Wall -fomit-frame-pointer -fexpensive-optimizations -funroll-loops"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="vdr-plugin-dvbapi"
|
||||
PKG_VERSION="e87e15f"
|
||||
PKG_VERSION="cd93752"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d18b016..278af2b 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -156,7 +156,7 @@ libdvbapi-dvbufs9xx.so: device-ufs9xx.o
|
||||
|
||||
ifndef LIBDVBCSA
|
||||
$(FFDECSA): $(FFDECSADIR)/*.c $(FFDECSADIR)/*.h
|
||||
- @$(MAKE) COMPILER="$(CXX)" FLAGS="$(CXXFLAGS) $(LDFLAGS) $(CSAFLAGS)" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) all
|
||||
+ @$(MAKE) COMPILER="$(CXX)" FLAGS="$(CXXFLAGS) $(LDFLAGS) $(CSAFLAGS)" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) FFdecsa.o
|
||||
endif
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
16
packages/3rdparty/multimedia/vdr-plugin-dvbapi/patches/vdr-plugin-dvbapi-cd93752-ffdecsa.patch
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 278af2b..996dc77 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -85,8 +85,9 @@ OBJS = CAPMT.o DeCSA.o DeCsaTSBuffer.o dll.o DVBAPI.o DVBAPISetup.o SCDeviceProb
|
||||
|
||||
ifndef LIBDVBCSA
|
||||
# FFdeCSA
|
||||
-PARALLEL ?= PARALLEL_128_SSE2
|
||||
-CSAFLAGS ?= -fexpensive-optimizations -funroll-loops -mmmx -msse -msse2 -msse3
|
||||
+CPUOPT ?= pentium
|
||||
+PARALLEL ?= PARALLEL_32_INT
|
||||
+CSAFLAGS ?= -Wall -fPIC -g -O3 -mmmx -fomit-frame-pointer -fexpensive-optimizations -funroll-loops
|
||||
FFDECSADIR = FFdecsa
|
||||
FFDECSA = $(FFDECSADIR)/FFdecsa.o
|
||||
DECSALIB = $(FFDECSA)
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/device-tmpl.cpp b/device-tmpl.cpp
|
||||
index 158324b..4d9f862 100644
|
||||
--- a/device-tmpl.cpp
|
||||
+++ b/device-tmpl.cpp
|
||||
@@ -71,7 +71,7 @@ SCDEVICE::SCDEVICE(cScDevicePlugin *DevPlugin, int Adapter, int Frontend, int ca
|
||||
fd_dvr = -1;
|
||||
|
||||
int n = Adapter;
|
||||
- softcsa = (fd_ca < 0);
|
||||
+ softcsa = true;
|
||||
if (softcsa)
|
||||
{
|
||||
if (HasDecoder())
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur vdr-dvbapi-plugin-6e8cad7/Makefile vdr-dvbapi-plugin-6e8cad7.patch/Makefile
|
||||
--- vdr-dvbapi-plugin-6e8cad7/Makefile 2011-12-25 14:24:33.000000000 +0100
|
||||
+++ vdr-dvbapi-plugin-6e8cad7.patch/Makefile 2011-12-29 18:59:21.847652339 +0100
|
||||
@@ -80,7 +80,7 @@
|
||||
gcc -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o $@ $< -ldl
|
||||
|
||||
$(FFDECSA): $(FFDECSADIR)/*.c $(FFDECSADIR)/*.h
|
||||
- @$(MAKE) COMPILER="$(CXX)" FLAGS="$(CSAFLAGS) -march=$(CPUOPT)" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) all
|
||||
+ @$(MAKE) COMPILER="$(CXX)" FLAGS="$(CSAFLAGS)" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) FFdecsa.o
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a8c7d97..6084cec 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -54,9 +54,9 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
OBJS = CAPMT.o DeCSA.o DeCsaTSBuffer.o DVBAPI.o DVBAPISetup.o SCDeviceProbe.o SCDVBDevice.o UDPSocket.o SCCIAdapter.o Frame.o SCCAMSlot.o
|
||||
|
||||
# FFdeCSA
|
||||
-CPUOPT ?= athlon64
|
||||
-PARALLEL ?= PARALLEL_128_SSE
|
||||
-CSAFLAGS ?= -fPIC -O3 -fexpensive-optimizations -funroll-loops -mmmx -msse -msse2 -msse3
|
||||
+CPUOPT ?= pentium
|
||||
+PARALLEL ?= PARALLEL_32_INT
|
||||
+CSAFLAGS ?= -Wall -fPIC -g -O3 -mmmx -fomit-frame-pointer -fexpensive-optimizations -funroll-loops
|
||||
FFDECSADIR = FFdecsa
|
||||
FFDECSA = $(FFDECSADIR)/FFdecsa.o
|
||||
FFDECSATEST = $(FFDECSADIR)/FFdecsa_test.done
|
||||
@@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="vdr-plugin-streamdev"
|
||||
PKG_VERSION="9135cde"
|
||||
PKG_VERSION="f58086a"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
|
||||
VDR_DIR=`basename $BUILD/vdr-[0-9]*`
|
||||
|
||||
CFLAGS="$CFLAGS -fPIC"
|
||||
CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
LDFLAGS="$LDFLAGS -fPIC"
|
||||
|
||||
cd $PKG_BUILD
|
||||
make VDRDIR="../$VDR_DIR" LIBDIR="." LOCALEDIR="./locale"
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
|
||||
VDR_DIR=`basename $BUILD/vdr-[0-9]*`
|
||||
|
||||
CFLAGS="$CFLAGS -fPIC"
|
||||
CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
LDFLAGS="$LDFLAGS -fPIC"
|
||||
|
||||
cd $PKG_BUILD
|
||||
ln -sf ../vdr-wirbelscan-[0-9]*/wirbelscan_services.h
|
||||
|
||||
|
||||
2
packages/3rdparty/multimedia/vdr/build
vendored
@@ -44,5 +44,5 @@ LIBS += -liconv
|
||||
EOF
|
||||
fi
|
||||
|
||||
make
|
||||
make vdr
|
||||
make include-dir
|
||||
|
||||
4
packages/3rdparty/multimedia/vdr/meta
vendored
@@ -20,14 +20,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="vdr"
|
||||
PKG_VERSION="1.7.27"
|
||||
PKG_VERSION="1.7.33"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.tvdr.de"
|
||||
PKG_URL="ftp://ftp.tvdr.de/vdr/Developer/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="fontconfig freetype libcap"
|
||||
PKG_BUILD_DEPENDS="toolchain gettext fontconfig freetype fribidi libcap libjpeg-turbo bzip2 libXfont expat"
|
||||
PKG_BUILD_DEPENDS="toolchain fontconfig freetype libcap libjpeg-turbo bzip2"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_SHORTDESC="vdr: A powerful DVB TV application"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
diff --git a/font.c b/font.c
|
||||
index 706a017..72c5ec3 100644
|
||||
--- a/font.c
|
||||
+++ b/font.c
|
||||
@@ -482,7 +482,8 @@ cString cFont::GetFontFileName(const char *FontName)
|
||||
FcPatternAddBool(pat, FC_SCALABLE, FcTrue);
|
||||
FcConfigSubstitute(NULL, pat, FcMatchPattern);
|
||||
FcDefaultSubstitute(pat);
|
||||
- FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, NULL);
|
||||
+ FcResult fresult;
|
||||
+ FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, &fresult);
|
||||
if (fontset) {
|
||||
for (int i = 0; i < fontset->nfont; i++) {
|
||||
FcBool scalable;
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/recording.h b/recording.h
|
||||
index 5f94ee2..0b44fe8 100644
|
||||
--- a/recording.h
|
||||
+++ b/recording.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#define TIMERMACRO_TITLE "TITLE"
|
||||
#define TIMERMACRO_EPISODE "EPISODE"
|
||||
|
||||
-//#define __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS // Code enclosed with this macro is deprecated and may be removed in a future version
|
||||
+#define __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS // Code enclosed with this macro is deprecated and may be removed in a future version
|
||||
|
||||
extern bool VfatFileSystem;
|
||||
extern int InstanceId;
|
||||
@@ -1,84 +0,0 @@
|
||||
Description: This patch allows tuning to encrypted channels which are
|
||||
provided by a stremdev client device and therefore already are
|
||||
decrypted on the streamdev server side.
|
||||
See also: http://www.vdr-developer.org/mantisbt/view.php?id=429
|
||||
Author: Tobias Grimm <tg@e-tobi.net>
|
||||
|
||||
Index: vdr-1.7.27/device.c
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/device.c 2012-03-13 10:48:14.000000000 +0100
|
||||
+++ vdr-1.7.27/device.c 2012-03-25 14:18:05.434975038 +0200
|
||||
@@ -236,6 +236,7 @@
|
||||
int NumCamSlots = CamSlots.Count();
|
||||
int SlotPriority[NumCamSlots];
|
||||
int NumUsableSlots = 0;
|
||||
+ bool InternalCamNeeded = false;
|
||||
if (Channel->Ca() >= CA_ENCRYPTED_MIN) {
|
||||
for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
|
||||
SlotPriority[CamSlot->Index()] = MAXPRIORITY + 1; // assumes it can't be used
|
||||
@@ -249,7 +250,7 @@
|
||||
}
|
||||
}
|
||||
if (!NumUsableSlots)
|
||||
- return NULL; // no CAM is able to decrypt this channel
|
||||
+ InternalCamNeeded = true; // no CAM is able to decrypt this channel
|
||||
}
|
||||
|
||||
bool NeedsDetachReceivers = false;
|
||||
@@ -263,11 +264,13 @@
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1)
|
||||
continue; // a specific card was requested, but not this one
|
||||
- if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true))
|
||||
+ if (InternalCamNeeded && !device[i]->HasInternalCam())
|
||||
+ continue; // no CAM is able to decrypt this channel and the device uses vdr handled CAMs
|
||||
+ if (NumUsableSlots && !device[i]->HasInternalCam() && !CamSlots.Get(j)->Assign(device[i], true))
|
||||
continue; // CAM slot can't be used with this device
|
||||
bool ndr;
|
||||
if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job
|
||||
- if (NumUsableSlots && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
|
||||
+ if (NumUsableSlots && !device[i]->HasInternalCam() && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
|
||||
ndr = true; // using a different CAM slot requires detaching receivers
|
||||
// Put together an integer number that reflects the "impact" using
|
||||
// this device would have on the overall system. Each condition is represented
|
||||
@@ -282,18 +285,18 @@
|
||||
imp <<= 4; imp |= GetClippedNumProvidedSystems(4, device[i]) - 1; // avoid cards which support multiple delivery systems
|
||||
imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device
|
||||
imp <<= 8; imp |= device[i]->Priority() - IDLEPRIORITY; // use the device with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used)
|
||||
- imp <<= 8; imp |= (NumUsableSlots ? SlotPriority[j] : IDLEPRIORITY) - IDLEPRIORITY; // use the CAM slot with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used)
|
||||
+ imp <<= 8; imp |= ((NumUsableSlots && !device[i]->HasInternalCam()) ? SlotPriority[j] : IDLEPRIORITY) - IDLEPRIORITY; // use the CAM slot with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used)
|
||||
imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers
|
||||
- imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
|
||||
+ imp <<= 1; imp |= (NumUsableSlots || InternalCamNeeded) ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
|
||||
imp <<= 1; imp |= device[i]->AvoidRecording(); // avoid SD full featured cards
|
||||
- imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
|
||||
+ imp <<= 1; imp |= (NumUsableSlots && !device[i]->HasInternalCam()) ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
|
||||
imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
|
||||
if (imp < Impact) {
|
||||
// This device has less impact than any previous one, so we take it.
|
||||
Impact = imp;
|
||||
d = device[i];
|
||||
NeedsDetachReceivers = ndr;
|
||||
- if (NumUsableSlots)
|
||||
+ if (NumUsableSlots && !device[i]->HasInternalCam())
|
||||
s = CamSlots.Get(j);
|
||||
}
|
||||
}
|
||||
Index: vdr-1.7.27/device.h
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/device.h 2012-03-13 11:17:16.000000000 +0100
|
||||
+++ vdr-1.7.27/device.h 2012-03-25 14:18:05.434975038 +0200
|
||||
@@ -405,6 +405,13 @@
|
||||
public:
|
||||
virtual bool HasCi(void);
|
||||
///< Returns true if this device has a Common Interface.
|
||||
+#define INTERNAL_CAM_DEVICES_PATCH 1
|
||||
+ virtual bool HasInternalCam(void) { return false; }
|
||||
+ ///< Returns true if this device handles encrypted channels itself
|
||||
+ ///< without VDR assistance. This can be e.g. when the device is a
|
||||
+ ///< client that gets the stream from another VDR instance that has
|
||||
+ ///< already decrypted the stream. In this case ProvidesChannel()
|
||||
+ ///< shall check whether the channel can be decrypted.
|
||||
void SetCamSlot(cCamSlot *CamSlot);
|
||||
///< Sets the given CamSlot to be used with this device.
|
||||
cCamSlot *CamSlot(void) const { return camSlot; }
|
||||
@@ -1,114 +0,0 @@
|
||||
diff --git a/device.h b/device.h
|
||||
index e61edd0..dc2ea5f 100644
|
||||
--- a/device.h
|
||||
+++ b/device.h
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "spu.h"
|
||||
#include "thread.h"
|
||||
#include "tools.h"
|
||||
+#include <asm/types.h>
|
||||
+#include <linux/dvb/frontend.h>
|
||||
|
||||
#define MAXDEVICES 16 // the maximum number of devices in the system
|
||||
#define MAXPIDHANDLES 64 // the maximum number of different PIDs per device
|
||||
@@ -331,7 +333,7 @@ public:
|
||||
virtual bool HasProgramme(void);
|
||||
///< Returns true if the device is currently showing any programme to
|
||||
///< the user, either through replaying or live.
|
||||
-
|
||||
+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd) {return false;}
|
||||
// PID handle facilities
|
||||
|
||||
private:
|
||||
diff --git a/dvbdevice.c b/dvbdevice.c
|
||||
index 65e9a4b..53a4a22 100644
|
||||
--- a/dvbdevice.c
|
||||
+++ b/dvbdevice.c
|
||||
@@ -285,6 +285,7 @@ class cDvbTuner : public cThread {
|
||||
private:
|
||||
static cMutex bondMutex;
|
||||
enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked };
|
||||
+ bool SendDiseqc;
|
||||
const cDvbDevice *device;
|
||||
int fd_frontend;
|
||||
int adapter, frontend;
|
||||
@@ -300,6 +301,7 @@ private:
|
||||
cMutex mutex;
|
||||
cCondVar locked;
|
||||
cCondVar newSet;
|
||||
+ dvb_diseqc_master_cmd diseqc_cmd;
|
||||
cDvbTuner *bondedTuner;
|
||||
bool bondedMaster;
|
||||
bool bondedMasterFailed;
|
||||
@@ -322,6 +324,7 @@ public:
|
||||
uint32_t SubsystemId(void) const { return subsystemId; }
|
||||
bool IsTunedTo(const cChannel *Channel) const;
|
||||
void SetChannel(const cChannel *Channel);
|
||||
+ bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
|
||||
bool Locked(int TimeoutMs = 0);
|
||||
int GetSignalStrength(void) const;
|
||||
int GetSignalQuality(void) const;
|
||||
@@ -333,6 +336,7 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int
|
||||
{
|
||||
device = Device;
|
||||
fd_frontend = Fd_Frontend;
|
||||
+ SendDiseqc=false;
|
||||
adapter = Adapter;
|
||||
frontend = Frontend;
|
||||
subsystemId = cDvbDeviceProbe::GetSubsystemId(adapter, frontend);
|
||||
@@ -860,6 +864,10 @@ void cDvbTuner::Action(void)
|
||||
Status = NewStatus;
|
||||
cMutexLock MutexLock(&mutex);
|
||||
int WaitTime = 1000;
|
||||
+ if (SendDiseqc) {
|
||||
+ CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &diseqc_cmd));
|
||||
+ SendDiseqc=false;
|
||||
+ }
|
||||
switch (tunerStatus) {
|
||||
case tsIdle:
|
||||
break;
|
||||
@@ -913,6 +921,20 @@ void cDvbTuner::Action(void)
|
||||
}
|
||||
}
|
||||
|
||||
+bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
|
||||
+{
|
||||
+ cMutexLock MutexLock(&mutex);
|
||||
+ cDvbTransponderParameters dtp(channel.Parameters());
|
||||
+ // Determine the required frontend type:
|
||||
+ int frontendType = GetRequiredDeliverySystem(&channel, &dtp);
|
||||
+ if ((frontendType!=SYS_DVBS2 && frontendType!=SYS_DVBS) || SendDiseqc)
|
||||
+ return false;
|
||||
+ diseqc_cmd=cmd;
|
||||
+ SendDiseqc=true;
|
||||
+ newSet.Broadcast();
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
// --- cDvbSourceParam -------------------------------------------------------
|
||||
|
||||
class cDvbSourceParam : public cSourceParam {
|
||||
@@ -1534,6 +1556,11 @@ bool cDvbDevice::HasLock(int TimeoutMs)
|
||||
return dvbTuner ? dvbTuner->Locked(TimeoutMs) : false;
|
||||
}
|
||||
|
||||
+bool cDvbDevice::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
|
||||
+{
|
||||
+ return dvbTuner->SendDiseqcCmd(cmd);
|
||||
+}
|
||||
+
|
||||
void cDvbDevice::SetTransferModeForDolbyDigital(int Mode)
|
||||
{
|
||||
setTransferModeForDolbyDigital = Mode;
|
||||
diff --git a/dvbdevice.h b/dvbdevice.h
|
||||
index c53a208..4ffcb91 100644
|
||||
--- a/dvbdevice.h
|
||||
+++ b/dvbdevice.h
|
||||
@@ -192,6 +192,7 @@ protected:
|
||||
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
|
||||
public:
|
||||
virtual bool HasLock(int TimeoutMs = 0);
|
||||
+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
|
||||
|
||||
// PID handle facilities
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
Description: Patch for VDR to support external CI devices
|
||||
Origin: https://github.com/flensrocker/vdr-plugin-dynamite
|
||||
Forwarded: no
|
||||
Author: Lars Hanisch <dvb@flensrocker.de>
|
||||
Index: vdr-1.7.27/ci.h
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/ci.h 2012-03-25 14:47:30.464975099 +0200
|
||||
+++ vdr-1.7.27/ci.h 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -72,6 +72,7 @@
|
||||
};
|
||||
|
||||
class cDevice;
|
||||
+class cTSBufferBase;
|
||||
class cCamSlot;
|
||||
|
||||
enum eModuleStatus { msNone, msReset, msPresent, msReady };
|
||||
@@ -115,6 +116,11 @@
|
||||
///< The derived class must call Cancel(3) in its destructor.
|
||||
virtual bool Ready(void);
|
||||
///< Returns 'true' if all present CAMs in this adapter are ready.
|
||||
+#define EXTERNALCI_PATCH
|
||||
+ virtual cTSBufferBase *GetTSBuffer(int FdDvr) { return NULL; }
|
||||
+ ///< Derived classes can return a special TS buffer with features
|
||||
+ ///< like rerouting the stream through an external ci.
|
||||
+ ///< The caller must delete the buffer.
|
||||
virtual bool SetIdle(bool Idle, bool TestOnly) { return false; }
|
||||
virtual bool IsIdle(void) const { return false; }
|
||||
};
|
||||
Index: vdr-1.7.27/device.h
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/device.h 2012-03-25 14:47:30.474975099 +0200
|
||||
+++ vdr-1.7.27/device.h 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -795,7 +795,14 @@
|
||||
/// sure the returned data points to a TS packet and automatically
|
||||
/// re-synchronizes after broken packets.
|
||||
|
||||
-class cTSBuffer : public cThread {
|
||||
+class cTSBufferBase {
|
||||
+public:
|
||||
+ cTSBufferBase() {}
|
||||
+ virtual ~cTSBufferBase() {}
|
||||
+ virtual uchar *Get(void) = 0;
|
||||
+ };
|
||||
+
|
||||
+class cTSBuffer : public cTSBufferBase, public cThread {
|
||||
private:
|
||||
int f;
|
||||
int cardIndex;
|
||||
@@ -804,8 +811,8 @@
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cTSBuffer(int File, int Size, int CardIndex);
|
||||
- ~cTSBuffer();
|
||||
- uchar *Get(void);
|
||||
+ virtual ~cTSBuffer();
|
||||
+ virtual uchar *Get(void);
|
||||
};
|
||||
|
||||
/// A plugin that want to create devices handled by the dynamite-plugin needs to create
|
||||
Index: vdr-1.7.27/dvbci.c
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/dvbci.c 2012-03-25 14:47:30.474975099 +0200
|
||||
+++ vdr-1.7.27/dvbci.c 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -22,23 +22,8 @@
|
||||
adapter = Adapter;
|
||||
frontend = Frontend;
|
||||
idle = false;
|
||||
- ca_caps_t Caps;
|
||||
- if (ioctl(fd, CA_GET_CAP, &Caps) == 0) {
|
||||
- if ((Caps.slot_type & CA_CI_LINK) != 0) {
|
||||
- int NumSlots = Caps.slot_num;
|
||||
- if (NumSlots > 0) {
|
||||
- for (int i = 0; i < NumSlots; i++)
|
||||
- new cCamSlot(this);
|
||||
- Start();
|
||||
- }
|
||||
- else
|
||||
- esyslog("ERROR: no CAM slots found on device %d", device->DeviceNumber());
|
||||
- }
|
||||
- else
|
||||
- isyslog("device %d doesn't support CI link layer interface", device->DeviceNumber());
|
||||
- }
|
||||
- else
|
||||
- esyslog("ERROR: can't get CA capabilities on device %d", device->DeviceNumber());
|
||||
+ GetNumCamSlots(Device, Fd, this);
|
||||
+ Start();
|
||||
}
|
||||
|
||||
cDvbCiAdapter::~cDvbCiAdapter()
|
||||
@@ -48,6 +33,13 @@
|
||||
CloseCa();
|
||||
}
|
||||
|
||||
+cTSBufferBase *cDvbCiAdapter::GetTSBuffer(int FdDvr)
|
||||
+{
|
||||
+ if (device)
|
||||
+ return new cTSBuffer(FdDvr, MEGABYTE(2), device->CardIndex() + 1);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
bool cDvbCiAdapter::OpenCa(void)
|
||||
{
|
||||
if (fd >= 0)
|
||||
@@ -142,10 +134,60 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
+int cDvbCiAdapter::GetNumCamSlots(cDevice *Device, int Fd, cCiAdapter *CiAdapter)
|
||||
+{
|
||||
+ int NumSlots = -1;
|
||||
+ if (Fd >= 0) {
|
||||
+ ca_caps_t Caps;
|
||||
+ if (ioctl(Fd, CA_GET_CAP, &Caps) == 0) {
|
||||
+ if ((Caps.slot_type & CA_CI_LINK) != 0) {
|
||||
+ NumSlots = Caps.slot_num;
|
||||
+ if (NumSlots == 0)
|
||||
+ esyslog("ERROR: no CAM slots found on device %d", Device->DeviceNumber());
|
||||
+ else if (CiAdapter != NULL) {
|
||||
+ for (int i = 0; i < NumSlots; i++)
|
||||
+ new cCamSlot(CiAdapter);
|
||||
+ }
|
||||
+ else
|
||||
+ return NumSlots;
|
||||
+ }
|
||||
+ else
|
||||
+ isyslog("device %d doesn't support CI link layer interface", Device->DeviceNumber());
|
||||
+ }
|
||||
+ else
|
||||
+ esyslog("ERROR: can't get CA capabilities on device %d", Device->DeviceNumber());
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
cDvbCiAdapter *cDvbCiAdapter::CreateCiAdapter(cDevice *Device, int Fd, int Adapter, int Frontend)
|
||||
{
|
||||
- // TODO check whether a CI is actually present?
|
||||
- if (Device)
|
||||
+ // don't create a ci-adapter if it's not useable
|
||||
+ if (Device && (Fd >= 0) && (GetNumCamSlots(Device, Fd, NULL) > 0))
|
||||
return new cDvbCiAdapter(Device, Fd, Adapter, Frontend);
|
||||
- return NULL;
|
||||
+
|
||||
+ if (Fd >= 0)
|
||||
+ close(Fd);
|
||||
+
|
||||
+ // try to find an external ci-adapter
|
||||
+ for (cDvbCiAdapterProbe *cp = DvbCiAdapterProbes.First(); cp; cp = DvbCiAdapterProbes.Next(cp)) {
|
||||
+ cDvbCiAdapter *ca = cp->Probe(Device);
|
||||
+ if (ca)
|
||||
+ return ca;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+// --- cDvbCiAdapterProbe -------------------------------------------------------
|
||||
+
|
||||
+cList<cDvbCiAdapterProbe> DvbCiAdapterProbes;
|
||||
+
|
||||
+cDvbCiAdapterProbe::cDvbCiAdapterProbe(void)
|
||||
+{
|
||||
+ DvbCiAdapterProbes.Add(this);
|
||||
+}
|
||||
+
|
||||
+cDvbCiAdapterProbe::~cDvbCiAdapterProbe()
|
||||
+{
|
||||
+ DvbCiAdapterProbes.Del(this, false);
|
||||
}
|
||||
Index: vdr-1.7.27/dvbci.h
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/dvbci.h 2012-03-25 14:47:30.474975099 +0200
|
||||
+++ vdr-1.7.27/dvbci.h 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -31,9 +31,33 @@
|
||||
cDvbCiAdapter(cDevice *Device, int Fd, int Adapter = -1, int Frontend = -1);
|
||||
public:
|
||||
virtual ~cDvbCiAdapter();
|
||||
+ virtual cTSBufferBase *GetTSBuffer(int FdDvr);
|
||||
+ static int GetNumCamSlots(cDevice *Device, int Fd, cCiAdapter *CiAdapter);
|
||||
+ ///< Tests if the CA device is usable for vdr.
|
||||
+ ///< If CiAdapter is not NULL it will create the CamSlots for the given ci-adapter.
|
||||
virtual bool SetIdle(bool Idle, bool TestOnly);
|
||||
virtual bool IsIdle(void) const { return idle; }
|
||||
static cDvbCiAdapter *CreateCiAdapter(cDevice *Device, int Fd, int Adapter = -1, int Frontend = -1);
|
||||
};
|
||||
|
||||
+// A plugin that implements an external DVB ci-adapter derived from cDvbCiAdapter needs to create
|
||||
+// a cDvbCiAdapterProbe derived object on the heap in order to have its Probe()
|
||||
+// function called, where it can actually create the appropriate ci-adapter.
|
||||
+// The cDvbCiAdapterProbe object must be created in the plugin's constructor,
|
||||
+// and deleted in its destructor.
|
||||
+// Every plugin has to track its own list of already used device nodes.
|
||||
+// The Probes are always called if the base cDvbCiAdapter can't create a ci-adapter on its own.
|
||||
+
|
||||
+class cDvbCiAdapterProbe : public cListObject {
|
||||
+public:
|
||||
+ cDvbCiAdapterProbe(void);
|
||||
+ virtual ~cDvbCiAdapterProbe();
|
||||
+ virtual cDvbCiAdapter *Probe(cDevice *Device) = 0;
|
||||
+ ///< Probes for a DVB ci-adapter for the given Device and creates the appropriate
|
||||
+ ///< object derived from cDvbCiAdapter if applicable.
|
||||
+ ///< Returns NULL if no adapter has been created.
|
||||
+ };
|
||||
+
|
||||
+extern cList<cDvbCiAdapterProbe> DvbCiAdapterProbes;
|
||||
+
|
||||
#endif //__DVBCI_H
|
||||
Index: vdr-1.7.27/dvbdevice.c
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/dvbdevice.c 2012-03-25 14:47:30.474975099 +0200
|
||||
+++ vdr-1.7.27/dvbdevice.c 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -1106,9 +1106,8 @@
|
||||
|
||||
// Common Interface:
|
||||
|
||||
- fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
|
||||
- if (fd_ca >= 0)
|
||||
- ciAdapter = cDvbCiAdapter::CreateCiAdapter(parentDevice ? parentDevice : this, fd_ca, adapter, frontend);
|
||||
+ int fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
|
||||
+ ciAdapter = cDvbCiAdapter::CreateCiAdapter(parentDevice ? parentDevice : this, fd_ca, adapter, frontend);
|
||||
|
||||
// The DVR device (will be opened and closed as needed):
|
||||
|
||||
@@ -1665,8 +1664,12 @@
|
||||
{
|
||||
CloseDvr();
|
||||
fd_dvr = DvbOpen(DEV_DVB_DVR, adapter, frontend, O_RDONLY | O_NONBLOCK, true);
|
||||
- if (fd_dvr >= 0)
|
||||
- tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(2), CardIndex() + 1);
|
||||
+ if (fd_dvr >= 0) {
|
||||
+ if (ciAdapter)
|
||||
+ tsBuffer = ciAdapter->GetTSBuffer(fd_dvr);
|
||||
+ if (tsBuffer == NULL)
|
||||
+ tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(2), CardIndex() + 1);
|
||||
+ }
|
||||
return fd_dvr >= 0;
|
||||
}
|
||||
|
||||
Index: vdr-1.7.27/dvbdevice.h
|
||||
===================================================================
|
||||
--- vdr-1.7.27.orig/dvbdevice.h 2012-03-25 14:50:28.174975106 +0200
|
||||
+++ vdr-1.7.27/dvbdevice.h 2012-03-25 14:51:11.824975107 +0200
|
||||
@@ -127,7 +127,7 @@
|
||||
int deliverySystems[MAXDELIVERYSYSTEMS];
|
||||
int numDeliverySystems;
|
||||
int numModulations;
|
||||
- int fd_dvr, fd_ca;
|
||||
+ int fd_dvr;
|
||||
static cMutex bondMutex;
|
||||
cDvbDevice *bondedDevice;
|
||||
mutable bool needsDetachBondedReceivers;
|
||||
@@ -227,7 +227,7 @@
|
||||
// Receiver facilities
|
||||
|
||||
private:
|
||||
- cTSBuffer *tsBuffer;
|
||||
+ cTSBufferBase *tsBuffer;
|
||||
protected:
|
||||
virtual bool OpenDvr(void);
|
||||
virtual void CloseDvr(void);
|
||||
@@ -1,16 +0,0 @@
|
||||
diff --git a/dvbdevice.c b/dvbdevice.c
|
||||
index 42ec5b1..9c397d7 100644
|
||||
--- a/dvbdevice.c
|
||||
+++ b/dvbdevice.c
|
||||
@@ -839,7 +839,11 @@ bool cDvbTuner::SetFrontend(void)
|
||||
SETCMD(DTV_HIERARCHY, dtp.Hierarchy());
|
||||
if (frontendType == SYS_DVBT2) {
|
||||
// DVB-T2
|
||||
+#ifdef DTV_DVBT2_PLP_ID
|
||||
SETCMD(DTV_DVBT2_PLP_ID, dtp.PlpId());
|
||||
+#else
|
||||
+ SETCMD(DTV_DVBT2_PLP_ID_LEGACY, dtp.PlpId());
|
||||
+#endif
|
||||
}
|
||||
|
||||
tuneTimeout = DVBT_TUNE_TIMEOUT;
|
||||
@@ -1,21 +1,5 @@
|
||||
From a13c75ec46f2783b2d258af48d7de28d44666715 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sat, 5 May 2012 21:50:48 +0300
|
||||
Subject: [PATCH 2/2] dynamite
|
||||
|
||||
---
|
||||
ci.c | 2 +
|
||||
ci.h | 2 +
|
||||
device.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
device.h | 85 ++++++++++++++++++++++++++++++++++++-----
|
||||
dvbci.c | 51 +++++++++++++++++++++++--
|
||||
dvbci.h | 12 +++++-
|
||||
dvbdevice.c | 95 ++++++++++++++++++++++++++++++++++++++++++----
|
||||
dvbdevice.h | 6 ++-
|
||||
8 files changed, 339 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/ci.c b/ci.c
|
||||
index 0135d07..cf21952 100644
|
||||
index 904697e..1e95313 100644
|
||||
--- a/ci.c
|
||||
+++ b/ci.c
|
||||
@@ -1571,6 +1571,8 @@ cCamSlot::cCamSlot(cCiAdapter *CiAdapter)
|
||||
@@ -28,29 +12,43 @@ index 0135d07..cf21952 100644
|
||||
DeleteAllConnections();
|
||||
}
|
||||
diff --git a/ci.h b/ci.h
|
||||
index 74e0270..d38e2dd 100644
|
||||
index 74e0270..818ea29 100644
|
||||
--- a/ci.h
|
||||
+++ b/ci.h
|
||||
@@ -115,6 +115,8 @@ public:
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
};
|
||||
|
||||
class cDevice;
|
||||
+class cTSBufferBase;
|
||||
class cCamSlot;
|
||||
|
||||
enum eModuleStatus { msNone, msReset, msPresent, msReady };
|
||||
@@ -115,6 +116,13 @@ public:
|
||||
///< The derived class must call Cancel(3) in its destructor.
|
||||
virtual bool Ready(void);
|
||||
///< Returns 'true' if all present CAMs in this adapter are ready.
|
||||
+#define EXTERNALCI_PATCH
|
||||
+ virtual cTSBufferBase *GetTSBuffer(int FdDvr) { return NULL; }
|
||||
+ ///< Derived classes can return a special TS buffer with features
|
||||
+ ///< like rerouting the stream through an external ci.
|
||||
+ ///< The caller must delete the buffer.
|
||||
+ virtual bool SetIdle(bool Idle, bool TestOnly) { return false; }
|
||||
+ virtual bool IsIdle(void) const { return false; }
|
||||
};
|
||||
|
||||
class cTPDU;
|
||||
diff --git a/device.c b/device.c
|
||||
index 273757e..f83e789 100644
|
||||
index 2678d68..56c2b9c 100644
|
||||
--- a/device.c
|
||||
+++ b/device.c
|
||||
@@ -69,12 +69,22 @@ int cDevice::currentChannel = 1;
|
||||
cDevice *cDevice::device[MAXDEVICES] = { NULL };
|
||||
cDevice *cDevice::primaryDevice = NULL;
|
||||
cList<cDeviceHook> cDevice::deviceHooks;
|
||||
+cDevice *cDevice::nextParentDevice = NULL;
|
||||
|
||||
-
|
||||
-cDevice::cDevice(void)
|
||||
+cDevice *cDevice::nextParentDevice = NULL;
|
||||
+
|
||||
+cDevice::cDevice(cDevice *ParentDevice)
|
||||
:patPmtParser(true)
|
||||
-{
|
||||
@@ -128,7 +126,7 @@ index 273757e..f83e789 100644
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
if (device[i] == this)
|
||||
return i;
|
||||
@@ -349,6 +388,8 @@ bool cDevice::HasCi(void)
|
||||
@@ -355,6 +394,8 @@ bool cDevice::HasCi(void)
|
||||
|
||||
void cDevice::SetCamSlot(cCamSlot *CamSlot)
|
||||
{
|
||||
@@ -137,7 +135,7 @@ index 273757e..f83e789 100644
|
||||
camSlot = CamSlot;
|
||||
}
|
||||
|
||||
@@ -561,6 +602,10 @@ void cDevice::DelLivePids(void)
|
||||
@@ -567,6 +608,10 @@ void cDevice::DelLivePids(void)
|
||||
|
||||
void cDevice::StartSectionHandler(void)
|
||||
{
|
||||
@@ -148,7 +146,7 @@ index 273757e..f83e789 100644
|
||||
if (!sectionHandler) {
|
||||
sectionHandler = new cSectionHandler(this);
|
||||
AttachFilter(eitFilter = new cEitFilter);
|
||||
@@ -572,6 +617,10 @@ void cDevice::StartSectionHandler(void)
|
||||
@@ -578,6 +623,10 @@ void cDevice::StartSectionHandler(void)
|
||||
|
||||
void cDevice::StopSectionHandler(void)
|
||||
{
|
||||
@@ -159,7 +157,7 @@ index 273757e..f83e789 100644
|
||||
if (sectionHandler) {
|
||||
delete nitFilter;
|
||||
delete sdtFilter;
|
||||
@@ -598,12 +647,17 @@ void cDevice::CloseFilter(int Handle)
|
||||
@@ -609,12 +658,17 @@ void cDevice::CloseFilter(int Handle)
|
||||
|
||||
void cDevice::AttachFilter(cFilter *Filter)
|
||||
{
|
||||
@@ -177,7 +175,7 @@ index 273757e..f83e789 100644
|
||||
if (sectionHandler)
|
||||
sectionHandler->Detach(Filter);
|
||||
}
|
||||
@@ -765,6 +819,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
||||
@@ -776,6 +830,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
||||
sectionHandler->SetStatus(false);
|
||||
sectionHandler->SetChannel(NULL);
|
||||
}
|
||||
@@ -185,7 +183,7 @@ index 273757e..f83e789 100644
|
||||
// Tell the camSlot about the channel switch and add all PIDs of this
|
||||
// channel to it, for possible later decryption:
|
||||
if (camSlot)
|
||||
@@ -811,19 +866,27 @@ void cDevice::ForceTransferMode(void)
|
||||
@@ -822,19 +877,27 @@ void cDevice::ForceTransferMode(void)
|
||||
{
|
||||
if (!cTransferControl::ReceiverDevice()) {
|
||||
cChannel *Channel = Channels.GetByNumber(CurrentChannel());
|
||||
@@ -214,7 +212,7 @@ index 273757e..f83e789 100644
|
||||
if (Seconds >= 0)
|
||||
occupiedTimeout = time(NULL) + min(Seconds, MAXOCCUPIEDTIMEOUT);
|
||||
}
|
||||
@@ -1196,7 +1259,10 @@ bool cDevice::Transferring(void) const
|
||||
@@ -1209,7 +1272,10 @@ bool cDevice::Transferring(void) const
|
||||
|
||||
bool cDevice::AttachPlayer(cPlayer *Player)
|
||||
{
|
||||
@@ -225,7 +223,7 @@ index 273757e..f83e789 100644
|
||||
if (player)
|
||||
Detach(player);
|
||||
DELETENULL(liveSubtitle);
|
||||
@@ -1215,6 +1281,8 @@ bool cDevice::AttachPlayer(cPlayer *Player)
|
||||
@@ -1228,6 +1294,8 @@ bool cDevice::AttachPlayer(cPlayer *Player)
|
||||
|
||||
void cDevice::Detach(cPlayer *Player)
|
||||
{
|
||||
@@ -234,7 +232,7 @@ index 273757e..f83e789 100644
|
||||
if (Player && player == Player) {
|
||||
cPlayer *p = player;
|
||||
player = NULL; // avoids recursive calls to Detach()
|
||||
@@ -1234,6 +1302,8 @@ void cDevice::Detach(cPlayer *Player)
|
||||
@@ -1247,6 +1315,8 @@ void cDevice::Detach(cPlayer *Player)
|
||||
|
||||
void cDevice::StopReplay(void)
|
||||
{
|
||||
@@ -243,7 +241,7 @@ index 273757e..f83e789 100644
|
||||
if (player) {
|
||||
Detach(player);
|
||||
if (IsPrimaryDevice())
|
||||
@@ -1516,6 +1586,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
|
||||
@@ -1529,6 +1599,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
|
||||
|
||||
int cDevice::Priority(void) const
|
||||
{
|
||||
@@ -252,7 +250,7 @@ index 273757e..f83e789 100644
|
||||
int priority = IDLEPRIORITY;
|
||||
if (IsPrimaryDevice() && !Replaying() && ActualDevice() == PrimaryDevice())
|
||||
priority = TRANSFERPRIORITY; // we use the same value here, no matter whether it's actual Transfer Mode or real live viewing
|
||||
@@ -1534,6 +1606,8 @@ bool cDevice::Ready(void)
|
||||
@@ -1547,6 +1619,8 @@ bool cDevice::Ready(void)
|
||||
|
||||
bool cDevice::Receiving(bool Dummy) const
|
||||
{
|
||||
@@ -261,7 +259,7 @@ index 273757e..f83e789 100644
|
||||
cMutexLock MutexLock(&mutexReceiver);
|
||||
for (int i = 0; i < MAXRECEIVERS; i++) {
|
||||
if (receiver[i])
|
||||
@@ -1614,10 +1688,13 @@ bool cDevice::GetTSPacket(uchar *&Data)
|
||||
@@ -1627,10 +1701,13 @@ bool cDevice::GetTSPacket(uchar *&Data)
|
||||
|
||||
bool cDevice::AttachReceiver(cReceiver *Receiver)
|
||||
{
|
||||
@@ -275,7 +273,7 @@ index 273757e..f83e789 100644
|
||||
// activate the following line if you need it - actually the driver should be fixed!
|
||||
//#define WAIT_FOR_TUNER_LOCK
|
||||
#ifdef WAIT_FOR_TUNER_LOCK
|
||||
@@ -1656,6 +1733,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
|
||||
@@ -1669,6 +1746,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
|
||||
|
||||
void cDevice::Detach(cReceiver *Receiver)
|
||||
{
|
||||
@@ -284,7 +282,7 @@ index 273757e..f83e789 100644
|
||||
if (!Receiver || Receiver->device != this)
|
||||
return;
|
||||
bool receiversLeft = false;
|
||||
@@ -1681,6 +1760,8 @@ void cDevice::Detach(cReceiver *Receiver)
|
||||
@@ -1694,6 +1773,8 @@ void cDevice::Detach(cReceiver *Receiver)
|
||||
|
||||
void cDevice::DetachAll(int Pid)
|
||||
{
|
||||
@@ -293,7 +291,7 @@ index 273757e..f83e789 100644
|
||||
if (Pid) {
|
||||
cMutexLock MutexLock(&mutexReceiver);
|
||||
for (int i = 0; i < MAXRECEIVERS; i++) {
|
||||
@@ -1693,6 +1774,8 @@ void cDevice::DetachAll(int Pid)
|
||||
@@ -1706,6 +1787,8 @@ void cDevice::DetachAll(int Pid)
|
||||
|
||||
void cDevice::DetachAllReceivers(void)
|
||||
{
|
||||
@@ -302,7 +300,7 @@ index 273757e..f83e789 100644
|
||||
cMutexLock MutexLock(&mutexReceiver);
|
||||
for (int i = 0; i < MAXRECEIVERS; i++)
|
||||
Detach(receiver[i]);
|
||||
@@ -1764,3 +1847,25 @@ uchar *cTSBuffer::Get(void)
|
||||
@@ -1778,3 +1861,25 @@ uchar *cTSBuffer::Get(void)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -329,10 +327,18 @@ index 273757e..f83e789 100644
|
||||
+ DynamicDeviceProbes.Del(this, false);
|
||||
+}
|
||||
diff --git a/device.h b/device.h
|
||||
index dc2ea5f..e5e92a3 100644
|
||||
index e2847d8..3a8aa01 100644
|
||||
--- a/device.h
|
||||
+++ b/device.h
|
||||
@@ -171,7 +171,6 @@ private:
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "spu.h"
|
||||
#include "thread.h"
|
||||
#include "tools.h"
|
||||
+#include <linux/dvb/frontend.h>
|
||||
|
||||
#define MAXDEVICES 16 // the maximum number of devices in the system
|
||||
#define MAXPIDHANDLES 64 // the maximum number of different PIDs per device
|
||||
@@ -169,7 +170,6 @@ private:
|
||||
static int nextCardIndex;
|
||||
int cardIndex;
|
||||
protected:
|
||||
@@ -340,7 +346,7 @@ index dc2ea5f..e5e92a3 100644
|
||||
virtual ~cDevice();
|
||||
virtual bool Ready(void);
|
||||
///< Returns true if this device is ready. Devices with conditional
|
||||
@@ -198,9 +197,6 @@ protected:
|
||||
@@ -196,9 +196,6 @@ protected:
|
||||
///< A derived class must call the MakePrimaryDevice() function of its
|
||||
///< base class.
|
||||
public:
|
||||
@@ -349,8 +355,16 @@ index dc2ea5f..e5e92a3 100644
|
||||
- ///< Returns the card index of this device (0 ... MAXDEVICES - 1).
|
||||
int DeviceNumber(void) const;
|
||||
///< Returns the number of this device (0 ... numDevices).
|
||||
virtual cString DeviceName(void) const;
|
||||
@@ -416,9 +412,6 @@ public:
|
||||
virtual cString DeviceType(void) const;
|
||||
@@ -338,6 +335,7 @@ public:
|
||||
///< Returns true if the device is currently showing any programme to
|
||||
///< the user, either through replaying or live.
|
||||
|
||||
+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd) {return false;}
|
||||
// PID handle facilities
|
||||
|
||||
private:
|
||||
@@ -423,9 +421,6 @@ public:
|
||||
///< shall check whether the channel can be decrypted.
|
||||
void SetCamSlot(cCamSlot *CamSlot);
|
||||
///< Sets the given CamSlot to be used with this device.
|
||||
@@ -360,7 +374,7 @@ index dc2ea5f..e5e92a3 100644
|
||||
|
||||
// Image Grab facilities
|
||||
|
||||
@@ -574,9 +567,6 @@ private:
|
||||
@@ -581,9 +576,6 @@ private:
|
||||
cTsToPes tsToPesSubtitle;
|
||||
bool isPlayingVideo;
|
||||
protected:
|
||||
@@ -370,11 +384,11 @@ index dc2ea5f..e5e92a3 100644
|
||||
virtual bool CanReplay(void) const;
|
||||
///< Returns true if this device can currently start a replay session.
|
||||
virtual bool SetPlayMode(ePlayMode PlayMode);
|
||||
@@ -761,6 +751,38 @@ public:
|
||||
@@ -795,6 +787,38 @@ public:
|
||||
///< Detaches all receivers from this device for this pid.
|
||||
virtual void DetachAllReceivers(void);
|
||||
///< Detaches all receivers from this device.
|
||||
+
|
||||
+
|
||||
+// --- dynamite subdevice patch start ---
|
||||
+ friend class cDynamicDevice;
|
||||
+private:
|
||||
@@ -409,10 +423,32 @@ index dc2ea5f..e5e92a3 100644
|
||||
};
|
||||
|
||||
/// Derived cDevice classes that can receive channels will have to provide
|
||||
@@ -784,4 +806,47 @@ public:
|
||||
uchar *Get(void);
|
||||
};
|
||||
@@ -805,7 +829,14 @@ public:
|
||||
/// sure the returned data points to a TS packet and automatically
|
||||
/// re-synchronizes after broken packets.
|
||||
|
||||
-class cTSBuffer : public cThread {
|
||||
+class cTSBufferBase {
|
||||
+public:
|
||||
+ cTSBufferBase() {}
|
||||
+ virtual ~cTSBufferBase() {}
|
||||
+ virtual uchar *Get(void) = 0;
|
||||
+ };
|
||||
+
|
||||
+class cTSBuffer : public cTSBufferBase, public cThread {
|
||||
private:
|
||||
int f;
|
||||
int cardIndex;
|
||||
@@ -814,8 +845,51 @@ private:
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cTSBuffer(int File, int Size, int CardIndex);
|
||||
- ~cTSBuffer();
|
||||
- uchar *Get(void);
|
||||
+ virtual ~cTSBuffer();
|
||||
+ virtual uchar *Get(void);
|
||||
+ };
|
||||
+
|
||||
+/// A plugin that want to create devices handled by the dynamite-plugin needs to create
|
||||
+/// a cDynamicDeviceProbe derived object on the heap in order to have its Probe()
|
||||
+/// function called, where it can actually create the appropriate device.
|
||||
@@ -452,16 +488,16 @@ index dc2ea5f..e5e92a3 100644
|
||||
+ ///< object derived from cDevice if applicable.
|
||||
+ ///< Returns the device that has been created or NULL if not.
|
||||
+ ///< The dynamite-plugin will delete the device if it is detached.
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
+extern cList<cDynamicDeviceProbe> DynamicDeviceProbes;
|
||||
+
|
||||
+
|
||||
#endif //__DEVICE_H
|
||||
diff --git a/dvbci.c b/dvbci.c
|
||||
index 5289bbd..fea3a83 100644
|
||||
index 5289bbd..baa70bc 100644
|
||||
--- a/dvbci.c
|
||||
+++ b/dvbci.c
|
||||
@@ -10,15 +10,18 @@
|
||||
@@ -10,41 +10,70 @@
|
||||
#include "dvbci.h"
|
||||
#include <linux/dvb/ca.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -476,13 +512,30 @@ index 5289bbd..fea3a83 100644
|
||||
device = Device;
|
||||
SetDescription("CI adapter on device %d", device->DeviceNumber());
|
||||
fd = Fd;
|
||||
- ca_caps_t Caps;
|
||||
- if (ioctl(fd, CA_GET_CAP, &Caps) == 0) {
|
||||
- if ((Caps.slot_type & CA_CI_LINK) != 0) {
|
||||
- int NumSlots = Caps.slot_num;
|
||||
- if (NumSlots > 0) {
|
||||
- for (int i = 0; i < NumSlots; i++)
|
||||
- new cCamSlot(this);
|
||||
- Start();
|
||||
- }
|
||||
- else
|
||||
- esyslog("ERROR: no CAM slots found on device %d", device->DeviceNumber());
|
||||
- }
|
||||
- else
|
||||
- isyslog("device %d doesn't support CI link layer interface", device->DeviceNumber());
|
||||
- }
|
||||
- else
|
||||
- esyslog("ERROR: can't get CA capabilities on device %d", device->DeviceNumber());
|
||||
+ adapter = Adapter;
|
||||
+ frontend = Frontend;
|
||||
+ idle = false;
|
||||
ca_caps_t Caps;
|
||||
if (ioctl(fd, CA_GET_CAP, &Caps) == 0) {
|
||||
if ((Caps.slot_type & CA_CI_LINK) != 0) {
|
||||
@@ -41,10 +44,44 @@ cDvbCiAdapter::cDvbCiAdapter(cDevice *Device, int Fd)
|
||||
+ GetNumCamSlots(Device, Fd, this);
|
||||
+ Start();
|
||||
}
|
||||
|
||||
cDvbCiAdapter::~cDvbCiAdapter()
|
||||
{
|
||||
Cancel(3);
|
||||
@@ -518,6 +571,13 @@ index 5289bbd..fea3a83 100644
|
||||
+ OpenCa();
|
||||
+ idle = Idle;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+cTSBufferBase *cDvbCiAdapter::GetTSBuffer(int FdDvr)
|
||||
+{
|
||||
+ if (device)
|
||||
+ return new cTSBuffer(FdDvr, MEGABYTE(5), device->CardIndex() + 1);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
int cDvbCiAdapter::Read(uint8_t *Buffer, int MaxLength)
|
||||
@@ -527,7 +587,7 @@ index 5289bbd..fea3a83 100644
|
||||
if (Buffer && MaxLength > 0) {
|
||||
struct pollfd pfd[1];
|
||||
pfd[0].fd = fd;
|
||||
@@ -61,6 +98,8 @@ int cDvbCiAdapter::Read(uint8_t *Buffer, int MaxLength)
|
||||
@@ -61,6 +90,8 @@ int cDvbCiAdapter::Read(uint8_t *Buffer, int MaxLength)
|
||||
|
||||
void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length)
|
||||
{
|
||||
@@ -536,7 +596,7 @@ index 5289bbd..fea3a83 100644
|
||||
if (Buffer && Length > 0) {
|
||||
if (safe_write(fd, Buffer, Length) != Length)
|
||||
esyslog("ERROR: can't write to CI adapter on device %d: %m", device->DeviceNumber());
|
||||
@@ -69,6 +108,8 @@ void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length)
|
||||
@@ -69,6 +100,8 @@ void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length)
|
||||
|
||||
bool cDvbCiAdapter::Reset(int Slot)
|
||||
{
|
||||
@@ -545,7 +605,7 @@ index 5289bbd..fea3a83 100644
|
||||
if (ioctl(fd, CA_RESET, 1 << Slot) != -1)
|
||||
return true;
|
||||
else
|
||||
@@ -78,6 +119,8 @@ bool cDvbCiAdapter::Reset(int Slot)
|
||||
@@ -78,6 +111,8 @@ bool cDvbCiAdapter::Reset(int Slot)
|
||||
|
||||
eModuleStatus cDvbCiAdapter::ModuleStatus(int Slot)
|
||||
{
|
||||
@@ -554,24 +614,77 @@ index 5289bbd..fea3a83 100644
|
||||
ca_slot_info_t sinfo;
|
||||
sinfo.num = Slot;
|
||||
if (ioctl(fd, CA_GET_SLOT_INFO, &sinfo) != -1) {
|
||||
@@ -99,10 +142,10 @@ bool cDvbCiAdapter::Assign(cDevice *Device, bool Query)
|
||||
@@ -99,10 +134,60 @@ bool cDvbCiAdapter::Assign(cDevice *Device, bool Query)
|
||||
return true;
|
||||
}
|
||||
|
||||
-cDvbCiAdapter *cDvbCiAdapter::CreateCiAdapter(cDevice *Device, int Fd)
|
||||
+cDvbCiAdapter *cDvbCiAdapter::CreateCiAdapter(cDevice *Device, int Fd, int Adapter, int Frontend)
|
||||
+int cDvbCiAdapter::GetNumCamSlots(cDevice *Device, int Fd, cCiAdapter *CiAdapter)
|
||||
{
|
||||
// TODO check whether a CI is actually present?
|
||||
if (Device)
|
||||
- // TODO check whether a CI is actually present?
|
||||
- if (Device)
|
||||
- return new cDvbCiAdapter(Device, Fd);
|
||||
- return NULL;
|
||||
+ int NumSlots = -1;
|
||||
+ if (Fd >= 0) {
|
||||
+ ca_caps_t Caps;
|
||||
+ if (ioctl(Fd, CA_GET_CAP, &Caps) == 0) {
|
||||
+ if ((Caps.slot_type & CA_CI_LINK) != 0) {
|
||||
+ NumSlots = Caps.slot_num;
|
||||
+ if (NumSlots == 0)
|
||||
+ esyslog("ERROR: no CAM slots found on device %d", Device->DeviceNumber());
|
||||
+ else if (CiAdapter != NULL) {
|
||||
+ for (int i = 0; i < NumSlots; i++)
|
||||
+ new cCamSlot(CiAdapter);
|
||||
+ }
|
||||
+ else
|
||||
+ return NumSlots;
|
||||
+ }
|
||||
+ else
|
||||
+ isyslog("device %d doesn't support CI link layer interface", Device->DeviceNumber());
|
||||
+ }
|
||||
+ else
|
||||
+ esyslog("ERROR: can't get CA capabilities on device %d", Device->DeviceNumber());
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+cDvbCiAdapter *cDvbCiAdapter::CreateCiAdapter(cDevice *Device, int Fd, int Adapter, int Frontend)
|
||||
+{
|
||||
+ // don't create a ci-adapter if it's not useable
|
||||
+ if (Device && (Fd >= 0) && (GetNumCamSlots(Device, Fd, NULL) > 0))
|
||||
+ return new cDvbCiAdapter(Device, Fd, Adapter, Frontend);
|
||||
return NULL;
|
||||
+
|
||||
+ if (Fd >= 0)
|
||||
+ close(Fd);
|
||||
+
|
||||
+ // try to find an external ci-adapter
|
||||
+ for (cDvbCiAdapterProbe *cp = DvbCiAdapterProbes.First(); cp; cp = DvbCiAdapterProbes.Next(cp)) {
|
||||
+ cDvbCiAdapter *ca = cp->Probe(Device);
|
||||
+ if (ca)
|
||||
+ return ca;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+// --- cDvbCiAdapterProbe -------------------------------------------------------
|
||||
+
|
||||
+cList<cDvbCiAdapterProbe> DvbCiAdapterProbes;
|
||||
+
|
||||
+cDvbCiAdapterProbe::cDvbCiAdapterProbe(void)
|
||||
+{
|
||||
+ DvbCiAdapterProbes.Add(this);
|
||||
+}
|
||||
+
|
||||
+cDvbCiAdapterProbe::~cDvbCiAdapterProbe()
|
||||
+{
|
||||
+ DvbCiAdapterProbes.Del(this, false);
|
||||
}
|
||||
diff --git a/dvbci.h b/dvbci.h
|
||||
index adbe40d..6d117b2 100644
|
||||
index adbe40d..d908b2f 100644
|
||||
--- a/dvbci.h
|
||||
+++ b/dvbci.h
|
||||
@@ -16,16 +16,24 @@ class cDvbCiAdapter : public cCiAdapter {
|
||||
@@ -16,16 +16,48 @@ class cDvbCiAdapter : public cCiAdapter {
|
||||
private:
|
||||
cDevice *device;
|
||||
int fd;
|
||||
@@ -592,26 +705,53 @@ index adbe40d..6d117b2 100644
|
||||
public:
|
||||
virtual ~cDvbCiAdapter();
|
||||
- static cDvbCiAdapter *CreateCiAdapter(cDevice *Device, int Fd);
|
||||
+ virtual cTSBufferBase *GetTSBuffer(int FdDvr);
|
||||
+ static int GetNumCamSlots(cDevice *Device, int Fd, cCiAdapter *CiAdapter);
|
||||
+ ///< Tests if the CA device is usable for vdr.
|
||||
+ ///< If CiAdapter is not NULL it will create the CamSlots for the given ci-adapter.
|
||||
+ virtual bool SetIdle(bool Idle, bool TestOnly);
|
||||
+ virtual bool IsIdle(void) const { return idle; }
|
||||
+ static cDvbCiAdapter *CreateCiAdapter(cDevice *Device, int Fd, int Adapter = -1, int Frontend = -1);
|
||||
+ };
|
||||
+
|
||||
+// A plugin that implements an external DVB ci-adapter derived from cDvbCiAdapter needs to create
|
||||
+// a cDvbCiAdapterProbe derived object on the heap in order to have its Probe()
|
||||
+// function called, where it can actually create the appropriate ci-adapter.
|
||||
+// The cDvbCiAdapterProbe object must be created in the plugin's constructor,
|
||||
+// and deleted in its destructor.
|
||||
+// Every plugin has to track its own list of already used device nodes.
|
||||
+// The Probes are always called if the base cDvbCiAdapter can't create a ci-adapter on its own.
|
||||
+
|
||||
+class cDvbCiAdapterProbe : public cListObject {
|
||||
+public:
|
||||
+ cDvbCiAdapterProbe(void);
|
||||
+ virtual ~cDvbCiAdapterProbe();
|
||||
+ virtual cDvbCiAdapter *Probe(cDevice *Device) = 0;
|
||||
+ ///< Probes for a DVB ci-adapter for the given Device and creates the appropriate
|
||||
+ ///< object derived from cDvbCiAdapter if applicable.
|
||||
+ ///< Returns NULL if no adapter has been created.
|
||||
};
|
||||
|
||||
+extern cList<cDvbCiAdapterProbe> DvbCiAdapterProbes;
|
||||
+
|
||||
#endif //__DVBCI_H
|
||||
diff --git a/dvbdevice.c b/dvbdevice.c
|
||||
index 53a4a22..7fc12a4 100644
|
||||
index 43e8544..49b5f61 100644
|
||||
--- a/dvbdevice.c
|
||||
+++ b/dvbdevice.c
|
||||
@@ -287,7 +287,7 @@ private:
|
||||
@@ -287,9 +287,10 @@ class cDvbTuner : public cThread {
|
||||
private:
|
||||
static cMutex bondMutex;
|
||||
enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked };
|
||||
bool SendDiseqc;
|
||||
+ bool SendDiseqc;
|
||||
int frontendType;
|
||||
const cDvbDevice *device;
|
||||
- int fd_frontend;
|
||||
+ mutable int fd_frontend;
|
||||
int adapter, frontend;
|
||||
uint32_t subsystemId;
|
||||
int tuneTimeout;
|
||||
@@ -298,7 +298,7 @@ private:
|
||||
@@ -300,7 +301,7 @@ private:
|
||||
const cScr *scr;
|
||||
bool lnbPowerTurnedOn;
|
||||
eTunerStatus tunerStatus;
|
||||
@@ -619,8 +759,14 @@ index 53a4a22..7fc12a4 100644
|
||||
+ mutable cMutex mutex;
|
||||
cCondVar locked;
|
||||
cCondVar newSet;
|
||||
dvb_diseqc_master_cmd diseqc_cmd;
|
||||
@@ -313,6 +313,10 @@ private:
|
||||
cDvbTuner *bondedTuner;
|
||||
@@ -308,11 +309,16 @@ private:
|
||||
bool SetFrontendType(const cChannel *Channel);
|
||||
cString GetBondingParams(const cChannel *Channel = NULL) const;
|
||||
void ClearEventQueue(void) const;
|
||||
+ dvb_diseqc_master_cmd diseqc_cmd;
|
||||
bool GetFrontendStatus(fe_status_t &Status) const;
|
||||
void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency);
|
||||
void ResetToneAndVoltage(void);
|
||||
bool SetFrontend(void);
|
||||
virtual void Action(void);
|
||||
@@ -631,24 +777,37 @@ index 53a4a22..7fc12a4 100644
|
||||
public:
|
||||
cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int Frontend);
|
||||
virtual ~cDvbTuner();
|
||||
@@ -324,6 +328,8 @@ public:
|
||||
@@ -325,9 +331,13 @@ public:
|
||||
uint32_t SubsystemId(void) const { return subsystemId; }
|
||||
bool IsTunedTo(const cChannel *Channel) const;
|
||||
void SetChannel(const cChannel *Channel);
|
||||
+ bool SetIdle(bool Idle);
|
||||
+ bool IsIdle(void) const { return isIdle; }
|
||||
bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
|
||||
+ bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
|
||||
bool Locked(int TimeoutMs = 0);
|
||||
int GetSignalStrength(void) const;
|
||||
@@ -350,6 +356,7 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int
|
||||
int GetSignalQuality(void) const;
|
||||
+
|
||||
+ bool SetIdle(bool Idle);
|
||||
+ bool IsIdle(void) const { return isIdle; }
|
||||
};
|
||||
|
||||
cMutex cDvbTuner::bondMutex;
|
||||
@@ -337,6 +347,7 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int
|
||||
frontendType = SYS_UNDEFINED;
|
||||
device = Device;
|
||||
fd_frontend = Fd_Frontend;
|
||||
+ SendDiseqc=false;
|
||||
adapter = Adapter;
|
||||
frontend = Frontend;
|
||||
subsystemId = cDvbDeviceProbe::GetSubsystemId(adapter, frontend);
|
||||
@@ -349,6 +360,7 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int
|
||||
tunerStatus = tsIdle;
|
||||
bondedTuner = NULL;
|
||||
bondedMaster = false;
|
||||
bondedMasterFailed = false;
|
||||
+ isIdle = false;
|
||||
SetDescription("tuner on frontend %d/%d", adapter, frontend);
|
||||
Start();
|
||||
}
|
||||
@@ -367,6 +374,8 @@ cDvbTuner::~cDvbTuner()
|
||||
@@ -366,6 +378,8 @@ cDvbTuner::~cDvbTuner()
|
||||
ExecuteDiseqc(lastDiseqc, &Frequency);
|
||||
}
|
||||
*/
|
||||
@@ -657,7 +816,7 @@ index 53a4a22..7fc12a4 100644
|
||||
}
|
||||
|
||||
bool cDvbTuner::Bond(cDvbTuner *Tuner)
|
||||
@@ -524,6 +533,8 @@ bool cDvbTuner::Locked(int TimeoutMs)
|
||||
@@ -510,6 +524,8 @@ bool cDvbTuner::Locked(int TimeoutMs)
|
||||
|
||||
void cDvbTuner::ClearEventQueue(void) const
|
||||
{
|
||||
@@ -666,8 +825,28 @@ index 53a4a22..7fc12a4 100644
|
||||
cPoller Poller(fd_frontend);
|
||||
if (Poller.Poll(TUNER_POLL_TIMEOUT)) {
|
||||
dvb_frontend_event Event;
|
||||
@@ -714,6 +725,8 @@ static int GetRequiredDeliverySystem(const cChannel *Channel, const cDvbTranspon
|
||||
@@ -710,8 +726,28 @@ static int GetRequiredDeliverySystem(const cChannel *Channel, const cDvbTranspon
|
||||
return ds;
|
||||
}
|
||||
|
||||
+bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
|
||||
+{
|
||||
+ cMutexLock MutexLock(&mutex);
|
||||
+ cDvbTransponderParameters dtp(channel.Parameters());
|
||||
+
|
||||
+ // Determine the required frontend type:
|
||||
+ int frontendType = GetRequiredDeliverySystem(&channel, &dtp);
|
||||
+
|
||||
+ if ((frontendType!=SYS_DVBS2 && frontendType!=SYS_DVBS) || SendDiseqc)
|
||||
+ return false;
|
||||
+ if (!OpenFrontend())
|
||||
+ return false;
|
||||
+ diseqc_cmd=cmd;
|
||||
+ SendDiseqc=true;
|
||||
+ newSet.Broadcast();
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
bool cDvbTuner::SetFrontend(void)
|
||||
{
|
||||
+ if (!OpenFrontend())
|
||||
@@ -675,7 +854,7 @@ index 53a4a22..7fc12a4 100644
|
||||
#define MAXFRONTENDCMDS 16
|
||||
#define SETCMD(c, d) { Frontend[CmdSeq.num].cmd = (c);\
|
||||
Frontend[CmdSeq.num].u.data = (d);\
|
||||
@@ -859,9 +872,11 @@ void cDvbTuner::Action(void)
|
||||
@@ -857,10 +893,16 @@ void cDvbTuner::Action(void)
|
||||
bool LostLock = false;
|
||||
fe_status_t Status = (fe_status_t)0;
|
||||
while (Running()) {
|
||||
@@ -688,10 +867,15 @@ index 53a4a22..7fc12a4 100644
|
||||
+ Status = NewStatus;
|
||||
+ }
|
||||
cMutexLock MutexLock(&mutex);
|
||||
+ if (SendDiseqc) {
|
||||
+ CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &diseqc_cmd));
|
||||
+ SendDiseqc=false;
|
||||
+ }
|
||||
int WaitTime = 1000;
|
||||
if (SendDiseqc) {
|
||||
@@ -935,6 +950,40 @@ bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
|
||||
return true;
|
||||
switch (tunerStatus) {
|
||||
case tsIdle:
|
||||
@@ -912,6 +954,40 @@ void cDvbTuner::Action(void)
|
||||
}
|
||||
}
|
||||
|
||||
+bool cDvbTuner::SetIdle(bool Idle)
|
||||
@@ -731,7 +915,7 @@ index 53a4a22..7fc12a4 100644
|
||||
// --- cDvbSourceParam -------------------------------------------------------
|
||||
|
||||
class cDvbSourceParam : public cSourceParam {
|
||||
@@ -1020,7 +1069,8 @@ const char *DeliverySystemNames[] = {
|
||||
@@ -997,7 +1073,8 @@ const char *DeliverySystemNames[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -741,16 +925,19 @@ index 53a4a22..7fc12a4 100644
|
||||
{
|
||||
adapter = Adapter;
|
||||
frontend = Frontend;
|
||||
@@ -1040,7 +1090,7 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend)
|
||||
@@ -1015,9 +1092,8 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend)
|
||||
|
||||
fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
|
||||
if (fd_ca >= 0)
|
||||
// Common Interface:
|
||||
|
||||
- fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
|
||||
- if (fd_ca >= 0)
|
||||
- ciAdapter = cDvbCiAdapter::CreateCiAdapter(this, fd_ca);
|
||||
+ ciAdapter = cDvbCiAdapter::CreateCiAdapter(parentDevice ? parentDevice : this, fd_ca, adapter, frontend);
|
||||
+ int fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
|
||||
+ ciAdapter = cDvbCiAdapter::CreateCiAdapter(parentDevice ? parentDevice : this, fd_ca, adapter, frontend);
|
||||
|
||||
// The DVR device (will be opened and closed as needed):
|
||||
|
||||
@@ -1257,7 +1307,11 @@ bool cDvbDevice::BondDevices(const char *Bondings)
|
||||
@@ -1245,7 +1321,11 @@ bool cDvbDevice::BondDevices(const char *Bondings)
|
||||
if (d >= 0) {
|
||||
int ErrorDevice = 0;
|
||||
if (cDevice *Device1 = cDevice::GetDevice(i)) {
|
||||
@@ -762,7 +949,7 @@ index 53a4a22..7fc12a4 100644
|
||||
if (cDvbDevice *DvbDevice1 = dynamic_cast<cDvbDevice *>(Device1)) {
|
||||
if (cDvbDevice *DvbDevice2 = dynamic_cast<cDvbDevice *>(Device2)) {
|
||||
if (!DvbDevice1->Bond(DvbDevice2))
|
||||
@@ -1291,7 +1345,10 @@ bool cDvbDevice::BondDevices(const char *Bondings)
|
||||
@@ -1279,7 +1359,10 @@ bool cDvbDevice::BondDevices(const char *Bondings)
|
||||
void cDvbDevice::UnBondDevices(void)
|
||||
{
|
||||
for (int i = 0; i < cDevice::NumDevices(); i++) {
|
||||
@@ -774,7 +961,7 @@ index 53a4a22..7fc12a4 100644
|
||||
d->UnBond();
|
||||
}
|
||||
}
|
||||
@@ -1345,6 +1402,26 @@ bool cDvbDevice::BondingOk(const cChannel *Channel, bool ConsiderOccupied) const
|
||||
@@ -1333,6 +1416,26 @@ bool cDvbDevice::BondingOk(const cChannel *Channel, bool ConsiderOccupied) const
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -801,7 +988,7 @@ index 53a4a22..7fc12a4 100644
|
||||
bool cDvbDevice::HasCi(void)
|
||||
{
|
||||
return ciAdapter;
|
||||
@@ -1511,7 +1588,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
|
||||
@@ -1499,7 +1602,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
|
||||
|
||||
bool cDvbDevice::ProvidesEIT(void) const
|
||||
{
|
||||
@@ -810,8 +997,35 @@ index 53a4a22..7fc12a4 100644
|
||||
}
|
||||
|
||||
int cDvbDevice::NumProvidedSystems(void) const
|
||||
@@ -1544,6 +1647,11 @@ bool cDvbDevice::HasLock(int TimeoutMs)
|
||||
return dvbTuner ? dvbTuner->Locked(TimeoutMs) : false;
|
||||
}
|
||||
|
||||
+bool cDvbDevice::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
|
||||
+{
|
||||
+ return dvbTuner->SendDiseqcCmd(cmd);
|
||||
+}
|
||||
+
|
||||
void cDvbDevice::SetTransferModeForDolbyDigital(int Mode)
|
||||
{
|
||||
setTransferModeForDolbyDigital = Mode;
|
||||
@@ -1553,8 +1661,12 @@ bool cDvbDevice::OpenDvr(void)
|
||||
{
|
||||
CloseDvr();
|
||||
fd_dvr = DvbOpen(DEV_DVB_DVR, adapter, frontend, O_RDONLY | O_NONBLOCK, true);
|
||||
- if (fd_dvr >= 0)
|
||||
- tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(5), CardIndex() + 1);
|
||||
+ if (fd_dvr >= 0) {
|
||||
+ if (ciAdapter)
|
||||
+ tsBuffer = ciAdapter->GetTSBuffer(fd_dvr);
|
||||
+ if (tsBuffer == NULL)
|
||||
+ tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(5), CardIndex() + 1);
|
||||
+ }
|
||||
return fd_dvr >= 0;
|
||||
}
|
||||
|
||||
diff --git a/dvbdevice.h b/dvbdevice.h
|
||||
index 4ffcb91..e9b7cd6 100644
|
||||
index 7da9c56..6cd4abf 100644
|
||||
--- a/dvbdevice.h
|
||||
+++ b/dvbdevice.h
|
||||
@@ -107,7 +107,7 @@ class cDvbTuner;
|
||||
@@ -823,7 +1037,14 @@ index 4ffcb91..e9b7cd6 100644
|
||||
static cString DvbName(const char *Name, int Adapter, int Frontend);
|
||||
static int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError = false);
|
||||
private:
|
||||
@@ -133,12 +133,14 @@ private:
|
||||
@@ -127,19 +127,20 @@ private:
|
||||
int deliverySystems[MAXDELIVERYSYSTEMS];
|
||||
int numDeliverySystems;
|
||||
int numModulations;
|
||||
- int fd_dvr, fd_ca;
|
||||
+ int fd_dvr;
|
||||
static cMutex bondMutex;
|
||||
cDvbDevice *bondedDevice;
|
||||
mutable bool needsDetachBondedReceivers;
|
||||
bool QueryDeliverySystems(int fd_frontend);
|
||||
public:
|
||||
@@ -833,12 +1054,26 @@ index 4ffcb91..e9b7cd6 100644
|
||||
int Adapter(void) const { return adapter; }
|
||||
int Frontend(void) const { return frontend; }
|
||||
virtual bool Ready(void);
|
||||
virtual cString DeviceType(void) const;
|
||||
virtual cString DeviceName(void) const;
|
||||
+ virtual bool SetIdleDevice(bool Idle, bool TestOnly);
|
||||
+
|
||||
static bool BondDevices(const char *Bondings);
|
||||
///< Bonds the devices as defined in the given Bondings string.
|
||||
///< A bonding is a sequence of device numbers (starting at 1),
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -193,6 +194,7 @@ protected:
|
||||
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
|
||||
public:
|
||||
virtual bool HasLock(int TimeoutMs = 0);
|
||||
+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
|
||||
|
||||
// PID handle facilities
|
||||
|
||||
@@ -225,7 +227,7 @@ public:
|
||||
// Receiver facilities
|
||||
|
||||
private:
|
||||
- cTSBuffer *tsBuffer;
|
||||
+ cTSBufferBase *tsBuffer;
|
||||
protected:
|
||||
virtual bool OpenDvr(void);
|
||||
virtual void CloseDvr(void);
|
||||
4
packages/3rdparty/system/pcsc-lite/meta
vendored
@@ -20,12 +20,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pcsc-lite"
|
||||
PKG_VERSION="1.8.7"
|
||||
PKG_VERSION="1.8.8"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://pcsclite.alioth.debian.org/pcsclite.html"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/3842/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/3862/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain libusb"
|
||||
PKG_PRIORITY="optional"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
3.0.1
|
||||
- bump addon version
|
||||
|
||||
2.1.3
|
||||
- update to evtest-1.30
|
||||
|
||||
2.1.2
|
||||
- cleanup
|
||||
|
||||
2.1.1
|
||||
- rebuild for addon version 2.1
|
||||
|
||||
2.0.1
|
||||
- rebuild for libiconv changes
|
||||
|
||||
2.0.0
|
||||
- prepare for OpenELEC-2.0 release
|
||||
|
||||
1.90.1
|
||||
- depends on xbmc.python API 2.0
|
||||
|
||||
1.90.0
|
||||
- prepare for OpenELEC-1.90 release
|
||||
|
||||
1.0.0
|
||||
- update to evtest-1.29
|
||||
- prepare for OpenELEC-1.0 release
|
||||
|
||||
0.99.3
|
||||
- change icon
|
||||
|
||||
0.99.2
|
||||
- build as shared lib
|
||||
- include libiconv libs
|
||||
- include libxml2 libs
|
||||
- include zlib libs
|
||||
|
||||
0.99.1
|
||||
- initial addon based on evtest-1.27
|
||||
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,38 +0,0 @@
|
||||
3.0.2
|
||||
- update to htop-1.0.2
|
||||
|
||||
3.0.1
|
||||
- bump addon version
|
||||
|
||||
2.1.2
|
||||
- cleanup
|
||||
|
||||
2.1.1
|
||||
- rebuild for addon version 2.1
|
||||
- update to htop-1.0.1
|
||||
|
||||
2.0.0
|
||||
- prepare for OpenELEC-2.0 release
|
||||
- update to htop-1.0
|
||||
|
||||
1.90.1
|
||||
- depends on xbmc.python API 2.0
|
||||
|
||||
1.90.0
|
||||
- prepare for OpenELEC-1.90 release
|
||||
|
||||
1.0.0
|
||||
- prepare for OpenELEC-1.0 release
|
||||
|
||||
0.99.4
|
||||
- change icon
|
||||
|
||||
0.99.3
|
||||
- build as shared lib
|
||||
- include ncurses libs
|
||||
|
||||
0.99.2
|
||||
- prepare for release
|
||||
|
||||
0.99.1
|
||||
- initial addon based on htop-0.9
|
||||
|
Before Width: | Height: | Size: 28 KiB |
@@ -24,3 +24,4 @@
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||
cp -P $PKG_DIR/settings-default.xml $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
3.0.3
|
||||
improved python script for modifying tuners
|
||||
3.0.2
|
||||
added addon settings for
|
||||
modifying tuner type (DVB-C, DVB-T, ATSC)
|
||||
setting delays
|
||||
3.0.1
|
||||
- bump addon version
|
||||
- binary files are stored with OpenELEC image
|
||||
- addon is used to start userspace program
|
||||
|
||||
bump addon version
|
||||
binary files are stored with OpenELEC image
|
||||
addon is used to start userspace program
|
||||
2.1.3
|
||||
- bump addon version for new kernel
|
||||
|
||||
bump addon version for new kernel
|
||||
2.1.2
|
||||
- dvbhdhomerun upgraded to 0.0.10
|
||||
|
||||
dvbhdhomerun upgraded to 0.0.10
|
||||
2.1.1
|
||||
- rebuild for addon version 2.1
|
||||
|
||||
rebuild for addon version 2.1
|
||||
2.0.1
|
||||
- starting userspace DVB drivers from Tvheadend/VDR
|
||||
|
||||
starting userspace DVB drivers from Tvheadend/VDR
|
||||
2.0.0
|
||||
- initial version of HDHomeRun driver
|
||||
initial version of HDHomeRun driver
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 35 KiB |
@@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="hdhomerun"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_REV="1"
|
||||
PKG_REV="3"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.silicondust.com/products/hdhomerun/dvbt/"
|
||||
@@ -31,8 +31,6 @@ PKG_PRIORITY="optional"
|
||||
PKG_SECTION="driver/dvb"
|
||||
PKG_SHORTDESC="A linux DVB driver for the HDHomeRun (http://www.silicondust.com)."
|
||||
PKG_LONGDESC="A linux DVB driver for the HDHomeRun (http://www.silicondust.com)."
|
||||
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_TYPE="xbmc.python.script"
|
||||
|
||||
4
packages/addons/driver/hdhomerun/settings-default.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<settings>
|
||||
<setting id="PRE_WAIT" value="2" />
|
||||
<setting id="POST_WAIT" value="1" />
|
||||
</settings>
|
||||
11
packages/mediacenter/xbmc/sleep.d/99_reload_skin → packages/addons/driver/hdhomerun/source/bin/hdhomerun.start
Executable file → Normal file
@@ -22,10 +22,7 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
case "$1" in
|
||||
thaw|resume)
|
||||
xbmc-send --host=127.0.0.1 -a "ReloadSkin()" &
|
||||
;;
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.hdhomerun"
|
||||
|
||||
logger -t Hdhomerun "### Hdhomerun manual start ###"
|
||||
. $ADDON_DIR/bin/userspace-driver.sh
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
@@ -18,6 +20,7 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
. /etc/profile
|
||||
|
||||
logger -t Hdhomerun "### Hdhomerun manual stop ###"
|
||||
killall userhdhomerun
|
||||
107
packages/addons/driver/hdhomerun/source/bin/userspace-driver.sh
Executable file → Normal file
@@ -2,7 +2,7 @@
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,11 @@
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.hdhomerun"
|
||||
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.hdhomerun"
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
|
||||
# modules are not automatically loaded
|
||||
modprobe dvb_hdhomerun
|
||||
modprobe dvb_hdhomerun_fe
|
||||
|
||||
mkdir -p $ADDON_HOME
|
||||
|
||||
@@ -31,31 +36,101 @@ if [ ! -f "$ADDON_HOME/dvbhdhomerun.sample" ]; then
|
||||
cp $ADDON_DIR/config/* $ADDON_HOME/
|
||||
fi
|
||||
|
||||
if [ ! -f "$ADDON_SETTINGS" ]; then
|
||||
cp $ADDON_DIR/settings-default.xml $ADDON_SETTINGS
|
||||
fi
|
||||
|
||||
mkdir -p /var/config
|
||||
cat "$ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/hdhomerun-addon.conf
|
||||
. /var/config/hdhomerun-addon.conf
|
||||
|
||||
if [ -z "$(pidof userhdhomerun)" ]; then
|
||||
if [ "$ENABLE_TUNER_TYPES" = "true" ]; then
|
||||
DVBHDHOMERUN_CONF_TMP=/tmp/dvbhdhomerun.conf
|
||||
touch $ADDON_HOME/dvbhdhomerun.conf
|
||||
cp $ADDON_HOME/dvbhdhomerun.conf $DVBHDHOMERUN_CONF_TMP
|
||||
|
||||
# get tuner serial numbers
|
||||
SERIALS=$(cat /var/config/hdhomerun-addon.conf | sed -n 's|^ATTACHED_TUNER_\(.*\)_\(.*\)_DVBMODE=.*|\1-\2|gp' | sort | uniq)
|
||||
. /var/config/hdhomerun-addon.conf
|
||||
|
||||
for SERIAL in ${SERIALS[@]}; do
|
||||
SERIAL_VAR=$(echo $SERIAL | sed 's|-|_|')
|
||||
DVBMODE=$(eval echo \$ATTACHED_TUNER_${SERIAL_VAR}_DVBMODE)
|
||||
FULLNAME=$(eval echo \$ATTACHED_TUNER_${SERIAL_VAR}_FULLNAME)
|
||||
DISABLE=$(eval echo \$ATTACHED_TUNER_${SERIAL_VAR}_DISABLE)
|
||||
|
||||
[ "$DVBMODE" = "auto" ] && DVBMODE=""
|
||||
|
||||
# remove setttings for this tuner
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^tuner_type=|^use_full_name=|^disable=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $DVBHDHOMERUN_CONF_TMP >${DVBHDHOMERUN_CONF_TMP}-types
|
||||
mv ${DVBHDHOMERUN_CONF_TMP}-types $DVBHDHOMERUN_CONF_TMP
|
||||
echo "" >>$DVBHDHOMERUN_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $DVBHDHOMERUN_CONF_TMP
|
||||
|
||||
ADDNEW=true
|
||||
if [ -n "$DVBMODE" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo "[$SERIAL]" >>$DVBHDHOMERUN_CONF_TMP
|
||||
echo "tuner_type=$DVBMODE" >>$DVBHDHOMERUN_CONF_TMP
|
||||
fi
|
||||
if [ "$FULLNAME" = "true" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo "[$SERIAL]" >>$DVBHDHOMERUN_CONF_TMP
|
||||
echo "use_full_name=true" >>$DVBHDHOMERUN_CONF_TMP
|
||||
fi
|
||||
if [ "$DISABLE" = "true" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo "[$SERIAL]" >>$DVBHDHOMERUN_CONF_TMP
|
||||
echo "disable=true" >>$DVBHDHOMERUN_CONF_TMP
|
||||
fi
|
||||
|
||||
echo "" >>$DVBHDHOMERUN_CONF_TMP
|
||||
done
|
||||
|
||||
# remove logging from libhdhomerun library
|
||||
awk -v val="[libhdhomerun]" '$0 == val {flag=1; next} /^enable=|^logfile=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $DVBHDHOMERUN_CONF_TMP >${DVBHDHOMERUN_CONF_TMP}-log
|
||||
mv ${DVBHDHOMERUN_CONF_TMP}-log $DVBHDHOMERUN_CONF_TMP
|
||||
echo "" >>$DVBHDHOMERUN_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $DVBHDHOMERUN_CONF_TMP
|
||||
|
||||
if [ "$LIBHDHOMERUN_LOG" = "true" ]; then
|
||||
cat >>$DVBHDHOMERUN_CONF_TMP << EOF
|
||||
|
||||
[libhdhomerun]
|
||||
enable=true
|
||||
logfile=/var/log/dvbhdhomerun_libhdhomerun.log
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
md5_1=$(md5sum -b $DVBHDHOMERUN_CONF_TMP | awk '{print $1}')
|
||||
md5_2=$(md5sum -b $ADDON_HOME/dvbhdhomerun.conf | awk '{print $1}')
|
||||
if [ "$md5_1" != "$md5_2" ]; then
|
||||
# file changed - copy to addon home
|
||||
cp $DVBHDHOMERUN_CONF_TMP $ADDON_HOME/dvbhdhomerun.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f /tmp/dvbhdhomerun
|
||||
if [ -f $ADDON_HOME/dvbhdhomerun.conf ]; then
|
||||
ln -s $ADDON_HOME/dvbhdhomerun.conf /tmp/dvbhdhomerun
|
||||
fi
|
||||
|
||||
# modules are not automatically loaded
|
||||
modprobe dvb_hdhomerun
|
||||
modprobe dvb_hdhomerun_fe
|
||||
usleep 2000000
|
||||
[ -z "$PRE_WAIT" ] && PRE_WAIT=0
|
||||
PRE_WAIT=$(( $PRE_WAIT *1 ))
|
||||
[ -z "$POST_WAIT" ] && POST_WAIT=0
|
||||
POST_WAIT=$(( $POST_WAIT *1 ))
|
||||
|
||||
# could be useful
|
||||
if [ -f $ADDON_HOME/pre-wait.sh ]; then
|
||||
sh $ADDON_HOME/pre-wait.sh
|
||||
fi
|
||||
logger -t HDHomeRun "### Pre wait for $PRE_WAIT sec ###"
|
||||
sleep $PRE_WAIT
|
||||
|
||||
mkdir -p /var/log/
|
||||
rm -f /var/log/dvbhdhomerun.log
|
||||
|
||||
|
||||
userhdhomerun -f
|
||||
# how much time should we wait?
|
||||
usleep 1000000
|
||||
if [ -f $ADDON_HOME/post-wait.sh ]; then
|
||||
sh $ADDON_HOME/post-wait.sh
|
||||
fi
|
||||
|
||||
logger -t HDHomeRun "### Post wait for $POST_WAIT sec ###"
|
||||
sleep $POST_WAIT
|
||||
|
||||
# save adapter names in background
|
||||
(
|
||||
@@ -67,3 +142,5 @@ if [ -z "$(pidof userhdhomerun)" ]; then
|
||||
fi
|
||||
)&
|
||||
fi
|
||||
|
||||
logger -t HDHomeRun "### HDHomeRun ready ###"
|
||||
|
||||
15
packages/addons/driver/hdhomerun/source/default.py
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -21,3 +21,16 @@
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.hdhomerun')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
__hdhomerun_log__ = '/var/log/dvbhdhomerun.log'
|
||||
|
||||
if __name__ == "__main__" and len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_hdhomerun_tuners
|
||||
refresh_hdhomerun_tuners(__settings_xml__, __hdhomerun_log__)
|
||||
__settings__.openSettings()
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<string id="1000">General</string>
|
||||
<string id="1020">Pre wait time [sec]</string>
|
||||
<string id="1030">Post wait time [sec]</string>
|
||||
<string id="1040">Enable libhdhomerun logging</string>
|
||||
|
||||
<string id="9000">Tuner settings</string>
|
||||
<string id="9005">Enable modifying settings</string>
|
||||
<string id="9010">Refresh tuners... (press me)</string>
|
||||
<string id="9020"> use full name</string>
|
||||
<string id="9030"> disabled</string>
|
||||
</strings>
|
||||
@@ -0,0 +1,272 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import xmlpp
|
||||
from xml.dom import minidom
|
||||
|
||||
__sundtek_userspace__ = '/storage/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv/'
|
||||
|
||||
######################################################################################################
|
||||
# backup setting.xml file only if backup doesn't exist
|
||||
def settings_backup(settings_xml):
|
||||
try:
|
||||
with open(settings_xml + '_orig') as f: pass
|
||||
except IOError as e:
|
||||
shutil.copyfile(settings_xml, settings_xml + '_orig')
|
||||
|
||||
######################################################################################################
|
||||
# restore setting.xml file from backup
|
||||
def settings_restore(settings_xml):
|
||||
try:
|
||||
shutil.copyfile(settings_xml + '_orig', settings_xml)
|
||||
except IOError as e:
|
||||
print 'Error restoring file:', settings_xml
|
||||
|
||||
######################################################################################################
|
||||
# get hdhomerun supported devices on a system (only name like 101ADD2B-0)
|
||||
def get_devices_hdhomerun(hdhomerun_log):
|
||||
tuners = []
|
||||
try:
|
||||
for line in open(hdhomerun_log, 'r'):
|
||||
line = line.strip()
|
||||
if line.startswith('Registered tuner'):
|
||||
name = line.split(':');
|
||||
name = name[2].strip()
|
||||
tuners.append(name)
|
||||
except IOError:
|
||||
print 'Error reading hdhomerun log file', hdhomerun_log
|
||||
return tuners
|
||||
|
||||
"""
|
||||
root ~ # grep "Registered tuner" /var/log/dvbhdhomerun.log
|
||||
Registered tuner, id from kernel: 0 name: 101ADD2B-0
|
||||
Registered tuner, id from kernel: 1 name: 101ADD2B-1
|
||||
Registered tuner, id from kernel: 2 name: 1031D75A-0
|
||||
Registered tuner, id from kernel: 3 name: 1031D75A-1
|
||||
"""
|
||||
|
||||
######################################################################################################
|
||||
# get sundtek supported devices on a system (name, serial number, type)
|
||||
def get_devices_sundtek(mediaclient_e):
|
||||
tuners = []
|
||||
try:
|
||||
p = os.popen(mediaclient_e, "r")
|
||||
while 1:
|
||||
line = p.readline()
|
||||
if not line:
|
||||
break
|
||||
else:
|
||||
str = line.strip()
|
||||
if str.startswith('device '):
|
||||
name = str[str.find("[")+1:str.find("]")]
|
||||
tuners.append([name, 0, 's'])
|
||||
|
||||
if str.startswith('[SERIAL]:'):
|
||||
line = p.readline()
|
||||
str = line.strip()
|
||||
if str.startswith('ID:'):
|
||||
id = str.split(':');
|
||||
id = id[1].strip()
|
||||
tuners[len(tuners)-1] = [name, id, 's']
|
||||
|
||||
if str.startswith('[DVB-C]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T2]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
except IOError:
|
||||
print 'Error getting sundtek tuners info'
|
||||
return tuners
|
||||
|
||||
"""
|
||||
root ~ # mediaclient -e
|
||||
**** List of Media Hardware Devices ****
|
||||
device 0: [Sundtek MediaTV Pro (USB 2.0)] DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
|
||||
[BUS]:
|
||||
ID: 1-7
|
||||
[SERIAL]:
|
||||
ID: U110763295205
|
||||
[DVB-C]:
|
||||
FRONTEND: /dev/dvb/adapter0/frontend0
|
||||
DVR: /dev/dvb/adapter0/dvr0
|
||||
DMX: /dev/dvb/adapter0/demux0
|
||||
[DVB-T]:
|
||||
FRONTEND: /dev/dvb/adapter0/frontend0
|
||||
DVR: /dev/dvb/adapter0/dvr0
|
||||
DMX: /dev/dvb/adapter0/demux0
|
||||
[ANALOG-TV]:
|
||||
VIDEO0: /dev/video0
|
||||
VBI0: /dev/vbi0
|
||||
[FM-RADIO]:
|
||||
RADIO0: /dev/radio0
|
||||
RDS: /dev/rds0
|
||||
[REMOTECONTROL]:
|
||||
INPUT0: /dev/mediainput0
|
||||
[OSS]:
|
||||
OSS0: /dev/dsp0
|
||||
"""
|
||||
|
||||
######################################################################################################
|
||||
# parse settings.xml file
|
||||
def parse_settings(settings_xml):
|
||||
try:
|
||||
xmldoc = minidom.parse(settings_xml)
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
return xmldoc
|
||||
except Exception as inst:
|
||||
print 'Error parse settings file', settings_xml
|
||||
return None
|
||||
|
||||
######################################################################################################
|
||||
# remove all nodes with id started with ATTACHED_TUNER_
|
||||
def remove_old_tuners(xmldoc):
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
for node_cat in category:
|
||||
setting = node_cat.getElementsByTagName('setting')
|
||||
for node_set in setting :
|
||||
if 'id' in node_set.attributes.keys() and not node_set.getAttribute('id').find('ATTACHED_TUNER_'):
|
||||
node_set.parentNode.removeChild(node_set)
|
||||
|
||||
######################################################################################################
|
||||
# add new hdhomerun tuners
|
||||
def add_hdhomerun(xmldoc, node_cat, tuners):
|
||||
for ix, tuner in enumerate(tuners):
|
||||
tuner_var = tuner.replace('-', '_')
|
||||
|
||||
node1 = xmldoc.createElement("setting")
|
||||
node1.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_DVBMODE')
|
||||
node1.setAttribute("label", tuner)
|
||||
node1.setAttribute("type", 'labelenum')
|
||||
node1.setAttribute("default", 'auto')
|
||||
node1.setAttribute("values", 'auto|ATSC|DVB-C|DVB-T')
|
||||
node_cat.appendChild(node1)
|
||||
|
||||
node2 = xmldoc.createElement("setting")
|
||||
node2.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_FULLNAME')
|
||||
node2.setAttribute("label", '9020')
|
||||
node2.setAttribute("type", 'bool')
|
||||
node2.setAttribute("default", 'false')
|
||||
node_cat.appendChild(node2)
|
||||
|
||||
node3 = xmldoc.createElement("setting")
|
||||
node3.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_DISABLE')
|
||||
node3.setAttribute("label", '9030')
|
||||
node3.setAttribute("type", 'bool')
|
||||
node3.setAttribute("default", 'false')
|
||||
node_cat.appendChild(node3)
|
||||
|
||||
# for tuner
|
||||
|
||||
######################################################################################################
|
||||
# add new sundtek tuners
|
||||
def add_sundtek(xmldoc, node_cat, tuners):
|
||||
for ix, tuner in enumerate(tuners):
|
||||
tuner_name = tuner[0]
|
||||
tuner_serial = tuner[1]
|
||||
tuner_type = tuner[2]
|
||||
|
||||
node1 = xmldoc.createElement("setting")
|
||||
node1.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_DVBMODE')
|
||||
node1.setAttribute("label", tuner_name + ", " + tuner_serial)
|
||||
node1.setAttribute("type", 'labelenum')
|
||||
|
||||
if (tuner_type == 's'):
|
||||
node1.setAttribute("default", 'DVB-S')
|
||||
node1.setAttribute("values", 'DVB-S')
|
||||
else:
|
||||
node1.setAttribute("default", 'DVB-C')
|
||||
node1.setAttribute("values", 'DVB-C|DVB-T')
|
||||
|
||||
node_cat.appendChild(node1)
|
||||
|
||||
node2 = xmldoc.createElement("setting")
|
||||
node2.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_IRPROT')
|
||||
node2.setAttribute("label", '9020')
|
||||
node2.setAttribute("type", 'labelenum')
|
||||
node2.setAttribute("default", 'auto')
|
||||
node2.setAttribute("values", 'auto|RC5|NEC|RC6')
|
||||
node_cat.appendChild(node2)
|
||||
|
||||
node3 = xmldoc.createElement("setting")
|
||||
node3.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_KEYMAP')
|
||||
node3.setAttribute("label", '9030')
|
||||
node3.setAttribute("type", 'file')
|
||||
node3.setAttribute("mask", '*.map')
|
||||
node3.setAttribute("default", __sundtek_userspace__)
|
||||
node_cat.appendChild(node3)
|
||||
|
||||
# for tuner
|
||||
|
||||
######################################################################################################
|
||||
# add new ATTACHED_TUNER_ nodes for available tuners
|
||||
def add_new_tuners(xmldoc, tuners, which):
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
for node_cat in category:
|
||||
setting = node_cat.getElementsByTagName('setting')
|
||||
for node_set in setting :
|
||||
if 'label' in node_set.attributes.keys() and '9010' in node_set.getAttribute('label'):
|
||||
if which == 'hdhomerun':
|
||||
add_hdhomerun(xmldoc, node_cat, tuners)
|
||||
break
|
||||
elif which == 'sundtek':
|
||||
add_sundtek(xmldoc, node_cat, tuners)
|
||||
break
|
||||
|
||||
|
||||
######################################################################################################
|
||||
# save settings.xml file back
|
||||
def save_settings(settings_xml, xmldoc):
|
||||
try:
|
||||
outputfile = open(settings_xml, 'w')
|
||||
xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2)
|
||||
outputfile.close()
|
||||
except IOError:
|
||||
print 'Error saving file:', settings_xml
|
||||
settings_restore(settings_xml)
|
||||
|
||||
######################################################################################################
|
||||
# refresh hdhomerun tuners in settings.xml file
|
||||
def refresh_hdhomerun_tuners(settings_xml, hdhomerun_log):
|
||||
settings_backup(settings_xml)
|
||||
tuners = get_devices_hdhomerun(hdhomerun_log)
|
||||
xmldoc = parse_settings(settings_xml)
|
||||
if xmldoc == None:
|
||||
print 'No hdhomerun tuners found'
|
||||
else:
|
||||
remove_old_tuners(xmldoc)
|
||||
add_new_tuners(xmldoc, tuners, 'hdhomerun')
|
||||
save_settings(settings_xml, xmldoc)
|
||||
|
||||
######################################################################################################
|
||||
# refresh sundtek tuners in settings.xml file
|
||||
def refresh_sundtek_tuners(settings_xml, mediaclient_e):
|
||||
settings_backup(settings_xml)
|
||||
tuners = get_devices_sundtek(mediaclient_e)
|
||||
xmldoc = parse_settings(settings_xml)
|
||||
if xmldoc == None:
|
||||
print 'No sundtek tuners found'
|
||||
else:
|
||||
remove_old_tuners(xmldoc)
|
||||
add_new_tuners(xmldoc, tuners, 'sundtek')
|
||||
save_settings(settings_xml, xmldoc)
|
||||
161
packages/addons/driver/hdhomerun/source/resources/lib/xmlpp.py
Normal file
@@ -0,0 +1,161 @@
|
||||
"""Pretty print an XML document.
|
||||
|
||||
LICENCE:
|
||||
Copyright (c) 2008, Fredrik Ekholdt
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Fredrik Ekholdt nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE."""
|
||||
|
||||
import sys as _sys
|
||||
import re as _re
|
||||
|
||||
def _usage(this_file):
|
||||
return """SYNOPSIS: pretty print an XML document
|
||||
USAGE: python %s <filename> \n""" % this_file
|
||||
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
if line.strip():
|
||||
start = ""
|
||||
number_chars = 0
|
||||
for l in range(indent_level):
|
||||
start = start + " "
|
||||
number_chars = number_chars + 1
|
||||
try:
|
||||
elem_start = _re.findall("(\<\W{0,1}\w+:\w+) ?", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/]*\>)", line)[0]
|
||||
#should not have *
|
||||
attrs = _re.findall("(\S*?\=\".*?\")", line)
|
||||
output.write(start + elem_start)
|
||||
number_chars = len(start + elem_start)
|
||||
for attr in attrs:
|
||||
if (attrs.index(attr) + 1) == len(attrs):
|
||||
number_chars = number_chars + len(elem_finished)
|
||||
if (number_chars + len(attr) + 1) > width:
|
||||
output.write("\n")
|
||||
for i in range(len(start + elem_start) + 1):
|
||||
output.write(" ")
|
||||
number_chars = len(start + elem_start) + 1
|
||||
else:
|
||||
output.write(" ")
|
||||
number_chars = number_chars + 1
|
||||
output.write(attr)
|
||||
number_chars = number_chars + len(attr)
|
||||
output.write(elem_finished + "\n")
|
||||
except IndexError:
|
||||
#give up pretty print this line
|
||||
output.write(start + line + "\n")
|
||||
|
||||
|
||||
def _pprint_elem_content(indent_level, line, output=_sys.stdout):
|
||||
if line.strip():
|
||||
for l in range(indent_level):
|
||||
output.write(" ")
|
||||
output.write(line + "\n")
|
||||
|
||||
def _get_next_elem(data):
|
||||
start_pos = data.find("<")
|
||||
end_pos = data.find(">") + 1
|
||||
retval = data[start_pos:end_pos]
|
||||
stopper = retval.rfind("/")
|
||||
if stopper < retval.rfind("\""):
|
||||
stopper = -1
|
||||
single = (stopper > -1 and ((retval.find(">") - stopper) < (stopper - retval.find("<"))))
|
||||
|
||||
ignore_excl = retval.find("<!") > -1
|
||||
ignore_question = retval.find("<?") > -1
|
||||
|
||||
if ignore_excl:
|
||||
cdata = retval.find("<![CDATA[") > -1
|
||||
if cdata:
|
||||
end_pos = data.find("]]>")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("]]>")
|
||||
|
||||
elif ignore_question:
|
||||
end_pos = data.find("?>") + len("?>")
|
||||
ignore = ignore_excl or ignore_question
|
||||
|
||||
no_indent = ignore or single
|
||||
|
||||
#print retval, end_pos, start_pos, stopper > -1, no_indent
|
||||
return start_pos, \
|
||||
end_pos, \
|
||||
stopper > -1, \
|
||||
no_indent
|
||||
|
||||
def get_pprint(xml, indent=4, width=80):
|
||||
"""Returns the pretty printed xml """
|
||||
class out:
|
||||
output = ""
|
||||
|
||||
def write(self, string):
|
||||
self.output += string
|
||||
out = out()
|
||||
pprint(xml, output=out, indent=indent, width=width)
|
||||
|
||||
return out.output
|
||||
|
||||
|
||||
def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
"""Pretty print xml.
|
||||
Use output to select output stream. Default is sys.stdout
|
||||
Use indent to select indentation level. Default is 4 """
|
||||
data = xml
|
||||
indent_level = 0
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
while ((start_pos > -1 and end_pos > -1)):
|
||||
_pprint_elem_content(indent_level, data[:start_pos].strip(),
|
||||
output=output)
|
||||
data = data[start_pos:]
|
||||
if is_stop and not no_indent:
|
||||
indent_level = indent_level - indent
|
||||
_pprint_line(indent_level,
|
||||
data[:end_pos - start_pos],
|
||||
width=width,
|
||||
output=output)
|
||||
data = data[end_pos - start_pos:]
|
||||
if not is_stop and not no_indent :
|
||||
indent_level = indent_level + indent
|
||||
|
||||
if not data:
|
||||
break
|
||||
else:
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "-h" in _sys.argv or "--help" in _sys.argv:
|
||||
_sys.stderr.write(_usage(_sys.argv[0]))
|
||||
_sys.exit(1)
|
||||
if len(_sys.argv) < 2:
|
||||
_sys.stderr.write(_usage(_sys.argv[0]))
|
||||
_sys.exit(1)
|
||||
else:
|
||||
filename = _sys.argv[1]
|
||||
fh = open(filename)
|
||||
|
||||
pprint(fh.read(), output=_sys.stdout, indent=4, width=80)
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="1000" >
|
||||
<setting type="sep" />
|
||||
<setting id="PRE_WAIT" type="number" label="1020" default="2" />
|
||||
<setting id="POST_WAIT" type="number" label="1030" default="1" />
|
||||
<setting id="LIBHDHOMERUN_LOG" type="bool" label="1040" default="false" />
|
||||
</category>
|
||||
<category label="9000">
|
||||
<setting type="sep" />
|
||||
<setting id="ENABLE_TUNER_TYPES" type="bool" label="9005" default="true" />
|
||||
<setting label="9010" option="close" type="action" action="RunScript($ID, refresh_tuners)" />
|
||||
</category>
|
||||
</settings>
|
||||
8
packages/addons/driver/hdhomerun/source/sleep.d/hdhomerun.power
Executable file → Normal file
@@ -23,22 +23,22 @@
|
||||
. /etc/profile
|
||||
|
||||
LOCKDIR="/var/lock/"
|
||||
LOCKFILE="hdhomerun"
|
||||
LOCKFILE="$LOCKDIR/hdhomerun"
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ -n "$(pidof userhdhomerun)" ]; then
|
||||
progress "Shutting down HDHomeRun driver for suspending..."
|
||||
mkdir -p "$LOCKDIR"
|
||||
touch "$LOCKDIR/$LOCKFILE"
|
||||
touch "$LOCKFILE"
|
||||
killall userhdhomerun
|
||||
fi
|
||||
;;
|
||||
|
||||
thaw|resume)
|
||||
if [ -f "$LOCKDIR/$LOCKFILE" ]; then
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
# driver started within Tvheadend/VDR
|
||||
rm -rf "$LOCKDIR/$LOCKFILE"
|
||||
rm -f "$LOCKFILE"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
@@ -24,9 +24,4 @@
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
cp -Pa $ROOT/$BUILD/sundtek-*/opt/bin/* $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
cp -Pa $ROOT/$BUILD/sundtek-*/opt/lib/*.so $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
cp -P $PKG_DIR/settings-default.xml $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
3.0.1
|
||||
- bump addon version
|
||||
|
||||
3.0.4
|
||||
improved python script for modifying tuners
|
||||
3.0.3
|
||||
added addon settings for modifying tuner type (DVB-C, DVB-T)
|
||||
3.0.2
|
||||
added addon settings
|
||||
enable HW PID filter (enabled for RPi by default)
|
||||
enable IR receiver
|
||||
allow sharing local tuner over network
|
||||
use network tuners
|
||||
sundtek's binaries are downloaded on first run
|
||||
automatically download new version of the binaries if available
|
||||
added preload library to .profile (to run mediaclient, w_scan, ... from console)
|
||||
2.1.4
|
||||
support for Raspberry Pi
|
||||
|
||||
2.1.3
|
||||
support for network tuner
|
||||
|
||||
2.1.2
|
||||
support for multiple Sundtek tuners
|
||||
support for working with other tuners (kernel drivers)
|
||||
|
||||
2.1.1
|
||||
- update to addon version 2.1
|
||||
|
||||
update to addon version 2.1
|
||||
2.0.5
|
||||
- starting userspace DVB drivers from Tvheadend/VDR
|
||||
|
||||
starting userspace DVB drivers from Tvheadend/VDR
|
||||
1.90.0
|
||||
- initial version of Sundtek MediaTV DVB driver
|
||||
initial version of Sundtek MediaTV DVB driver
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
0x01 KEY_SELECT
|
||||
0x02 KEY_3
|
||||
0x03 KEY_EXIT
|
||||
0x04 KEY_1
|
||||
0x05 KEY_5
|
||||
0x06 KEY_6
|
||||
0x07 KEY_CHANNELDOWN
|
||||
0x08 KEY_2
|
||||
0x09 KEY_CHANNELUP
|
||||
0x0a KEY_9
|
||||
0x0b KEY_ZOOM
|
||||
0x0c KEY_7
|
||||
0x0d KEY_8
|
||||
0x0e KEY_VOLUMEUP
|
||||
0x0f KEY_4
|
||||
0x10 KEY_BACK
|
||||
0x11 KEY_0
|
||||
0x12 KEY_ENTER
|
||||
0x13 KEY_VOLUMEDOWN
|
||||
0x14 KEY_RECORD
|
||||
0x15 KEY_STOP
|
||||
0x16 KEY_PLAY
|
||||
0x17 KEY_MUTE
|
||||
0x18 KEY_UP
|
||||
0x19 KEY_DOWN
|
||||
0x1a KEY_LEFT
|
||||
0x1b KEY_RIGHT
|
||||
0x1c KEY_RED
|
||||
0x1d KEY_GREEN
|
||||
0x1e KEY_YELLOW
|
||||
0x1f KEY_BLUE
|
||||
0x43 KEY_POWER
|
||||
32
packages/addons/driver/sundtek-mediatv/config/rc_key_ok.map
Normal file
@@ -0,0 +1,32 @@
|
||||
0x01 KEY_SELECT
|
||||
0x02 KEY_3
|
||||
0x03 KEY_EXIT
|
||||
0x04 KEY_1
|
||||
0x05 KEY_5
|
||||
0x06 KEY_6
|
||||
0x07 KEY_CHANNELDOWN
|
||||
0x08 KEY_2
|
||||
0x09 KEY_CHANNELUP
|
||||
0x0a KEY_9
|
||||
0x0b KEY_ZOOM
|
||||
0x0c KEY_7
|
||||
0x0d KEY_8
|
||||
0x0e KEY_VOLUMEUP
|
||||
0x0f KEY_4
|
||||
0x10 KEY_BACK
|
||||
0x11 KEY_0
|
||||
0x12 KEY_OK
|
||||
0x13 KEY_VOLUMEDOWN
|
||||
0x14 KEY_RECORD
|
||||
0x15 KEY_STOP
|
||||
0x16 KEY_PLAY
|
||||
0x17 KEY_MUTE
|
||||
0x18 KEY_UP
|
||||
0x19 KEY_DOWN
|
||||
0x1a KEY_LEFT
|
||||
0x1b KEY_RIGHT
|
||||
0x1c KEY_RED
|
||||
0x1d KEY_GREEN
|
||||
0x1e KEY_YELLOW
|
||||
0x1f KEY_BLUE
|
||||
0x43 KEY_POWER
|
||||
@@ -1,12 +1,15 @@
|
||||
#
|
||||
# sundtek.conf
|
||||
#
|
||||
# Call attach/detach script when new device appears/disappears
|
||||
# Do not change this line!
|
||||
device_attach=/storage/.xbmc/addons/driver.dvb.sundtek-mediatv/bin/device-attached.sh
|
||||
|
||||
# network tuner IP address (OpenELEC specific)
|
||||
#network_tuner_ip=xxx.xxx.xxx.xxx
|
||||
# enable HW PID filter (default on for RPi)
|
||||
use_hwpidfilter=off
|
||||
|
||||
# enable listening on network
|
||||
enablenetwork=off
|
||||
|
||||
# Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0
|
||||
first_adapter=0
|
||||
|
||||
# Infrared Control Support is disabled/enabled
|
||||
ir_disabled=1
|
||||
@@ -14,13 +17,17 @@ ir_disabled=1
|
||||
# trigger device_attach only once if more devices is used
|
||||
bulk_notification=on
|
||||
|
||||
# Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0
|
||||
#first_adapter=5
|
||||
|
||||
# Get adapter serial number with mediaclient -e
|
||||
# or look into file adapter_serial_number.txt
|
||||
[SERIALNUMBER]
|
||||
#[SERIALNUMBER]
|
||||
# Choose initial DVB mode for hybrid DVB-T/DVB-C devices only
|
||||
#initial_dvb_mode=[DVBC|DVBT]
|
||||
# default mode is DVB-C, we must set it to DVB-T if needed
|
||||
#initial_dvb_mode=DVBT
|
||||
|
||||
#[U123456789012]
|
||||
#initial_dvb_mode=DVBT
|
||||
|
||||
#[NETWORK]
|
||||
#device=192.168.1.1:0
|
||||
#device=192.168.1.1:1
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -20,13 +20,13 @@
|
||||
|
||||
PKG_NAME="sundtek-mediatv"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_REV="1"
|
||||
PKG_REV="4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://support.sundtek.com/"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS="sundtek"
|
||||
PKG_BUILD_DEPENDS="sundtek"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS=""
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="driver/dvb"
|
||||
PKG_SHORTDESC="Sundtek USB Stick DVB userspace driver"
|
||||
|
||||
21
packages/addons/driver/sundtek-mediatv/settings-default.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<settings>
|
||||
<setting id="AUTO_UPDATE" value="false" />
|
||||
<setting id="ANALOG_TV" value="false" />
|
||||
<setting id="SETTLE_TIME" value="0" />
|
||||
<setting id="RUN_USER_SCRIPT" value="false" />
|
||||
<setting id="ENABLE_HW_PID_FILTER" value="false" />
|
||||
<setting id="ENABLE_IR_RECEIVER" value="false" />
|
||||
<setting id="LOWEST_ADAPTER_NUM" value="0" />
|
||||
<setting id="ALLOW_NET_USE" value="false" />
|
||||
<setting id="USE_NET_TUNERS" value="false" />
|
||||
<setting id="DEVICE1_IP" value="" />
|
||||
<setting id="DEVICE1_NUM" value="1" />
|
||||
<setting id="DEVICE2_IP" value="" />
|
||||
<setting id="DEVICE2_NUM" value="1" />
|
||||
<setting id="DEVICE3_IP" value="" />
|
||||
<setting id="DEVICE3_NUM" value="1" />
|
||||
<setting id="DEVICE4_IP" value="" />
|
||||
<setting id="DEVICE4_NUM" value="1" />
|
||||
<setting id="DEVICE5_IP" value="" />
|
||||
<setting id="DEVICE5_NUM" value="1" />
|
||||
</settings>
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
|
||||
|
||||
logger -t Sundtek "### Sundtek manual start ###"
|
||||
. $ADDON_DIR/bin/userspace-driver.sh
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
|
||||
|
||||
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so
|
||||
|
||||
logger -t Sundtek "### Sundtek manual stop ###"
|
||||
mediaclient --shutdown
|
||||
318
packages/addons/driver/sundtek-mediatv/source/bin/userspace-driver.sh
Executable file → Normal file
@@ -2,7 +2,7 @@
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -22,58 +22,312 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
net_tuner_num_fix() {
|
||||
local num=$1
|
||||
|
||||
[ -z "$num" ] && num=1
|
||||
num=$(( $num *1 ))
|
||||
[ $num -lt 1 ] && num=1
|
||||
num=$(( $num -1 ))
|
||||
echo $num
|
||||
}
|
||||
|
||||
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
|
||||
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_READY="/var/run/sundtek.ready"
|
||||
ADAPTER_WAIT_TIME=120
|
||||
|
||||
NETWORK_TUNER_IP=$(awk '/^network_tuner_ip=/ {split($0,a,"="); printf("%s", a[2])}' "$ADDON_HOME/sundtek.conf")
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
|
||||
mkdir -p $ADDON_HOME
|
||||
|
||||
if [ ! -f "$ADDON_HOME/sundtek.conf" ]; then
|
||||
cp $ADDON_DIR/config/* $ADDON_HOME/
|
||||
else
|
||||
# in case of missing entries in addon home's sundtek.conf
|
||||
entry_set="$(grep use_hwpidfilter $ADDON_HOME/sundtek.conf 2>/dev/null)"
|
||||
if [ -z "$entry_set" ]; then
|
||||
sed -i 's|^device_attach=.*|# device_attach not used anymore\n\n# enable HW PID filter\nuse_hwpidfilter=off\n\n# enable listening on network\nenablenetwork=off|g' $ADDON_HOME/sundtek.conf
|
||||
sed -i 's|^#first_adapter=.*|first_adapter=0|g' $ADDON_HOME/sundtek.conf
|
||||
|
||||
sed -i 's|.*network tuner IP address (OpenELEC specific).*||g' $ADDON_HOME/sundtek.conf
|
||||
sed -i 's|.*network_tuner_ip=.*||g' $ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
SUNDTEK_ARG="--pluginpath=$ADDON_DIR/bin --daemon"
|
||||
if [ ! -f "$ADDON_SETTINGS" ]; then
|
||||
cp $ADDON_DIR/settings-default.xml $ADDON_SETTINGS
|
||||
fi
|
||||
|
||||
[ ! -f $ADDON_HOME/rc_key_enter.map ] && mv $ADDON_HOME/rc_key_enter $ADDON_HOME/rc_key_enter.map
|
||||
[ ! -f $ADDON_HOME/rc_key_ok.map ] && mv $ADDON_HOME/rc_key_ok $ADDON_HOME/rc_key_ok.map
|
||||
|
||||
mkdir -p /var/config
|
||||
cat "$ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
if [ "$AUTO_UPDATE" = "true" -a -f $ADDON_DIR/bin/mediasrv ]; then
|
||||
logger -t Sundtek "### Checking for new Sundtek binary installer ###"
|
||||
touch $ADDON_HOME/driver-version.txt
|
||||
wget -O /tmp/sundtek-driver-version.txt http://sundtek.de/media/latest.phtml
|
||||
md5_1=$(md5sum -b /tmp/sundtek-driver-version.txt | awk '{print $1}')
|
||||
md5_2=$(md5sum -b $ADDON_HOME/driver-version.txt | awk '{print $1}')
|
||||
if [ "$md5_1" != "$md5_2" ]; then
|
||||
logger -t Sundtek "### Updating Sundtek binary installer ###"
|
||||
rm -f $ADDON_DIR/bin/mediasrv
|
||||
fi
|
||||
|
||||
rm -f /tmp/sundtek-driver-version.txt
|
||||
fi
|
||||
|
||||
if [ ! -f $ADDON_DIR/bin/mediasrv ]; then
|
||||
# remove renamed addon if exist
|
||||
rm -fr "$HOME/.xbmc/addons/driver.dvb.sundtek"
|
||||
rm -fr "$HOME/userdata/addon_data/driver.dvb.sundtek"
|
||||
|
||||
logger -t Sundtek "### Downloading installer ###"
|
||||
cd $ADDON_DIR
|
||||
mkdir -p bin lib tmp
|
||||
cd tmp/
|
||||
|
||||
ARCH=$(sed -n 's|.*\.\([^-]*\)-.*|\1|p' /etc/release | tr -d '\n')
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/64bit/installer.tar.gz"
|
||||
elif [ "$ARCH" = "i386" ]; then
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/32bit/installer.tar.gz"
|
||||
elif [ "$ARCH" = "arm" ]; then
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz"
|
||||
|
||||
# enable HW PID filter on RPi by default
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $ADDON_DIR/config/sundtek.conf
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $ADDON_HOME/sundtek.conf
|
||||
sed -i 's|.*id="ENABLE_HW_PID_FILTER".*|<setting id="ENABLE_HW_PID_FILTER" value="true" />|' $ADDON_DIR/settings-default.xml
|
||||
sed -i 's|.*id="ENABLE_HW_PID_FILTER".*|<setting id="ENABLE_HW_PID_FILTER" value="true" />|' $ADDON_SETTINGS
|
||||
else
|
||||
logger -t Sundtek "### Unsupported architecture ###"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget -O installer.tar.gz $INSTALLER_URL
|
||||
wget -O ../driver-version.txt http://sundtek.de/media/latest.phtml
|
||||
logger -t Sundtek "### Extracting installer ###"
|
||||
tar -xzf installer.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Installer damaged ###"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cp -Pa opt/bin/* ../bin/
|
||||
cp -Pa opt/lib/* ../lib/
|
||||
cp ../driver-version.txt $ADDON_HOME/
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
logger -t Sundtek "### Installer finished ###"
|
||||
|
||||
cat "$ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
|
||||
. /var/config/sundtek-addon.conf
|
||||
fi
|
||||
|
||||
if [ ! -f $ADDON_HOME/driver-version.txt ]; then
|
||||
cp $ADDON_DIR/driver-version.txt $ADDON_HOME/
|
||||
fi
|
||||
|
||||
# enable to install same addon package version again
|
||||
#rm -f /storage/.xbmc/addons/packages/driver.dvb.sundtek*
|
||||
|
||||
# add alias for /opt/bin/mediaclient
|
||||
alias_set="$(grep libmediaclient.so /storage/.profile 2>/dev/null)"
|
||||
if [ -z "$alias_set" ]; then
|
||||
echo "" >>/storage/.profile
|
||||
echo "[ -f /storage/.xbmc/addons/driver.dvb.sundtek-mediatv/lib/libmediaclient.so ] && export LD_PRELOAD=/storage/.xbmc/addons/driver.dvb.sundtek-mediatv/lib/libmediaclient.so" >>/storage/.profile
|
||||
echo "" >>/storage/.profile
|
||||
else
|
||||
# fix name
|
||||
sed -i 's|/driver.dvb.sundtek/|/driver.dvb.sundtek-mediatv/|g' /storage/.profile
|
||||
fi
|
||||
|
||||
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so
|
||||
|
||||
if [ "$ANALOG_TV" = "true" -a ! -f "$ADDON_DIR/bin/plugins/lib/libavcodec.so.54.12.100" ]; then
|
||||
logger -t Sundtek "### Downloading missing ffmpeg libraries ###"
|
||||
cd $ADDON_DIR/bin
|
||||
mkdir -p plugins/
|
||||
cd plugins/
|
||||
|
||||
ARCH=$(sed -n 's|.*\.\([^-]*\)-.*|\1|p' /etc/release | tr -d '\n')
|
||||
wget -O sundtek-ffmpeg-analog_tv-lib.tgz http://dl.dropbox.com/u/8224157/public/sundtek/sundtek-ffmpeg-analog_tv-lib-$ARCH.tgz
|
||||
|
||||
logger -t Sundtek "### Extracting ffmpeg libraries ###"
|
||||
tar -xzf sundtek-ffmpeg-analog_tv-lib.tgz
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Ffmpeg library archive damaged ###"
|
||||
rm -f sundtek-ffmpeg-analog_tv-lib.tgz
|
||||
exit 2
|
||||
fi
|
||||
|
||||
rm -f sundtek-ffmpeg-analog_tv-lib.tgz
|
||||
fi
|
||||
|
||||
if [ -z "$(pidof mediasrv)" ]; then
|
||||
rm -f /var/log/mediasrv.log
|
||||
rm -f /var/log/mediaclient.log
|
||||
rm -f $SUNDTEK_READY
|
||||
rm -f /tmp/sundtek.conf
|
||||
|
||||
ln -sf $ADDON_HOME/sundtek.conf /tmp/sundtek.conf
|
||||
mediasrv $SUNDTEK_ARG
|
||||
SUNDTEK_CONF_TMP=/tmp/sundtek.conf
|
||||
cp $ADDON_HOME/sundtek.conf $SUNDTEK_CONF_TMP
|
||||
|
||||
if [ -n "$NETWORK_TUNER_IP" ]; then
|
||||
logger -t Sundtek "### Trying to connect Sundtek device $NETWORK_TUNER_IP ###"
|
||||
mediaclient --mount=$NETWORK_TUNER_IP
|
||||
[ -z "$LOWEST_ADAPTER_NUM" ] && LOWEST_ADAPTER_NUM=0
|
||||
sed -i "s|^first_adapter=.*|first_adapter=$LOWEST_ADAPTER_NUM|g" $SUNDTEK_CONF_TMP
|
||||
|
||||
# enable HW PID filter
|
||||
if [ "$ENABLE_HW_PID_FILTER" = "true" ]; then
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
logger -t Sundtek "### Trying to attach Sundtek device ###"
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
# wait for device to get attached or connected
|
||||
cnt=0
|
||||
while [ 1 ]; do
|
||||
if [ -n "$NETWORK_TUNER_IP" -a -e /dev/dvb/adapter*/frontend* ]; then
|
||||
sh $ADDON_DIR/bin/device-attached.sh
|
||||
fi
|
||||
# enable IR receiver
|
||||
if [ "$ENABLE_IR_RECEIVER" = "true" ]; then
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=0|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=1|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ -f $SUNDTEK_READY ]; then
|
||||
rm -f $SUNDTEK_READY
|
||||
break
|
||||
elif [ "$cnt" = "$ADAPTER_WAIT_TIME" ]; then
|
||||
logger -t Sundtek "### No Sundtek device attached or connected ###"
|
||||
return
|
||||
fi
|
||||
let cnt=cnt+1
|
||||
usleep 500000
|
||||
done
|
||||
if [ "$ALLOW_NET_USE" = "true" ]; then
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
[ "$DEVICE1_IP" = "0.0.0.0" ] && DEVICE1_IP=""
|
||||
[ "$DEVICE2_IP" = "0.0.0.0" ] && DEVICE2_IP=""
|
||||
[ "$DEVICE3_IP" = "0.0.0.0" ] && DEVICE3_IP=""
|
||||
[ "$DEVICE4_IP" = "0.0.0.0" ] && DEVICE4_IP=""
|
||||
[ "$DEVICE5_IP" = "0.0.0.0" ] && DEVICE5_IP=""
|
||||
DEVICE1_NUM=$(net_tuner_num_fix $DEVICE1_NUM)
|
||||
DEVICE2_NUM=$(net_tuner_num_fix $DEVICE2_NUM)
|
||||
DEVICE3_NUM=$(net_tuner_num_fix $DEVICE3_NUM)
|
||||
DEVICE4_NUM=$(net_tuner_num_fix $DEVICE4_NUM)
|
||||
DEVICE5_NUM=$(net_tuner_num_fix $DEVICE5_NUM)
|
||||
|
||||
if [ "$USE_NET_TUNERS" = "true" -a -n "$DEVICE1_IP" ]; then
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
# add entries
|
||||
echo -e "\n[NETWORK]" >>$SUNDTEK_CONF_TMP
|
||||
for dev in $(seq 0 $DEVICE1_NUM); do
|
||||
echo "device=$DEVICE1_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE2_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE2_NUM); do
|
||||
echo "device=$DEVICE2_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE3_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE3_NUM); do
|
||||
echo "device=$DEVICE3_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE4_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE4_NUM); do
|
||||
echo "device=$DEVICE4_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE5_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE5_NUM); do
|
||||
echo "device=$DEVICE5_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_TUNER_TYPES" = "true" ]; then
|
||||
# get tuner serial numbers
|
||||
SERIALS=$(cat /var/config/sundtek-addon.conf | sed -n 's|^ATTACHED_TUNER_\(.*\)_DVBMODE=.*|\1|gp' | sort | uniq)
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
for SERIAL in ${SERIALS[@]}; do
|
||||
DVBMODE=$(eval echo \$ATTACHED_TUNER_${SERIAL}_DVBMODE)
|
||||
IRPROT=$(eval echo \$ATTACHED_TUNER_${SERIAL}_IRPROT)
|
||||
KEYMAP=$(eval echo \$ATTACHED_TUNER_${SERIAL}_KEYMAP)
|
||||
|
||||
if [ "$DVBMODE" = "DVB-T" ]; then
|
||||
# only set DVB-T because default is DVB-C (and DVB-S is not set either)
|
||||
DVBMODE="DVBT"
|
||||
else
|
||||
DVBMODE=""
|
||||
fi
|
||||
|
||||
[ "$IRPROT" = "NEC" -o "$IRPROT" = "auto" ] && IRPROT=""
|
||||
|
||||
[ ! -f $KEYMAP ] && KEYMAP=""
|
||||
|
||||
# remove setttings for this tuner
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^ir_protocol=|^rcmap=|^initial_dvb_mode=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types
|
||||
mv ${SUNDTEK_CONF_TMP}-types $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
|
||||
ADDNEW=true
|
||||
if [ -n "$DVBMODE" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "initial_dvb_mode=$DVBMODE" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$IRPROT" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "ir_protocol=$IRPROT" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "rcmap=$KEYMAP" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
|
||||
md5_1=$(md5sum -b $SUNDTEK_CONF_TMP | awk '{print $1}')
|
||||
md5_2=$(md5sum -b $ADDON_HOME/sundtek.conf | awk '{print $1}')
|
||||
if [ "$md5_1" != "$md5_2" ]; then
|
||||
# file changed - copy to addon home
|
||||
cp $SUNDTEK_CONF_TMP $ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
|
||||
mediasrv --wait-for-devices -p $ADDON_DIR/bin -c $ADDON_HOME/sundtek.conf -d
|
||||
|
||||
# wait few seconds
|
||||
[ -z "$SETTLE_TIME" ] && SETTLE_TIME=0
|
||||
SETTLE_TIME=$(( $SETTLE_TIME *1 ))
|
||||
if [ $SETTLE_TIME -gt 0 ]; then
|
||||
logger -t Sundtek "### Settle for $SETTLE_TIME sec ###"
|
||||
sleep $SETTLE_TIME
|
||||
fi
|
||||
|
||||
if [ "$ANALOG_TV" = "true" ]; then
|
||||
logger -t Sundtek "### Switching to analog TV mode ###"
|
||||
#rm -fr /dev/dvb/
|
||||
mediaclient --disable-dvb=/dev/dvb/adapter0
|
||||
fi
|
||||
|
||||
if [ "$RUN_USER_SCRIPT" = "true" -a -f "$ADDON_HOME/userscript.sh" ]; then
|
||||
logger -t Sundtek "### Running user script $ADDON_HOME/userscript.sh ###"
|
||||
cat $ADDON_HOME/userscript.sh | dos2unix >/var/run/sundtek-userscript.sh
|
||||
sh /var/run/sundtek-userscript.sh
|
||||
fi
|
||||
(
|
||||
# save adapter serial number in background
|
||||
sleep 4
|
||||
sleep 5
|
||||
serial_number_old=$(cat $ADDON_HOME/adapters.txt 2>/dev/null)
|
||||
serial_number_new=$(mediaclient -e | awk '/device / {print $0} /ID:/ {print $2}')
|
||||
if [ "$serial_number_old" != "$serial_number_new" ]; then
|
||||
@@ -82,4 +336,4 @@ if [ -z "$(pidof mediasrv)" ]; then
|
||||
)&
|
||||
fi
|
||||
|
||||
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so:$LD_PRELOAD
|
||||
logger -t Sundtek "### Sundtek ready ###"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -21,3 +21,18 @@
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.sundtek-mediatv')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
__mediaclient__ = xbmc.translatePath(os.path.join(__cwd__, 'bin', 'mediaclient'))
|
||||
__ld_preload__ = xbmc.translatePath(os.path.join(__cwd__, 'lib', 'libmediaclient.so'))
|
||||
__mediaclient_e__ = 'LD_PRELOAD=' + __ld_preload__ + ' ' + __mediaclient__ + ' -e'
|
||||
|
||||
if __name__ == "__main__" and len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_sundtek_tuners
|
||||
refresh_sundtek_tuners(__settings_xml__, __mediaclient_e__)
|
||||
__settings__.openSettings()
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<string id="1000">General</string>
|
||||
<string id="1011">Auto update binary driver</string>
|
||||
<string id="1012">Enable analog TV</string>
|
||||
<string id="1014">Extra delay [sec]</string>
|
||||
<string id="1015">Run user script</string>
|
||||
<string id="1030">Enable hardware PID filter</string>
|
||||
<string id="1035">Enable IR receiver</string>
|
||||
<string id="1040">Lowest adapter number (/dev/dvb/adapterX/)</string>
|
||||
|
||||
<string id="2000">Networking</string>
|
||||
<string id="2005">Share local tuner over network</string>
|
||||
<string id="2010">Use network shared tuners</string>
|
||||
<string id="2020">Server 1 IP address</string>
|
||||
<string id="2021"> # of tuners</string>
|
||||
<string id="2030">Server 2 IP address</string>
|
||||
<string id="2031"> # of tuners</string>
|
||||
<string id="2040">Server 3 IP address</string>
|
||||
<string id="2041"> # of tuners</string>
|
||||
<string id="2050">Server 4 IP address</string>
|
||||
<string id="2051"> # of tuners</string>
|
||||
<string id="2060">Server 5 IP address</string>
|
||||
<string id="2061"> # of tuners</string>
|
||||
|
||||
<string id="9000">Tuner settings</string>
|
||||
<string id="9005">Enable modifying settings</string>
|
||||
<string id="9010">Refresh tuners... (press me)</string>
|
||||
<string id="9020"> IR protocol</string>
|
||||
<string id="9030"> keymap filename</string>
|
||||
</strings>
|
||||
@@ -0,0 +1,272 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import xmlpp
|
||||
from xml.dom import minidom
|
||||
|
||||
__sundtek_userspace__ = '/storage/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv/'
|
||||
|
||||
######################################################################################################
|
||||
# backup setting.xml file only if backup doesn't exist
|
||||
def settings_backup(settings_xml):
|
||||
try:
|
||||
with open(settings_xml + '_orig') as f: pass
|
||||
except IOError as e:
|
||||
shutil.copyfile(settings_xml, settings_xml + '_orig')
|
||||
|
||||
######################################################################################################
|
||||
# restore setting.xml file from backup
|
||||
def settings_restore(settings_xml):
|
||||
try:
|
||||
shutil.copyfile(settings_xml + '_orig', settings_xml)
|
||||
except IOError as e:
|
||||
print 'Error restoring file:', settings_xml
|
||||
|
||||
######################################################################################################
|
||||
# get hdhomerun supported devices on a system (only name like 101ADD2B-0)
|
||||
def get_devices_hdhomerun(hdhomerun_log):
|
||||
tuners = []
|
||||
try:
|
||||
for line in open(hdhomerun_log, 'r'):
|
||||
line = line.strip()
|
||||
if line.startswith('Registered tuner'):
|
||||
name = line.split(':');
|
||||
name = name[2].strip()
|
||||
tuners.append(name)
|
||||
except IOError:
|
||||
print 'Error reading hdhomerun log file', hdhomerun_log
|
||||
return tuners
|
||||
|
||||
"""
|
||||
root ~ # grep "Registered tuner" /var/log/dvbhdhomerun.log
|
||||
Registered tuner, id from kernel: 0 name: 101ADD2B-0
|
||||
Registered tuner, id from kernel: 1 name: 101ADD2B-1
|
||||
Registered tuner, id from kernel: 2 name: 1031D75A-0
|
||||
Registered tuner, id from kernel: 3 name: 1031D75A-1
|
||||
"""
|
||||
|
||||
######################################################################################################
|
||||
# get sundtek supported devices on a system (name, serial number, type)
|
||||
def get_devices_sundtek(mediaclient_e):
|
||||
tuners = []
|
||||
try:
|
||||
p = os.popen(mediaclient_e, "r")
|
||||
while 1:
|
||||
line = p.readline()
|
||||
if not line:
|
||||
break
|
||||
else:
|
||||
str = line.strip()
|
||||
if str.startswith('device '):
|
||||
name = str[str.find("[")+1:str.find("]")]
|
||||
tuners.append([name, 0, 's'])
|
||||
|
||||
if str.startswith('[SERIAL]:'):
|
||||
line = p.readline()
|
||||
str = line.strip()
|
||||
if str.startswith('ID:'):
|
||||
id = str.split(':');
|
||||
id = id[1].strip()
|
||||
tuners[len(tuners)-1] = [name, id, 's']
|
||||
|
||||
if str.startswith('[DVB-C]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
elif str.startswith('[DVB-T2]:'):
|
||||
tuners[len(tuners)-1] = [name, id, 'c']
|
||||
except IOError:
|
||||
print 'Error getting sundtek tuners info'
|
||||
return tuners
|
||||
|
||||
"""
|
||||
root ~ # mediaclient -e
|
||||
**** List of Media Hardware Devices ****
|
||||
device 0: [Sundtek MediaTV Pro (USB 2.0)] DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
|
||||
[BUS]:
|
||||
ID: 1-7
|
||||
[SERIAL]:
|
||||
ID: U110763295205
|
||||
[DVB-C]:
|
||||
FRONTEND: /dev/dvb/adapter0/frontend0
|
||||
DVR: /dev/dvb/adapter0/dvr0
|
||||
DMX: /dev/dvb/adapter0/demux0
|
||||
[DVB-T]:
|
||||
FRONTEND: /dev/dvb/adapter0/frontend0
|
||||
DVR: /dev/dvb/adapter0/dvr0
|
||||
DMX: /dev/dvb/adapter0/demux0
|
||||
[ANALOG-TV]:
|
||||
VIDEO0: /dev/video0
|
||||
VBI0: /dev/vbi0
|
||||
[FM-RADIO]:
|
||||
RADIO0: /dev/radio0
|
||||
RDS: /dev/rds0
|
||||
[REMOTECONTROL]:
|
||||
INPUT0: /dev/mediainput0
|
||||
[OSS]:
|
||||
OSS0: /dev/dsp0
|
||||
"""
|
||||
|
||||
######################################################################################################
|
||||
# parse settings.xml file
|
||||
def parse_settings(settings_xml):
|
||||
try:
|
||||
xmldoc = minidom.parse(settings_xml)
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
return xmldoc
|
||||
except Exception as inst:
|
||||
print 'Error parse settings file', settings_xml
|
||||
return None
|
||||
|
||||
######################################################################################################
|
||||
# remove all nodes with id started with ATTACHED_TUNER_
|
||||
def remove_old_tuners(xmldoc):
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
for node_cat in category:
|
||||
setting = node_cat.getElementsByTagName('setting')
|
||||
for node_set in setting :
|
||||
if 'id' in node_set.attributes.keys() and not node_set.getAttribute('id').find('ATTACHED_TUNER_'):
|
||||
node_set.parentNode.removeChild(node_set)
|
||||
|
||||
######################################################################################################
|
||||
# add new hdhomerun tuners
|
||||
def add_hdhomerun(xmldoc, node_cat, tuners):
|
||||
for ix, tuner in enumerate(tuners):
|
||||
tuner_var = tuner.replace('-', '_')
|
||||
|
||||
node1 = xmldoc.createElement("setting")
|
||||
node1.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_DVBMODE')
|
||||
node1.setAttribute("label", tuner)
|
||||
node1.setAttribute("type", 'labelenum')
|
||||
node1.setAttribute("default", 'auto')
|
||||
node1.setAttribute("values", 'auto|ATSC|DVB-C|DVB-T')
|
||||
node_cat.appendChild(node1)
|
||||
|
||||
node2 = xmldoc.createElement("setting")
|
||||
node2.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_FULLNAME')
|
||||
node2.setAttribute("label", '9020')
|
||||
node2.setAttribute("type", 'bool')
|
||||
node2.setAttribute("default", 'false')
|
||||
node_cat.appendChild(node2)
|
||||
|
||||
node3 = xmldoc.createElement("setting")
|
||||
node3.setAttribute("id", 'ATTACHED_TUNER_' + tuner_var + '_DISABLE')
|
||||
node3.setAttribute("label", '9030')
|
||||
node3.setAttribute("type", 'bool')
|
||||
node3.setAttribute("default", 'false')
|
||||
node_cat.appendChild(node3)
|
||||
|
||||
# for tuner
|
||||
|
||||
######################################################################################################
|
||||
# add new sundtek tuners
|
||||
def add_sundtek(xmldoc, node_cat, tuners):
|
||||
for ix, tuner in enumerate(tuners):
|
||||
tuner_name = tuner[0]
|
||||
tuner_serial = tuner[1]
|
||||
tuner_type = tuner[2]
|
||||
|
||||
node1 = xmldoc.createElement("setting")
|
||||
node1.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_DVBMODE')
|
||||
node1.setAttribute("label", tuner_name + ", " + tuner_serial)
|
||||
node1.setAttribute("type", 'labelenum')
|
||||
|
||||
if (tuner_type == 's'):
|
||||
node1.setAttribute("default", 'DVB-S')
|
||||
node1.setAttribute("values", 'DVB-S')
|
||||
else:
|
||||
node1.setAttribute("default", 'DVB-C')
|
||||
node1.setAttribute("values", 'DVB-C|DVB-T')
|
||||
|
||||
node_cat.appendChild(node1)
|
||||
|
||||
node2 = xmldoc.createElement("setting")
|
||||
node2.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_IRPROT')
|
||||
node2.setAttribute("label", '9020')
|
||||
node2.setAttribute("type", 'labelenum')
|
||||
node2.setAttribute("default", 'auto')
|
||||
node2.setAttribute("values", 'auto|RC5|NEC|RC6')
|
||||
node_cat.appendChild(node2)
|
||||
|
||||
node3 = xmldoc.createElement("setting")
|
||||
node3.setAttribute("id", 'ATTACHED_TUNER_' + tuner_serial + '_KEYMAP')
|
||||
node3.setAttribute("label", '9030')
|
||||
node3.setAttribute("type", 'file')
|
||||
node3.setAttribute("mask", '*.map')
|
||||
node3.setAttribute("default", __sundtek_userspace__)
|
||||
node_cat.appendChild(node3)
|
||||
|
||||
# for tuner
|
||||
|
||||
######################################################################################################
|
||||
# add new ATTACHED_TUNER_ nodes for available tuners
|
||||
def add_new_tuners(xmldoc, tuners, which):
|
||||
category = xmldoc.getElementsByTagName('category')
|
||||
for node_cat in category:
|
||||
setting = node_cat.getElementsByTagName('setting')
|
||||
for node_set in setting :
|
||||
if 'label' in node_set.attributes.keys() and '9010' in node_set.getAttribute('label'):
|
||||
if which == 'hdhomerun':
|
||||
add_hdhomerun(xmldoc, node_cat, tuners)
|
||||
break
|
||||
elif which == 'sundtek':
|
||||
add_sundtek(xmldoc, node_cat, tuners)
|
||||
break
|
||||
|
||||
|
||||
######################################################################################################
|
||||
# save settings.xml file back
|
||||
def save_settings(settings_xml, xmldoc):
|
||||
try:
|
||||
outputfile = open(settings_xml, 'w')
|
||||
xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2)
|
||||
outputfile.close()
|
||||
except IOError:
|
||||
print 'Error saving file:', settings_xml
|
||||
settings_restore(settings_xml)
|
||||
|
||||
######################################################################################################
|
||||
# refresh hdhomerun tuners in settings.xml file
|
||||
def refresh_hdhomerun_tuners(settings_xml, hdhomerun_log):
|
||||
settings_backup(settings_xml)
|
||||
tuners = get_devices_hdhomerun(hdhomerun_log)
|
||||
xmldoc = parse_settings(settings_xml)
|
||||
if xmldoc == None:
|
||||
print 'No hdhomerun tuners found'
|
||||
else:
|
||||
remove_old_tuners(xmldoc)
|
||||
add_new_tuners(xmldoc, tuners, 'hdhomerun')
|
||||
save_settings(settings_xml, xmldoc)
|
||||
|
||||
######################################################################################################
|
||||
# refresh sundtek tuners in settings.xml file
|
||||
def refresh_sundtek_tuners(settings_xml, mediaclient_e):
|
||||
settings_backup(settings_xml)
|
||||
tuners = get_devices_sundtek(mediaclient_e)
|
||||
xmldoc = parse_settings(settings_xml)
|
||||
if xmldoc == None:
|
||||
print 'No sundtek tuners found'
|
||||
else:
|
||||
remove_old_tuners(xmldoc)
|
||||
add_new_tuners(xmldoc, tuners, 'sundtek')
|
||||
save_settings(settings_xml, xmldoc)
|
||||
@@ -0,0 +1,161 @@
|
||||
"""Pretty print an XML document.
|
||||
|
||||
LICENCE:
|
||||
Copyright (c) 2008, Fredrik Ekholdt
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Fredrik Ekholdt nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE."""
|
||||
|
||||
import sys as _sys
|
||||
import re as _re
|
||||
|
||||
def _usage(this_file):
|
||||
return """SYNOPSIS: pretty print an XML document
|
||||
USAGE: python %s <filename> \n""" % this_file
|
||||
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
if line.strip():
|
||||
start = ""
|
||||
number_chars = 0
|
||||
for l in range(indent_level):
|
||||
start = start + " "
|
||||
number_chars = number_chars + 1
|
||||
try:
|
||||
elem_start = _re.findall("(\<\W{0,1}\w+:\w+) ?", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/]*\>)", line)[0]
|
||||
#should not have *
|
||||
attrs = _re.findall("(\S*?\=\".*?\")", line)
|
||||
output.write(start + elem_start)
|
||||
number_chars = len(start + elem_start)
|
||||
for attr in attrs:
|
||||
if (attrs.index(attr) + 1) == len(attrs):
|
||||
number_chars = number_chars + len(elem_finished)
|
||||
if (number_chars + len(attr) + 1) > width:
|
||||
output.write("\n")
|
||||
for i in range(len(start + elem_start) + 1):
|
||||
output.write(" ")
|
||||
number_chars = len(start + elem_start) + 1
|
||||
else:
|
||||
output.write(" ")
|
||||
number_chars = number_chars + 1
|
||||
output.write(attr)
|
||||
number_chars = number_chars + len(attr)
|
||||
output.write(elem_finished + "\n")
|
||||
except IndexError:
|
||||
#give up pretty print this line
|
||||
output.write(start + line + "\n")
|
||||
|
||||
|
||||
def _pprint_elem_content(indent_level, line, output=_sys.stdout):
|
||||
if line.strip():
|
||||
for l in range(indent_level):
|
||||
output.write(" ")
|
||||
output.write(line + "\n")
|
||||
|
||||
def _get_next_elem(data):
|
||||
start_pos = data.find("<")
|
||||
end_pos = data.find(">") + 1
|
||||
retval = data[start_pos:end_pos]
|
||||
stopper = retval.rfind("/")
|
||||
if stopper < retval.rfind("\""):
|
||||
stopper = -1
|
||||
single = (stopper > -1 and ((retval.find(">") - stopper) < (stopper - retval.find("<"))))
|
||||
|
||||
ignore_excl = retval.find("<!") > -1
|
||||
ignore_question = retval.find("<?") > -1
|
||||
|
||||
if ignore_excl:
|
||||
cdata = retval.find("<![CDATA[") > -1
|
||||
if cdata:
|
||||
end_pos = data.find("]]>")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("]]>")
|
||||
|
||||
elif ignore_question:
|
||||
end_pos = data.find("?>") + len("?>")
|
||||
ignore = ignore_excl or ignore_question
|
||||
|
||||
no_indent = ignore or single
|
||||
|
||||
#print retval, end_pos, start_pos, stopper > -1, no_indent
|
||||
return start_pos, \
|
||||
end_pos, \
|
||||
stopper > -1, \
|
||||
no_indent
|
||||
|
||||
def get_pprint(xml, indent=4, width=80):
|
||||
"""Returns the pretty printed xml """
|
||||
class out:
|
||||
output = ""
|
||||
|
||||
def write(self, string):
|
||||
self.output += string
|
||||
out = out()
|
||||
pprint(xml, output=out, indent=indent, width=width)
|
||||
|
||||
return out.output
|
||||
|
||||
|
||||
def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
"""Pretty print xml.
|
||||
Use output to select output stream. Default is sys.stdout
|
||||
Use indent to select indentation level. Default is 4 """
|
||||
data = xml
|
||||
indent_level = 0
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
while ((start_pos > -1 and end_pos > -1)):
|
||||
_pprint_elem_content(indent_level, data[:start_pos].strip(),
|
||||
output=output)
|
||||
data = data[start_pos:]
|
||||
if is_stop and not no_indent:
|
||||
indent_level = indent_level - indent
|
||||
_pprint_line(indent_level,
|
||||
data[:end_pos - start_pos],
|
||||
width=width,
|
||||
output=output)
|
||||
data = data[end_pos - start_pos:]
|
||||
if not is_stop and not no_indent :
|
||||
indent_level = indent_level + indent
|
||||
|
||||
if not data:
|
||||
break
|
||||
else:
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "-h" in _sys.argv or "--help" in _sys.argv:
|
||||
_sys.stderr.write(_usage(_sys.argv[0]))
|
||||
_sys.exit(1)
|
||||
if len(_sys.argv) < 2:
|
||||
_sys.stderr.write(_usage(_sys.argv[0]))
|
||||
_sys.exit(1)
|
||||
else:
|
||||
filename = _sys.argv[1]
|
||||
fh = open(filename)
|
||||
|
||||
pprint(fh.read(), output=_sys.stdout, indent=4, width=80)
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="1000" >
|
||||
<setting type="sep" />
|
||||
<setting id="AUTO_UPDATE" type="bool" label="1011" default="false" />
|
||||
<setting id="ANALOG_TV" type="bool" label="1012" default="false" enable="false" />
|
||||
<setting id="SETTLE_TIME" type="number" label="1014" default="0" />
|
||||
<setting id="RUN_USER_SCRIPT" type="bool" label="1015" default="false" />
|
||||
<setting id="ENABLE_HW_PID_FILTER" type="bool" label="1030" default="false" />
|
||||
<setting id="ENABLE_IR_RECEIVER" type="bool" label="1035" default="false" />
|
||||
<setting id="LOWEST_ADAPTER_NUM" type="number" label="1040" default="0" />
|
||||
</category>
|
||||
<category label="2000" >
|
||||
<setting type="sep" />
|
||||
<setting id="ALLOW_NET_USE" type="bool" label="2005" default="false" />
|
||||
<setting id="USE_NET_TUNERS" type="bool" label="2010" default="false" />
|
||||
<setting id="DEVICE1_IP" type="ipaddress" label="2020" default="" visible="eq(-1,true)" />
|
||||
<setting id="DEVICE1_NUM" type="labelenum" label="2021" default="1" values="1|5|4|3|2" visible="eq(-2,true)" />
|
||||
<setting id="DEVICE2_IP" type="ipaddress" label="2030" default="" visible="eq(-3,true)" />
|
||||
<setting id="DEVICE2_NUM" type="labelenum" label="2031" default="1" values="1|5|4|3|2" visible="eq(-4,true)" />
|
||||
<setting id="DEVICE3_IP" type="ipaddress" label="2040" default="" visible="eq(-5,true)" />
|
||||
<setting id="DEVICE3_NUM" type="labelenum" label="2041" default="1" values="1|5|4|3|2" visible="eq(-6,true)" />
|
||||
<setting id="DEVICE4_IP" type="ipaddress" label="2050" default="" visible="eq(-7,true)" />
|
||||
<setting id="DEVICE4_NUM" type="labelenum" label="2051" default="1" values="1|5|4|3|2" visible="eq(-8,true)" />
|
||||
<setting id="DEVICE5_IP" type="ipaddress" label="2060" default="" visible="eq(-9,true)" />
|
||||
<setting id="DEVICE5_NUM" type="labelenum" label="2061" default="1" values="1|5|4|3|2" visible="eq(-10,true)" />
|
||||
</category>
|
||||
<category label="9000">
|
||||
<setting type="sep" />
|
||||
<setting id="ENABLE_TUNER_TYPES" type="bool" label="9005" default="true" />
|
||||
<setting label="9010" option="close" type="action" action="RunScript($ID, refresh_tuners)" />
|
||||
</category>
|
||||
</settings>
|
||||
10
packages/addons/driver/sundtek-mediatv/source/sleep.d/sundtek-mediatv.power
Executable file → Normal file
@@ -23,22 +23,22 @@
|
||||
. /etc/profile
|
||||
|
||||
LOCKDIR="/var/lock/"
|
||||
LOCKFILE="sundtek-mediatv"
|
||||
LOCKFILE="$LOCKDIR/sundtek-mediatv"
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ -n "$(pidof mediasrv)" ]; then
|
||||
progress "Shutting down Sundtek MediaTV DVB driver for suspending..."
|
||||
progress "Shutting down Sundtek DVB driver for suspending..."
|
||||
mkdir -p "$LOCKDIR"
|
||||
touch "$LOCKDIR/$LOCKFILE"
|
||||
touch "$LOCKFILE"
|
||||
mediaclient --shutdown
|
||||
fi
|
||||
;;
|
||||
|
||||
thaw|resume)
|
||||
if [ -f "$LOCKDIR/$LOCKFILE" ]; then
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
# driver started within Tvheadend/VDR
|
||||
rm -rf "$LOCKDIR/$LOCKFILE"
|
||||
rm -f "$LOCKFILE"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
3.0.4
|
||||
- update to makemkv-1.8.0
|
||||
|
||||
3.0.3
|
||||
- update to makemkv-1.7.10
|
||||
|
||||
3.0.2
|
||||
- update to makemkv-1.7.9
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="makemkv"
|
||||
PKG_VERSION="1.7.9"
|
||||
PKG_REV="2"
|
||||
PKG_VERSION="1.8.0"
|
||||
PKG_REV="4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.makemkv.com/forum2/viewforum.php?f=3"
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
diff -Naur makemkv-1.6.10/lib/makefile.linux makemkv-1.6.10.patch/lib/makefile.linux
|
||||
--- makemkv-1.6.10/lib/makefile.linux 2011-05-29 23:17:48.000000000 +0200
|
||||
+++ makemkv-1.6.10.patch/lib/makefile.linux 2011-05-30 15:29:15.510417904 +0200
|
||||
@@ -1,11 +1,11 @@
|
||||
diff --git a/lib/makefile.linux b/lib/makefile.linux
|
||||
index b3b5afa..07322ad 100644
|
||||
--- a/lib/makefile.linux
|
||||
+++ b/lib/makefile.linux
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
include makefile.common
|
||||
|
||||
-GCC=gcc
|
||||
-RCC=rcc
|
||||
+GCC:=gcc
|
||||
+RCC:=rcc
|
||||
MOC=$(strip $(shell which moc-qt4))
|
||||
ifeq ($(MOC),)
|
||||
-MOC=moc
|
||||
@@ -16,8 +15,8 @@ diff -Naur makemkv-1.6.10/lib/makefile.linux makemkv-1.6.10.patch/lib/makefile.l
|
||||
endif
|
||||
|
||||
CXXOPTS=-Os -D_GNU_SOURCE -D_linux_
|
||||
@@ -14,7 +14,7 @@
|
||||
BUILDINFO_BUILD_DATE=$(shell date)
|
||||
@@ -16,7 +16,7 @@ PREFIX=/usr
|
||||
LIBDIR=${PREFIX}/lib
|
||||
|
||||
|
||||
-all: out/libdriveio.so.0 out/libmakemkv.so.1 out/makemkv
|
||||
@@ -1,12 +0,0 @@
|
||||
3.0.1
|
||||
- bump addon version
|
||||
|
||||
2.1.3
|
||||
- updated to tcpdump-4.3.0
|
||||
- updated to libpcap-1.3.0
|
||||
|
||||
2.1.2
|
||||
- rebuild
|
||||
|
||||
2.1.1
|
||||
- initial addon based on tcpdump-4.1.1
|
||||
|
Before Width: | Height: | Size: 80 KiB |
@@ -1,5 +0,0 @@
|
||||
3.0.1
|
||||
- bump addon version
|
||||
|
||||
2.1.1
|
||||
- initial addon based on iperf-2.0.5
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,23 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
@@ -34,6 +34,7 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/Cheetah*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/pyOpenSSL*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/yenc*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/configobj*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/SABnzbd
|
||||
cp -PR $BUILD/SABnzbd-*/* $ADDON_BUILD/$PKG_ADDON_ID/SABnzbd
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
3.0.6
|
||||
- fix configobj error n startup
|
||||
|
||||
3.0.5
|
||||
- rebuild. configobj included
|
||||
|
||||
3.0.4
|
||||
- update to SickBeard-4e57625
|
||||
- update to CouchPotatoServer-a49a00a
|
||||
- fix keep awake option
|
||||
|
||||
3.0.3
|
||||
- update to SABnzbd-0.7.11
|
||||
- update to CouchPotatoServer-811f35b
|
||||
- update to SickBeard-6cb5e76
|
||||
- added option to restart the suite on suspend / resume
|
||||
|
||||
3.0.2
|
||||
- Fixed bug causing configobj to throw an exception with Couchpotato v2s config
|
||||
- corrected a bug causing most of the suite to crash on first launch in certain circumstances
|
||||
|
||||
@@ -10,4 +10,5 @@
|
||||
<setting id="COUCHPOTATO_LAUNCH" value="true" />
|
||||
<setting id="COUCHPOTATO_VERSION" value="1" />
|
||||
<setting id="HEADPHONES_LAUNCH" value="true" />
|
||||
<setting id="RESTART_ON_RESUME" value="false" />
|
||||
</settings>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="SABnzbd-Suite"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_REV="2"
|
||||
PKG_REV="6"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
|
||||
@@ -27,7 +27,7 @@ import signal
|
||||
import subprocess
|
||||
import urllib2
|
||||
import hashlib
|
||||
from configobj import ConfigObj
|
||||
import sys
|
||||
from xml.dom.minidom import parseString
|
||||
import logging
|
||||
import traceback
|
||||
@@ -195,6 +195,9 @@ except:
|
||||
|
||||
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
||||
os.environ['PYTHONPATH'] = str(os.environ.get('PYTHONPATH')) + ':' + pPylib
|
||||
sys.path.append(pPylib)
|
||||
|
||||
from configobj import ConfigObj
|
||||
|
||||
# SABnzbd start
|
||||
try:
|
||||
|
||||
@@ -28,7 +28,6 @@ import urllib2
|
||||
import socket
|
||||
import time
|
||||
import datetime
|
||||
from configobj import ConfigObj
|
||||
|
||||
__scriptname__ = "SABnzbd Suite"
|
||||
__author__ = "OpenELEC"
|
||||
@@ -51,6 +50,9 @@ subprocess.call(['python',__start__])
|
||||
# check for launching sabnzbd
|
||||
sabNzbdLaunch = (__settings__.getSetting('SABNZBD_LAUNCH').lower() == 'true')
|
||||
|
||||
sys.path.append(os.path.join(__cwd__, 'pylib'))
|
||||
from configobj import ConfigObj
|
||||
|
||||
if sabNzbdLaunch:
|
||||
# SABnzbd addresses and api key
|
||||
sabNzbdAddress = '127.0.0.1:8081'
|
||||
@@ -59,7 +61,7 @@ if sabNzbdLaunch:
|
||||
sabNzbdApiKey = sabConfiguration['misc']['api_key']
|
||||
sabNzbdUser = sabConfiguration['misc']['username']
|
||||
sabNzbdPass = sabConfiguration['misc']['password']
|
||||
sabNzbdQueue = 'http://' + sabNzbdAddress + '/sabnzbd/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdUser
|
||||
sabNzbdQueue = 'http://' + sabNzbdAddress + '/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdPass
|
||||
|
||||
# start checking SABnzbd for activity and prevent sleeping if necessary
|
||||
socket.setdefaulttimeout(timeout)
|
||||
@@ -83,29 +85,30 @@ while (not xbmc.abortRequested):
|
||||
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
|
||||
|
||||
# check if SABnzbd is downloading
|
||||
sabIsActive = False
|
||||
req = urllib2.Request(sabNzbdQueue)
|
||||
try: handle = urllib2.urlopen(req)
|
||||
except IOError, e:
|
||||
xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR)
|
||||
else:
|
||||
queue = handle.read()
|
||||
handle.close()
|
||||
sabIsActive = (queue.find('<status>Downloading</status>') >= 0)
|
||||
if shouldKeepAwake:
|
||||
sabIsActive = False
|
||||
req = urllib2.Request(sabNzbdQueue)
|
||||
try: handle = urllib2.urlopen(req)
|
||||
except IOError, e:
|
||||
xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR)
|
||||
else:
|
||||
queue = handle.read()
|
||||
handle.close()
|
||||
sabIsActive = (queue.find('<status>Downloading</status>') >= 0)
|
||||
|
||||
# reset idle timer when we're close to idle sleep/shutdown
|
||||
if (shouldKeepAwake and sabIsActive):
|
||||
response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('<li>','')
|
||||
shutdownTime = int(response) * 60
|
||||
idleTime = xbmc.getGlobalIdleTime()
|
||||
timeToShutdown = shutdownTime - idleTime
|
||||
# reset idle timer when we're close to idle sleep/shutdown
|
||||
if sabIsActive:
|
||||
response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('<li>','')
|
||||
shutdownTime = int(response) * 60
|
||||
idleTime = xbmc.getGlobalIdleTime()
|
||||
timeToShutdown = shutdownTime - idleTime
|
||||
|
||||
if (sabIsActive and timeToShutdown <= checkInterval - timeout):
|
||||
xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.')
|
||||
xbmc.executehttpapi("SendKey(0xF000)")
|
||||
if (timeToShutdown <= checkInterval - timeout):
|
||||
xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.')
|
||||
xbmc.executehttpapi("SendKey(0xF000)")
|
||||
|
||||
# calculate and set the time to wake up at (if any)
|
||||
if (wakePeriodically):
|
||||
if wakePeriodically:
|
||||
wakeHour = wakeHourIdx * 2 + 1
|
||||
timeOfDay = datetime.time(hour=wakeHour)
|
||||
now = datetime.datetime.now()
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
<string id="3021">Keep awake while downloading</string>
|
||||
<string id="3030">Wake up periodically</string>
|
||||
<string id="3031">Wake up at</string>
|
||||
<string id="3032">Restart on suspend / resume</string>
|
||||
|
||||
</strings>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<setting id="SABNZBD_WAKE_AT" type="enum" subsetting="true" enable="eq(-1,true)"
|
||||
label="3031" default="01"
|
||||
values="|01:00|03:00|05:00|07:00|09:00|11:00|13:00|15:00|17:00|19:00|21:00|23:00"/>
|
||||
<setting id="RESTART_ON_RESUME" type="bool" label="3032" default="false" />
|
||||
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -20,32 +20,32 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
. /etc/profile
|
||||
|
||||
VDR_DIR=$(basename $BUILD/vdr-[0-9]*)
|
||||
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.downloadmanager.SABnzbd-Suite"
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
RESTART_ON_RESUME=`grep RESTART_ON_RESUME $ADDON_SETTINGS | awk '{print $3}' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig:${PKG_CONFIG_SYSROOT_DIR}buildd/lib/pkgconfig"
|
||||
LOCKFILE="/var/lock/SABnzbd-Suite.sleep"
|
||||
|
||||
cd $PKG_BUILD
|
||||
if [ "$RESTART_ON_RESUME" == "true" ] ; then
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
if [ ! -z "`ps | grep -E 'python.*service.downloadmanager.SABnzbd-Suite' | awk '{print $1}'`" ] ; then
|
||||
progress "Shutting down SABnzbd-Suite for suspending..."
|
||||
SABnzbd-Suite.stop
|
||||
touch $LOCKFILE
|
||||
fi
|
||||
;;
|
||||
|
||||
./configure --enable-x11 \
|
||||
--enable-vdr \
|
||||
--enable-libxine \
|
||||
--disable-dbus-glib-1 \
|
||||
--cc=$CC \
|
||||
--cxx=$CXX \
|
||||
--add-cflags="$CFLAGS"
|
||||
|
||||
# mpg2c is running on host
|
||||
make mpg2c \
|
||||
CC="$HOST_CC" \
|
||||
CFLAGS="$HOST_CFLAGS" \
|
||||
LDFLAGS="$HOST_LDFLAGS" \
|
||||
VDRDIR="../$VDR_DIR" \
|
||||
LIBDIR="." \
|
||||
LOCALEDIR="./locale"
|
||||
|
||||
make VDRDIR="../$VDR_DIR" \
|
||||
LIBDIR="." \
|
||||
LDFLAGS="-lm" \
|
||||
LOCALEDIR="./locale"
|
||||
thaw|resume)
|
||||
progress "Restarting SABnzbd-Suite for wakeup..."
|
||||
if [ -f "$LOCKFILE" ] ; then
|
||||
rm -rf "$LOCKFILE"
|
||||
python $HOME/.xbmc/addons/service.downloadmanager.SABnzbd-Suite/bin/SABnzbd-Suite.py
|
||||
fi
|
||||
;;
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/daemon/transmission-daemon $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/daemon/transmission-remote $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
cp -R $PKG_BUILD/web/* $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
3.0.4
|
||||
- update to transmission-2.77
|
||||
|
||||
3.0.3
|
||||
- update to transmission-2.76
|
||||
- update libevent to libevent-2.0.21-stable
|
||||
|
||||