Compare commits
1620 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11f87f2b6d | ||
|
|
86de4151d2 | ||
|
|
d3cc65ce4e | ||
|
|
6593fc1d32 | ||
|
|
633a1e8bb1 | ||
|
|
6a058e69e7 | ||
|
|
e3c5156de9 | ||
|
|
8d379f7b5c | ||
|
|
45ed8456ee | ||
|
|
ef63d61f3d | ||
|
|
6b1ad9951f | ||
|
|
c2c692fe0a | ||
|
|
662299b324 | ||
|
|
25a8b53ff5 | ||
|
|
466b50bca6 | ||
|
|
1fac910c3e | ||
|
|
68e6f2616d | ||
|
|
d0d8529afa | ||
|
|
b36429879d | ||
|
|
c7bc2b78ac | ||
|
|
1afe08af08 | ||
|
|
52707267fc | ||
|
|
e507b2092b | ||
|
|
d23cb8571d | ||
|
|
b2e83ea1a6 | ||
|
|
3d6a9f4d57 | ||
|
|
86356ba4d2 | ||
|
|
801f9e8dc8 | ||
|
|
cbcedaf2bd | ||
|
|
5ada966010 | ||
|
|
587f0b8609 | ||
|
|
f46e3dcfc2 | ||
|
|
a0e7ddd632 | ||
|
|
3267c68c3b | ||
|
|
c829c94e54 | ||
|
|
39b96cc544 | ||
|
|
5a79b71e70 | ||
|
|
57b230e91d | ||
|
|
b7a2aca34e | ||
|
|
cbda2deda2 | ||
|
|
779e9c64c1 | ||
|
|
26d488a979 | ||
|
|
ef7d4a2b4b | ||
|
|
c6102d3b2a | ||
|
|
4d7d4cc109 | ||
|
|
f717624bfa | ||
|
|
2114a80dbb | ||
|
|
5df3500a9f | ||
|
|
393fbd30b0 | ||
|
|
9dc1e0a9e2 | ||
|
|
4875508f70 | ||
|
|
b1c00233b3 | ||
|
|
f85e65ba32 | ||
|
|
150d2e7404 | ||
|
|
2b997135e5 | ||
|
|
3e815ed590 | ||
|
|
550d3207ad | ||
|
|
f78a1fdf95 | ||
|
|
b7545e0092 | ||
|
|
679a69f25c | ||
|
|
20e439f9d8 | ||
|
|
5d3e2cdbb9 | ||
|
|
93859297c1 | ||
|
|
2258ab23ef | ||
|
|
9b0c12a1c2 | ||
|
|
8ff8443b5e | ||
|
|
6295496d15 | ||
|
|
6e2ce11b26 | ||
|
|
bcffe2abb9 | ||
|
|
da132b379a | ||
|
|
116656e62e | ||
|
|
7be11b4e08 | ||
|
|
8521819a46 | ||
|
|
9a6529b17f | ||
|
|
26e96f362a | ||
|
|
267abc2050 | ||
|
|
dcc9d0c4af | ||
|
|
4b5c01e3e7 | ||
|
|
1ef7add534 | ||
|
|
93ca53d489 | ||
|
|
604dd4d648 | ||
|
|
4d5d0c9063 | ||
|
|
7f2b20dc98 | ||
|
|
7ad5c226e6 | ||
|
|
a3bb05242f | ||
|
|
180da3ed5a | ||
|
|
ddc7c197c8 | ||
|
|
da72afeb7c | ||
|
|
913432232d | ||
|
|
84ce45b8f0 | ||
|
|
b003ed7394 | ||
|
|
941077c11c | ||
|
|
2116c4a964 | ||
|
|
0a5111d7eb | ||
|
|
c4962114b6 | ||
|
|
8050c34174 | ||
|
|
f172c50d2b | ||
|
|
12b438d05a | ||
|
|
26215c258b | ||
|
|
71ac0ad43a | ||
|
|
ca026ecbaa | ||
|
|
5b124c0ce2 | ||
|
|
355b57b26f | ||
|
|
eeccc74128 | ||
|
|
8751363df8 | ||
|
|
f729181262 | ||
|
|
a6f2f33ccf | ||
|
|
bb18bdb932 | ||
|
|
4a7946ab7d | ||
|
|
3203ac14d3 | ||
|
|
98edef2233 | ||
|
|
732c1a3926 | ||
|
|
9c1e7c5c98 | ||
|
|
19352fdd03 | ||
|
|
8b159cc64d | ||
|
|
8d9e54130d | ||
|
|
a473ef2e92 | ||
|
|
dfb26f49a2 | ||
|
|
86a39802d3 | ||
|
|
a5f17c318d | ||
|
|
90733963e5 | ||
|
|
5dc06c341c | ||
|
|
03646de1a5 | ||
|
|
811a9a4992 | ||
|
|
fa545d2806 | ||
|
|
5079d57766 | ||
|
|
2d7c1718b4 | ||
|
|
b947601083 | ||
|
|
fe8ef083aa | ||
|
|
930ca716ca | ||
|
|
8f0294b763 | ||
|
|
cde884faae | ||
|
|
377dc2a48d | ||
|
|
7a4f4a8f79 | ||
|
|
97cc3ee2a7 | ||
|
|
12e38343f8 | ||
|
|
151d04a870 | ||
|
|
a5317799e8 | ||
|
|
d96b8e0e83 | ||
|
|
bbe2f33399 | ||
|
|
c8008b441a | ||
|
|
d4f3c9c6a1 | ||
|
|
f7d16d846c | ||
|
|
dd4032e515 | ||
|
|
84a9ea5572 | ||
|
|
5e8a5590ce | ||
|
|
fb55d6d6d3 | ||
|
|
b0afb983c9 | ||
|
|
e56bab67b8 | ||
|
|
f3fd6762c3 | ||
|
|
59b8f81283 | ||
|
|
44a9e8b2af | ||
|
|
31c39eea55 | ||
|
|
f9a0874e58 | ||
|
|
1858425944 | ||
|
|
b04228f0fd | ||
|
|
4263a341e1 | ||
|
|
8b9f7a929b | ||
|
|
4d7edfd687 | ||
|
|
289e9ca02a | ||
|
|
d7ce96a5d0 | ||
|
|
bf13b5c1e0 | ||
|
|
0b31e5d7a1 | ||
|
|
f78303abef | ||
|
|
06c735ba8a | ||
|
|
e7fab1da26 | ||
|
|
22ff01e2a5 | ||
|
|
f8f0d91386 | ||
|
|
d70c81d1d1 | ||
|
|
8e53d91682 | ||
|
|
c32d350550 | ||
|
|
fe17cddec8 | ||
|
|
33c4c5a021 | ||
|
|
04ea39073b | ||
|
|
d7aa1f1bf4 | ||
|
|
2c0e21b28b | ||
|
|
487ac86d47 | ||
|
|
726d87d15a | ||
|
|
d50e05315f | ||
|
|
3fb5bab343 | ||
|
|
4bcd1edff5 | ||
|
|
42ab16405d | ||
|
|
c78db1dd24 | ||
|
|
200b6a7eb9 | ||
|
|
410335c46d | ||
|
|
76dc969363 | ||
|
|
3772f83fe0 | ||
|
|
f2258e3eac | ||
|
|
a40c9e2ca1 | ||
|
|
241e2f5e14 | ||
|
|
afdf4e74be | ||
|
|
a9180719b6 | ||
|
|
88844fea42 | ||
|
|
f5700d5304 | ||
|
|
dacd05b9fb | ||
|
|
5db65fa3a1 | ||
|
|
b7eb9e22d6 | ||
|
|
b9de954690 | ||
|
|
07c933e677 | ||
|
|
bdb8221213 | ||
|
|
4573f5e8f6 | ||
|
|
a170f55a22 | ||
|
|
a6f0a07bf9 | ||
|
|
1816894ccf | ||
|
|
07f289d1e0 | ||
|
|
b61918d516 | ||
|
|
824dfeb166 | ||
|
|
6aa90fc091 | ||
|
|
5641c3116e | ||
|
|
e5c80a2c84 | ||
|
|
fc3f505189 | ||
|
|
ff950a035d | ||
|
|
98114bd294 | ||
|
|
37d497d47a | ||
|
|
fae4957a71 | ||
|
|
0d9872021d | ||
|
|
30443a5b9a | ||
|
|
2eb5fd26de | ||
|
|
01852ef055 | ||
|
|
59c0de46e2 | ||
|
|
f8d9e042bb | ||
|
|
0596d375b7 | ||
|
|
47c5a6e73b | ||
|
|
022463b9a2 | ||
|
|
d19f471352 | ||
|
|
8f2f38bf07 | ||
|
|
4fe82abbfc | ||
|
|
32710eff1d | ||
|
|
21eaa3de04 | ||
|
|
773ddf8bc2 | ||
|
|
14e0d86df8 | ||
|
|
333fb6eb6e | ||
|
|
da0893fdb3 | ||
|
|
ce2b680a43 | ||
|
|
b1cc95d972 | ||
|
|
10eb52e651 | ||
|
|
13b3dadb45 | ||
|
|
cff69bef5e | ||
|
|
536082ae6e | ||
|
|
3f069b84c9 | ||
|
|
ddca8001cc | ||
|
|
02b4427260 | ||
|
|
ec5618dd1f | ||
|
|
e8f742a627 | ||
|
|
45946e3ac9 | ||
|
|
e3e5f8b36e | ||
|
|
1435411861 | ||
|
|
86b7e7348e | ||
|
|
d2bd2d1397 | ||
|
|
8895b27552 | ||
|
|
57424857b0 | ||
|
|
2ced408994 | ||
|
|
976f01cee1 | ||
|
|
4d5f80a01d | ||
|
|
0327e676dd | ||
|
|
91ea65d2a3 | ||
|
|
de5fcf27f3 | ||
|
|
fe6813736c | ||
|
|
dc35af0bc0 | ||
|
|
0c0bf1aafd | ||
|
|
62dab0dde9 | ||
|
|
31a2d46996 | ||
|
|
710a205f99 | ||
|
|
69a956f3c2 | ||
|
|
7839403266 | ||
|
|
6e50104da4 | ||
|
|
edb2431cf9 | ||
|
|
67204d8e3c | ||
|
|
a0047a9d3e | ||
|
|
cf4aa9021d | ||
|
|
3e99dc2955 | ||
|
|
2ed2c27906 | ||
|
|
a79bab670f | ||
|
|
a7e2ac7686 | ||
|
|
98e295e768 | ||
|
|
751a22fe68 | ||
|
|
dba1d7b6eb | ||
|
|
9fa2e3ebb0 | ||
|
|
f70f34e009 | ||
|
|
644d26546c | ||
|
|
b0a0c92e50 | ||
|
|
d3540ccc0a | ||
|
|
735f4392dd | ||
|
|
95cd2370fc | ||
|
|
a0bea44274 | ||
|
|
989adde3ef | ||
|
|
399f59981d | ||
|
|
37956ea4ef | ||
|
|
51d936bc90 | ||
|
|
d9796410bc | ||
|
|
a842e1f7db | ||
|
|
bc361a2e86 | ||
|
|
4d6ae27518 | ||
|
|
adacb6235e | ||
|
|
78c410cf50 | ||
|
|
f2755ae5bb | ||
|
|
fdd5b6bf9d | ||
|
|
4438e6c780 | ||
|
|
1513b7c42f | ||
|
|
76eea831ca | ||
|
|
1b6e05083d | ||
|
|
fddede57fd | ||
|
|
58f7345b42 | ||
|
|
83704e306f | ||
|
|
27311f53e6 | ||
|
|
d3946450eb | ||
|
|
96ca325a25 | ||
|
|
90f94d6053 | ||
|
|
1b3598b2fe | ||
|
|
58e6bac74d | ||
|
|
5ffa442c5f | ||
|
|
dd5c1ee243 | ||
|
|
4c73649b9c | ||
|
|
8878aebe0b | ||
|
|
236840919d | ||
|
|
ab5544691a | ||
|
|
19557551fe | ||
|
|
8aa6aac2a7 | ||
|
|
23e6e44073 | ||
|
|
5342b83345 | ||
|
|
b80e466533 | ||
|
|
77b54feeb6 | ||
|
|
6b08c123e2 | ||
|
|
c710b4c9b2 | ||
|
|
094a8f295a | ||
|
|
753ece23d6 | ||
|
|
d2bea3802e | ||
|
|
3ecacd3fa9 | ||
|
|
4f692138fc | ||
|
|
cb42a5fc2a | ||
|
|
316f959234 | ||
|
|
6fdd4b75e8 | ||
|
|
486d7ea002 | ||
|
|
ce9416e943 | ||
|
|
baa70a104a | ||
|
|
7212d6848a | ||
|
|
b723378eb2 | ||
|
|
5889d1edcd | ||
|
|
c11ff21499 | ||
|
|
31c8f85ba5 | ||
|
|
b08c6285e6 | ||
|
|
56f4c14318 | ||
|
|
c44e9ecfed | ||
|
|
6aaaf6d9ae | ||
|
|
3b0031c251 | ||
|
|
75a010fe77 | ||
|
|
712e44e26c | ||
|
|
44adf6427b | ||
|
|
0bc2dbac4a | ||
|
|
9bbab6b595 | ||
|
|
460f4e9866 | ||
|
|
f944c93faa | ||
|
|
2c7bfef0f0 | ||
|
|
6f5b2aa360 | ||
|
|
d08cad3642 | ||
|
|
d2d055dd37 | ||
|
|
7feb705d73 | ||
|
|
b0ec1a073b | ||
|
|
c0a40529a9 | ||
|
|
7bb9a5f783 | ||
|
|
00522bc950 | ||
|
|
0632c3a023 | ||
|
|
6f9b8a6d42 | ||
|
|
72c797bf83 | ||
|
|
5f12bd7538 | ||
|
|
7b4c3bb26d | ||
|
|
4bcc79fdb7 | ||
|
|
7d4a6fb8d3 | ||
|
|
5194dea1b8 | ||
|
|
5f510cdfa2 | ||
|
|
564aff23a6 | ||
|
|
f057a7db05 | ||
|
|
47c0bdcd47 | ||
|
|
d80a4f4b3c | ||
|
|
fac11ec5ed | ||
|
|
66e8b280de | ||
|
|
ceed0e42b3 | ||
|
|
564093e0ec | ||
|
|
af3fff4034 | ||
|
|
254ffb3f39 | ||
|
|
a66f3c3973 | ||
|
|
edaa3b828b | ||
|
|
76cb7b91ee | ||
|
|
2048827c45 | ||
|
|
1f478cfb22 | ||
|
|
e74074ffd0 | ||
|
|
20b557ff97 | ||
|
|
28f84c768e | ||
|
|
1d281004e7 | ||
|
|
f6f0f79954 | ||
|
|
656bac1a6f | ||
|
|
66344c51fb | ||
|
|
23947beecc | ||
|
|
876a442362 | ||
|
|
4ef4a9b03e | ||
|
|
e9dd3d5845 | ||
|
|
eb24e34899 | ||
|
|
b44fbefc97 | ||
|
|
cbffbb0358 | ||
|
|
52c7a8474f | ||
|
|
4f5f564b59 | ||
|
|
00ead85ab7 | ||
|
|
9330b95147 | ||
|
|
4ee9c847da | ||
|
|
29180a95b1 | ||
|
|
1124d82687 | ||
|
|
795abf74ab | ||
|
|
47cbdd9c1d | ||
|
|
9b527b7793 | ||
|
|
e919f1b9f5 | ||
|
|
73f3c83940 | ||
|
|
1425f426dc | ||
|
|
3e37250d44 | ||
|
|
3be78775ca | ||
|
|
ab1c7ab563 | ||
|
|
7c2483d73e | ||
|
|
1975848ecc | ||
|
|
e79506b303 | ||
|
|
9f32edad63 | ||
|
|
3278b31a8f | ||
|
|
ec6c7aede8 | ||
|
|
0516232bb3 | ||
|
|
44f97181ae | ||
|
|
cf762df972 | ||
|
|
6a90829744 | ||
|
|
d37086a434 | ||
|
|
5ce5dc7fae | ||
|
|
851894dceb | ||
|
|
6837a1070b | ||
|
|
dbad5f4cda | ||
|
|
482a20430d | ||
|
|
85751cee2b | ||
|
|
12467815ae | ||
|
|
883d5ccc77 | ||
|
|
0d7b33c362 | ||
|
|
79a6d3d04a | ||
|
|
6bbb649ee6 | ||
|
|
919d3ec3b0 | ||
|
|
c5ea59aeb1 | ||
|
|
b3010afba7 | ||
|
|
de958c9383 | ||
|
|
1bd3a43dbe | ||
|
|
5fa83394a0 | ||
|
|
51537e8725 | ||
|
|
071386d552 | ||
|
|
ec9a0985ce | ||
|
|
71dffd6eb3 | ||
|
|
560a88b0b9 | ||
|
|
626717cc28 | ||
|
|
8dc1964f8c | ||
|
|
d72e946213 | ||
|
|
24edbff859 | ||
|
|
77da2dc873 | ||
|
|
d9414782b2 | ||
|
|
d1b127164e | ||
|
|
db8d9c67b6 | ||
|
|
c9a3a0c7f2 | ||
|
|
0e4d211eaf | ||
|
|
57daaf3e4d | ||
|
|
bc1e309b13 | ||
|
|
09778b2d14 | ||
|
|
89c00a7e21 | ||
|
|
bb026a7318 | ||
|
|
566d1284f2 | ||
|
|
b5b2a7d70d | ||
|
|
93e407f4a5 | ||
|
|
ad7b141cc6 | ||
|
|
f23beab07e | ||
|
|
c582175d35 | ||
|
|
1b1a572f73 | ||
|
|
7c9ffbbde9 | ||
|
|
5404108cc1 | ||
|
|
5c2d6956fd | ||
|
|
fad623ed6a | ||
|
|
263dd2cb40 | ||
|
|
2d56d067e3 | ||
|
|
759507f196 | ||
|
|
e048c65cdb | ||
|
|
41cd5f00bc | ||
|
|
7ab968c4a6 | ||
|
|
462f63a294 | ||
|
|
f75793c5e4 | ||
|
|
521ee29ab8 | ||
|
|
91690f9453 | ||
|
|
aa0db3c528 | ||
|
|
a727d2df26 | ||
|
|
8f818051b0 | ||
|
|
1fb98118c6 | ||
|
|
967e2bc695 | ||
|
|
0855c0a41d | ||
|
|
bff384e677 | ||
|
|
3b2545cf82 | ||
|
|
762ab7ce36 | ||
|
|
ab31e7b4d4 | ||
|
|
cd17aa3a53 | ||
|
|
d99fda59a3 | ||
|
|
ddbd03760b | ||
|
|
7078f10150 | ||
|
|
6c733e96c9 | ||
|
|
720008f9fb | ||
|
|
ade11eb80f | ||
|
|
d8a6642d5f | ||
|
|
2464064226 | ||
|
|
591d74d0c5 | ||
|
|
14286a0025 | ||
|
|
ddce5829d5 | ||
|
|
ebd9fc4bfe | ||
|
|
6f8d99b39e | ||
|
|
65634a18d1 | ||
|
|
827ace8dca | ||
|
|
baa5b0d14f | ||
|
|
b633491b91 | ||
|
|
9f331b6a92 | ||
|
|
b5de22ff13 | ||
|
|
e4c9a95f7c | ||
|
|
90001b6c23 | ||
|
|
19fec61902 | ||
|
|
acc63cc478 | ||
|
|
7a4bcd3b52 | ||
|
|
4017b59f97 | ||
|
|
407a40e32e | ||
|
|
714700f6b5 | ||
|
|
d60baf1895 | ||
|
|
14418d6fa1 | ||
|
|
2db16f09c7 | ||
|
|
178aa1de9c | ||
|
|
6716704dc3 | ||
|
|
d7d7d62971 | ||
|
|
737c0f4205 | ||
|
|
766145275a | ||
|
|
7517a5448e | ||
|
|
80a0f1a1c1 | ||
|
|
5933194570 | ||
|
|
898ce5bf87 | ||
|
|
fbc7cb5452 | ||
|
|
5c646d214c | ||
|
|
6f11230a87 | ||
|
|
a63acf4f45 | ||
|
|
a41cd3f0c4 | ||
|
|
9fc0402b0f | ||
|
|
4852987aae | ||
|
|
83632761a4 | ||
|
|
2229a51b66 | ||
|
|
86a826edaf | ||
|
|
b6dc6dd876 | ||
|
|
4ed60073d2 | ||
|
|
7d01c963b8 | ||
|
|
80047e536d | ||
|
|
4bcabff630 | ||
|
|
be4ad97832 | ||
|
|
f2b8b43bae | ||
|
|
00f1ec7906 | ||
|
|
f8aae84bc4 | ||
|
|
2a7df734de | ||
|
|
4308247624 | ||
|
|
5f19a9f89d | ||
|
|
34a21a931d | ||
|
|
2b0c8ba7a0 | ||
|
|
2c30f5eb5b | ||
|
|
dfb7d8472c | ||
|
|
d87b269bae | ||
|
|
c84c7b5fa0 | ||
|
|
03de867572 | ||
|
|
483540488a | ||
|
|
f55876514f | ||
|
|
bf7ec06957 | ||
|
|
874a850087 | ||
|
|
4b0a455147 | ||
|
|
624f1722b6 | ||
|
|
72f12bbff5 | ||
|
|
57ef958250 | ||
|
|
2814599943 | ||
|
|
2942e84a6f | ||
|
|
148a70ccb8 | ||
|
|
5f0c6cb961 | ||
|
|
bb3ae7eb88 | ||
|
|
64d2805c72 | ||
|
|
533599e5d4 | ||
|
|
cec527453a | ||
|
|
2d35bbb4da | ||
|
|
7091101b04 | ||
|
|
848ad08efc | ||
|
|
2620373fb6 | ||
|
|
afc8a3d764 | ||
|
|
6c1ba95f89 | ||
|
|
c5cd400eb8 | ||
|
|
bd2868746d | ||
|
|
cc7692d7eb | ||
|
|
fd01232a26 | ||
|
|
5fa93764b2 | ||
|
|
588ed3c77e | ||
|
|
6e3f669c13 | ||
|
|
23a9c5da4d | ||
|
|
344a3e633a | ||
|
|
0a0881017a | ||
|
|
76e0987c57 | ||
|
|
e0b6ae275d | ||
|
|
c9fe87014e | ||
|
|
2b94b5e316 | ||
|
|
0c4bf2a6b1 | ||
|
|
b9448026d7 | ||
|
|
90745b07ac | ||
|
|
40d97292d2 | ||
|
|
06fdd51104 | ||
|
|
a09a7e4930 | ||
|
|
121ac2bdfe | ||
|
|
e9c088a86b | ||
|
|
d4e03ec759 | ||
|
|
2d767569c9 | ||
|
|
eecec39725 | ||
|
|
99ec42bf35 | ||
|
|
e2f6fce850 | ||
|
|
9f2cd33a82 | ||
|
|
556cc482d8 | ||
|
|
fe9cd61d1d | ||
|
|
08b2bcb88b | ||
|
|
0072e98fad | ||
|
|
0befb3c5b1 | ||
|
|
5e0f9a4898 | ||
|
|
588a8d6b7c | ||
|
|
331a64e387 | ||
|
|
f40781a9eb | ||
|
|
490fedf463 | ||
|
|
12466ef9cb | ||
|
|
c75fc7f1eb | ||
|
|
4c78e47404 | ||
|
|
4b80441164 | ||
|
|
e2cc2f9fd7 | ||
|
|
b669733bd8 | ||
|
|
5a769fa22b | ||
|
|
8bbf27526e | ||
|
|
4270450a03 | ||
|
|
802360b008 | ||
|
|
ccd11d38f8 | ||
|
|
996c18fca0 | ||
|
|
0cb7cbcb49 | ||
|
|
19f12038cd | ||
|
|
ebc7c070f3 | ||
|
|
7acb3c3874 | ||
|
|
e3ca2c3fbc | ||
|
|
ac1accce96 | ||
|
|
c39185abab | ||
|
|
6729c9c33f | ||
|
|
4e4a7aa19e | ||
|
|
5d8ce8bfb8 | ||
|
|
92b811b329 | ||
|
|
8c8a357aa7 | ||
|
|
f2770b4609 | ||
|
|
7c21754b74 | ||
|
|
547a9e9fbf | ||
|
|
fd6a223876 | ||
|
|
2fd71f00d6 | ||
|
|
0301a40560 | ||
|
|
05da03a259 | ||
|
|
6e1763332a | ||
|
|
5bbf27de9c | ||
|
|
54f628f7a6 | ||
|
|
4743eb46c1 | ||
|
|
66393a80f2 | ||
|
|
c6c8de7357 | ||
|
|
cbbbb20751 | ||
|
|
604f4d8046 | ||
|
|
579d5e0844 | ||
|
|
5c3e1d06c0 | ||
|
|
d1663de1d7 | ||
|
|
1571040eae | ||
|
|
8221a26c2d | ||
|
|
9996836253 | ||
|
|
7aaa1e3edb | ||
|
|
532ecbd449 | ||
|
|
e66059f621 | ||
|
|
3344040630 | ||
|
|
6afe786cad | ||
|
|
5f4307932a | ||
|
|
4978c3e648 | ||
|
|
f0223a2505 | ||
|
|
727c407435 | ||
|
|
c63a250f2b | ||
|
|
161b98ef43 | ||
|
|
2417b74ea5 | ||
|
|
620ed70246 | ||
|
|
847dc0080a | ||
|
|
d12600e076 | ||
|
|
7d60f558d5 | ||
|
|
5602e420fc | ||
|
|
7a25006fa5 | ||
|
|
5846093a7f | ||
|
|
88bd1d9c16 | ||
|
|
dc4797bb59 | ||
|
|
15b5bddab8 | ||
|
|
2b8444b78f | ||
|
|
f1d276c988 | ||
|
|
b695a8c469 | ||
|
|
0d0cb83ed6 | ||
|
|
943bb576a9 | ||
|
|
08e9c3d596 | ||
|
|
209e6ebb08 | ||
|
|
202e539cca | ||
|
|
edcd2df6bc | ||
|
|
3f679d72cf | ||
|
|
2e09541c84 | ||
|
|
6885f41b61 | ||
|
|
69d33e7483 | ||
|
|
d175082520 | ||
|
|
2ef31d2e08 | ||
|
|
eab439d450 | ||
|
|
27417cda70 | ||
|
|
2959d2a2ae | ||
|
|
289aecc1ed | ||
|
|
01d2ce36d1 | ||
|
|
cbea9ee045 | ||
|
|
ea980a4150 | ||
|
|
2910b10f99 | ||
|
|
d5f14d56f3 | ||
|
|
c3a80b086c | ||
|
|
7616cef9cc | ||
|
|
1f54d88867 | ||
|
|
12c388093f | ||
|
|
190a4203eb | ||
|
|
0fdd608828 | ||
|
|
697132baf9 | ||
|
|
b25a9f2ae4 | ||
|
|
7b55f61396 | ||
|
|
f3faaf06f8 | ||
|
|
6dc941d4e6 | ||
|
|
ce15155956 | ||
|
|
8ab68b94ac | ||
|
|
0753f23078 | ||
|
|
859296885f | ||
|
|
a37961ef9c | ||
|
|
8802c7ccc3 | ||
|
|
941d5544cf | ||
|
|
d453d9327e | ||
|
|
ac00131153 | ||
|
|
796cc6c1bb | ||
|
|
8709e30841 | ||
|
|
8f9f9a48a6 | ||
|
|
cfeb63b855 | ||
|
|
904a3c26df | ||
|
|
764c890892 | ||
|
|
3553b4da51 | ||
|
|
0f6a24a2fb | ||
|
|
3704111fb0 | ||
|
|
f8e378863e | ||
|
|
9526df1b84 | ||
|
|
e9ea1ce659 | ||
|
|
9f4e6c3f06 | ||
|
|
4292ceb062 | ||
|
|
2609124346 | ||
|
|
902da70ee3 | ||
|
|
dd9243d459 | ||
|
|
014181a653 | ||
|
|
92bf709d65 | ||
|
|
842ec2728e | ||
|
|
b8d0751509 | ||
|
|
514909aa05 | ||
|
|
85922dbad7 | ||
|
|
a7b70df915 | ||
|
|
36237ef658 | ||
|
|
743d3209e8 | ||
|
|
814eaab300 | ||
|
|
40d277b666 | ||
|
|
a1411968b8 | ||
|
|
2ba25a5922 | ||
|
|
e54a5982e3 | ||
|
|
203cf029d1 | ||
|
|
dac7e45651 | ||
|
|
0dc07384eb | ||
|
|
e58e166428 | ||
|
|
4ad45db655 | ||
|
|
2683896f41 | ||
|
|
2e13d9f7a4 | ||
|
|
1f90648347 | ||
|
|
6bf2185257 | ||
|
|
6f2becc42e | ||
|
|
cf21a1daee | ||
|
|
79501bceec | ||
|
|
64d300d15e | ||
|
|
eead25896f | ||
|
|
2f4fb88e07 | ||
|
|
2ac200cdb2 | ||
|
|
7f589ecade | ||
|
|
0b4a368d03 | ||
|
|
e8da9bce72 | ||
|
|
e488c43eb7 | ||
|
|
b1cb94ef71 | ||
|
|
56a6658bf1 | ||
|
|
4be8324767 | ||
|
|
09a5593e2f | ||
|
|
c987b72033 | ||
|
|
cbd894a634 | ||
|
|
33273e3954 | ||
|
|
f28698f71a | ||
|
|
56719e7bcd | ||
|
|
febc9727bf | ||
|
|
2ae3b8bca0 | ||
|
|
352283d0b6 | ||
|
|
f0696d396f | ||
|
|
8729ae1210 | ||
|
|
17c0d8125e | ||
|
|
67a3ed3b57 | ||
|
|
342238325e | ||
|
|
080280c268 | ||
|
|
17dd6696df | ||
|
|
d0a4851a67 | ||
|
|
a09ba7c603 | ||
|
|
a734aa2b26 | ||
|
|
1987951014 | ||
|
|
c8f6e8c084 | ||
|
|
4101fe3880 | ||
|
|
9833090318 | ||
|
|
8169d9863b | ||
|
|
ecac87dc6a | ||
|
|
4865649d0f | ||
|
|
fe20494d30 | ||
|
|
b356b1b0d6 | ||
|
|
fc3c841d03 | ||
|
|
3d0d1df324 | ||
|
|
789ae74e0a | ||
|
|
bcccc5d1d5 | ||
|
|
5c7a766658 | ||
|
|
abdf5423f5 | ||
|
|
8775436cdb | ||
|
|
3557ea50c6 | ||
|
|
2c4ae3ea42 | ||
|
|
e5e62fd2d9 | ||
|
|
f3b2b05169 | ||
|
|
b00f8e75f6 | ||
|
|
b604fe74b5 | ||
|
|
3082fb7a15 | ||
|
|
41ff65162b | ||
|
|
f778beaafd | ||
|
|
a018b55038 | ||
|
|
03b600fb67 | ||
|
|
358b8ef579 | ||
|
|
b2c11f5984 | ||
|
|
fc14c61ac1 | ||
|
|
c4073d1813 | ||
|
|
5d19fe127c | ||
|
|
a78f7d2a05 | ||
|
|
78fa5c92bc | ||
|
|
cfa8f5ac31 | ||
|
|
4b239fd2ee | ||
|
|
676539cf8c | ||
|
|
9bd4f5acdb | ||
|
|
438ce2f33a | ||
|
|
cd4dfa5f76 | ||
|
|
0ad7ae6f66 | ||
|
|
625b477c23 | ||
|
|
a75ba7edd4 | ||
|
|
3a24024aaf | ||
|
|
e4769fd0e6 | ||
|
|
cd706068c8 | ||
|
|
05767df99d | ||
|
|
00a2dcfa77 | ||
|
|
a27c8019a6 | ||
|
|
3f27fd7dc1 | ||
|
|
a83467f595 | ||
|
|
45d8c63a45 | ||
|
|
0fd7967e7f | ||
|
|
e2f850192f | ||
|
|
5a6dfd0c18 | ||
|
|
ef8141c8a9 | ||
|
|
ebd2afa43f | ||
|
|
89e98a6797 | ||
|
|
5a4aa337b3 | ||
|
|
7687576e1f | ||
|
|
8ca63e02eb | ||
|
|
b924f7a323 | ||
|
|
606a5a56bc | ||
|
|
3ee6aa61a7 | ||
|
|
af8a79757e | ||
|
|
a047262eb6 | ||
|
|
e920c06dc0 | ||
|
|
c208c2aed2 | ||
|
|
ed8592f5f8 | ||
|
|
8c85870c25 | ||
|
|
f5bb5fba27 | ||
|
|
43acdce578 | ||
|
|
92b899dc2a | ||
|
|
6fa1dc7b30 | ||
|
|
f4c60c3aed | ||
|
|
35ae5599c1 | ||
|
|
057a1d11b1 | ||
|
|
5fe2c8c8a7 | ||
|
|
030635a86b | ||
|
|
af248ffd24 | ||
|
|
6b52cabbac | ||
|
|
fa60e2ad68 | ||
|
|
b2784bd3da | ||
|
|
8bfcb24d15 | ||
|
|
1aaf8b465f | ||
|
|
ffb85d90a3 | ||
|
|
6a4f196940 | ||
|
|
37d9f93eb5 | ||
|
|
39559413f5 | ||
|
|
8c845f5135 | ||
|
|
ef7ad10fdb | ||
|
|
e6ca4274ec | ||
|
|
d97c51139f | ||
|
|
52dfc82054 | ||
|
|
773fb63f92 | ||
|
|
7ce4c4008c | ||
|
|
178db0a085 | ||
|
|
bc833c47dc | ||
|
|
617b4658b4 | ||
|
|
98a79e0e55 | ||
|
|
e21f787125 | ||
|
|
878106386c | ||
|
|
3c870eef7d | ||
|
|
4f3d61a7eb | ||
|
|
470e80a194 | ||
|
|
e44852a7e4 | ||
|
|
92885635ed | ||
|
|
722cecf0d3 | ||
|
|
6a9d7e7da2 | ||
|
|
22ec6b96b2 | ||
|
|
0c8471438a | ||
|
|
3a74381318 | ||
|
|
0fcf9298bb | ||
|
|
c8bd4e22a5 | ||
|
|
a918bc2798 | ||
|
|
9d81498bd9 | ||
|
|
45a37f390b | ||
|
|
a2eced9201 | ||
|
|
36b08c5d74 | ||
|
|
5c0ee9ca53 | ||
|
|
f280feff65 | ||
|
|
f37e944ac4 | ||
|
|
cf281c22ce | ||
|
|
4d8cb4d4d4 | ||
|
|
7426841b5e | ||
|
|
89efdb6178 | ||
|
|
a37a08ef70 | ||
|
|
db80caf74a | ||
|
|
672010711d | ||
|
|
a4cea54db8 | ||
|
|
ddbf8124a8 | ||
|
|
5655db6cd2 | ||
|
|
c764ced536 | ||
|
|
9f4bff884f | ||
|
|
b002d58259 | ||
|
|
bdf3f6d833 | ||
|
|
7f183193d5 | ||
|
|
d3ae186f6b | ||
|
|
18cd92e5a8 | ||
|
|
0e4281d4a2 | ||
|
|
7d19fa971d | ||
|
|
a66c5aae06 | ||
|
|
eea1792f0e | ||
|
|
e6bd773762 | ||
|
|
2cc8ecf20a | ||
|
|
9ca3dc91ee | ||
|
|
98f1e15666 | ||
|
|
c61e787bca | ||
|
|
89eba5e3e8 | ||
|
|
8bc1782589 | ||
|
|
93a55bff8c | ||
|
|
39dec02dc4 | ||
|
|
24dc763c4f | ||
|
|
38f9f65ad8 | ||
|
|
eaed758aa0 | ||
|
|
705766a5ee | ||
|
|
23a99c04e9 | ||
|
|
1a1e9732b9 | ||
|
|
2dfa3778cb | ||
|
|
d99dc4c6f8 | ||
|
|
8507a842be | ||
|
|
4cafcc053e | ||
|
|
30e2c7117c | ||
|
|
8e5b9b2655 | ||
|
|
954724e12a | ||
|
|
97dd511452 | ||
|
|
93b1e64896 | ||
|
|
933dc50c62 | ||
|
|
8b740f4af2 | ||
|
|
13db1dfbfa | ||
|
|
03cd838ff4 | ||
|
|
c8aa7b17a7 | ||
|
|
67fb6235f4 | ||
|
|
7d5f8031ca | ||
|
|
b8eec82f2a | ||
|
|
04be7be06b | ||
|
|
b224b57a43 | ||
|
|
f764e23881 | ||
|
|
8fefe8c1b3 | ||
|
|
dd93e9d672 | ||
|
|
7b69100de9 | ||
|
|
9819dbe0c1 | ||
|
|
6a5bb8bab4 | ||
|
|
48878185de | ||
|
|
9c5d3cdde1 | ||
|
|
6ea677cd7a | ||
|
|
05e451d41e | ||
|
|
ff41c56e82 | ||
|
|
554c1077a0 | ||
|
|
bc40119b72 | ||
|
|
65587815ff | ||
|
|
c3eabcfd96 | ||
|
|
fa563c6542 | ||
|
|
7219f91648 | ||
|
|
8d22988808 | ||
|
|
6f249c92d6 | ||
|
|
204543af9a | ||
|
|
c8345643c6 | ||
|
|
4a61570a50 | ||
|
|
57b060b15d | ||
|
|
c31b3e823f | ||
|
|
5d3aa26cdc | ||
|
|
0b2e12ce0c | ||
|
|
3a6ed7a243 | ||
|
|
2541666333 | ||
|
|
5bcb974b96 | ||
|
|
5c65ccc12b | ||
|
|
61ee4b25fe | ||
|
|
35017de391 | ||
|
|
5efe51720c | ||
|
|
410c39986b | ||
|
|
928f57bd4c | ||
|
|
6b0e57f07d | ||
|
|
111258d2f0 | ||
|
|
db1fab51f4 | ||
|
|
04893f4347 | ||
|
|
e1083a030c | ||
|
|
fa373115ad | ||
|
|
4b8f14eab1 | ||
|
|
653795ceef | ||
|
|
115a6103d4 | ||
|
|
a238352fb3 | ||
|
|
1322f89fcd | ||
|
|
c1ec393bed | ||
|
|
243cd64d56 | ||
|
|
e06be2d2f1 | ||
|
|
8cfbf87420 | ||
|
|
ff3be07df5 | ||
|
|
a0787e740e | ||
|
|
e5b21a3a91 | ||
|
|
f694c95510 | ||
|
|
b5731a279a | ||
|
|
6bb86efa97 | ||
|
|
c54027562f | ||
|
|
a2163adc95 | ||
|
|
73c35ccb30 | ||
|
|
bcfdda5f8d | ||
|
|
1dd5e3089c | ||
|
|
74c1d6d30d | ||
|
|
0579d7d8d7 | ||
|
|
1d31c784e7 | ||
|
|
0de521f22b | ||
|
|
c027b449cf | ||
|
|
b385fa74b0 | ||
|
|
0427878dbd | ||
|
|
93797023e3 | ||
|
|
02cd11ec7c | ||
|
|
edc3d85cd5 | ||
|
|
0e9d0e6e46 | ||
|
|
07e9d8a04e | ||
|
|
524ec68a63 | ||
|
|
046fd4c435 | ||
|
|
2fb03f3af3 | ||
|
|
cd4267bc2e | ||
|
|
48c4306cdc | ||
|
|
63fd4ad847 | ||
|
|
2cf86d46ff | ||
|
|
3c3f7afb32 | ||
|
|
a046be0ebb | ||
|
|
dc2af919eb | ||
|
|
23b7470daf | ||
|
|
78585c84b4 | ||
|
|
02b93fa73f | ||
|
|
3c6aff704c | ||
|
|
beeb797b6e | ||
|
|
d275463039 | ||
|
|
51dae0ba8d | ||
|
|
850f5f98b6 | ||
|
|
0424a474bc | ||
|
|
37496f8a1a | ||
|
|
02593c9867 | ||
|
|
79ab53876c | ||
|
|
a917695029 | ||
|
|
b2bfebce6f | ||
|
|
5b5f358919 | ||
|
|
92df11162c | ||
|
|
6feef59d75 | ||
|
|
944c6d25a2 | ||
|
|
9e94520a54 | ||
|
|
d249b1cf1b | ||
|
|
5661e4f37b | ||
|
|
e8ae2874d6 | ||
|
|
f3c386f729 | ||
|
|
03b8f93e04 | ||
|
|
2a583883dc | ||
|
|
1cee9200b2 | ||
|
|
c634cf5ada | ||
|
|
804c6414ee | ||
|
|
0cc9642851 | ||
|
|
286398c15d | ||
|
|
d0b57ecb1f | ||
|
|
5b11c6a5c6 | ||
|
|
90c8da76bd | ||
|
|
e87ed5ba1c | ||
|
|
1aa9a7c4d9 | ||
|
|
509cb9839d | ||
|
|
0089901b07 | ||
|
|
877ee7b2c7 | ||
|
|
d117dacf0f | ||
|
|
1ea58bd200 | ||
|
|
dcc8af915f | ||
|
|
4d4af9ff7f | ||
|
|
a9a861e8f2 | ||
|
|
ab70c8b382 | ||
|
|
d8e99ef810 | ||
|
|
c92e92f73d | ||
|
|
d3862ba88b | ||
|
|
0023c6545b | ||
|
|
2ca835ea1b | ||
|
|
20859d3ee7 | ||
|
|
e79700ea93 | ||
|
|
e02d9bd98b | ||
|
|
d7136a8390 | ||
|
|
e1d8da9d37 | ||
|
|
cfecd67500 | ||
|
|
26623b2428 | ||
|
|
44d9117d8d | ||
|
|
31de878ea7 | ||
|
|
9768555e7c | ||
|
|
72e422d76e | ||
|
|
8860be13e4 | ||
|
|
3b7ad97f0a | ||
|
|
5e305f2769 | ||
|
|
0a798606ee | ||
|
|
3775daf36c | ||
|
|
8c5de01034 | ||
|
|
1c352e67e4 | ||
|
|
79838077f2 | ||
|
|
058bb83a25 | ||
|
|
d2f840bb36 | ||
|
|
a576c90f4e | ||
|
|
a1bd01de5f | ||
|
|
9a5e817f36 | ||
|
|
bc20bc3f45 | ||
|
|
783a6e2aa0 | ||
|
|
992c56b262 | ||
|
|
c674cef79e | ||
|
|
509ed756fd | ||
|
|
152b69ddba | ||
|
|
c2eedab33d | ||
|
|
677fee4145 | ||
|
|
72dad743dc | ||
|
|
e262b0699a | ||
|
|
6942089a32 | ||
|
|
993adc3dec | ||
|
|
fe7a39c0cb | ||
|
|
3bd704e495 | ||
|
|
6992e54f8e | ||
|
|
4d5ab77fed | ||
|
|
1b2328d728 | ||
|
|
2944e12541 | ||
|
|
763972ca4b | ||
|
|
01fe0c1fc9 | ||
|
|
8d160a70ff | ||
|
|
fc90b9c9f5 | ||
|
|
0a803df23f | ||
|
|
d3a1ed4b06 | ||
|
|
ad89e0074b | ||
|
|
169a39eb3e | ||
|
|
a6145af7f3 | ||
|
|
03b60ef140 | ||
|
|
1b7ef1e198 | ||
|
|
72de68a575 | ||
|
|
24e7b94599 | ||
|
|
c5dc4531ae | ||
|
|
a3e07b4a63 | ||
|
|
d48555b849 | ||
|
|
a1f05caddf | ||
|
|
669eb36603 | ||
|
|
ce379bcfda | ||
|
|
00657ffdcd | ||
|
|
d9e0ba027f | ||
|
|
a7279e3d8a | ||
|
|
61ae7e9f10 | ||
|
|
548d323ca1 | ||
|
|
d2d7a17f3b | ||
|
|
65b0ed0038 | ||
|
|
2b0523d34c | ||
|
|
5bef6bd5a4 | ||
|
|
5ca3965c7b | ||
|
|
e855665c87 | ||
|
|
e9bf8dad9f | ||
|
|
54c2b21a4c | ||
|
|
afe5cba480 | ||
|
|
8c34f4cbb2 | ||
|
|
e422e7075a | ||
|
|
cc0ee507dd | ||
|
|
540850f0b9 | ||
|
|
a973c0a9c3 | ||
|
|
ae27b3411b | ||
|
|
89c4ac091a | ||
|
|
843ca9b60a | ||
|
|
d135362d40 | ||
|
|
2f1b9df6e9 | ||
|
|
7190af4e79 | ||
|
|
2898584ee3 | ||
|
|
5ef2519bf5 | ||
|
|
f258d317cc | ||
|
|
4d3fcd6779 | ||
|
|
f1b0aff789 | ||
|
|
6e9a30b354 | ||
|
|
37091708b7 | ||
|
|
0885aae79c | ||
|
|
5e5d30d154 | ||
|
|
a614db1e20 | ||
|
|
f7f29e558b | ||
|
|
ddc1bfe74f | ||
|
|
18b95d9564 | ||
|
|
b012f87d87 | ||
|
|
73f277fe95 | ||
|
|
bd3df850a5 | ||
|
|
73b52462c0 | ||
|
|
267d7b4a2e | ||
|
|
35cdeda56c | ||
|
|
0f90eebdf6 | ||
|
|
962357ed0f | ||
|
|
69d077df9e | ||
|
|
e2b0534374 | ||
|
|
4204b7878d | ||
|
|
1e2237f7ec | ||
|
|
6bfe3b3f86 | ||
|
|
940bee33a4 | ||
|
|
7c787157d8 | ||
|
|
7514886199 | ||
|
|
ad5b917f3b | ||
|
|
66408fc950 | ||
|
|
94ec02eea9 | ||
|
|
5e33e2e2ac | ||
|
|
34613037fc | ||
|
|
f2b24f13af | ||
|
|
c718d21d0f | ||
|
|
a2828f0060 | ||
|
|
4b3b846a2c | ||
|
|
b232945c71 | ||
|
|
f91d1cb9b7 | ||
|
|
fadd8aad8b | ||
|
|
b0479b247a | ||
|
|
a659544bd2 | ||
|
|
9ce4c99180 | ||
|
|
52f51147b8 | ||
|
|
34836b50a1 | ||
|
|
7179796365 | ||
|
|
966c90eece | ||
|
|
3281bf929a | ||
|
|
906a0704bc | ||
|
|
20785c095c | ||
|
|
dee2280d06 | ||
|
|
f6b69b64c3 | ||
|
|
2f09b37f7c | ||
|
|
20cf0f5151 | ||
|
|
860e926b5a | ||
|
|
9f81a4b5c1 | ||
|
|
5d85220121 | ||
|
|
6423efa2d7 | ||
|
|
932cb77265 | ||
|
|
691244a00e | ||
|
|
440c59a5fd | ||
|
|
8a3e2b5efc | ||
|
|
119a4361df | ||
|
|
6c93b6dcf4 | ||
|
|
4d76cd30c0 | ||
|
|
96fd051e01 | ||
|
|
2fe0da30be | ||
|
|
890e045a88 | ||
|
|
b333df4317 | ||
|
|
33d91a979c | ||
|
|
b3614f592f | ||
|
|
3bdb5f3863 | ||
|
|
ad6346f802 | ||
|
|
66f41438be | ||
|
|
647a91eafa | ||
|
|
ecf200e290 | ||
|
|
da576bff2b | ||
|
|
fcbf113526 | ||
|
|
b90d144ff6 | ||
|
|
2ac0ed2032 | ||
|
|
0afefc0392 | ||
|
|
9efe2b4b22 | ||
|
|
d54d881390 | ||
|
|
58b496a434 | ||
|
|
41a8803860 | ||
|
|
4146423878 | ||
|
|
1c35dcae03 | ||
|
|
3bcdbce709 | ||
|
|
250ee1f29b | ||
|
|
fd1a86b2f5 | ||
|
|
3433ed2e5c | ||
|
|
c7606beae1 | ||
|
|
d639323e4c | ||
|
|
72e780f175 | ||
|
|
651dc67a5d | ||
|
|
6cfd7710a7 | ||
|
|
adc1d4662d | ||
|
|
5c51b582bf | ||
|
|
16e794163c | ||
|
|
4e25d80b48 | ||
|
|
2949918ed1 | ||
|
|
46ea522ecb | ||
|
|
f571a04ffc | ||
|
|
610b811d53 | ||
|
|
e5c4053c05 | ||
|
|
0b9bf16850 | ||
|
|
8489edf966 | ||
|
|
22127cccb0 | ||
|
|
57eb42c7bb | ||
|
|
0a6630f7ab | ||
|
|
b89dd8d401 | ||
|
|
778e66f951 | ||
|
|
7a06d99443 | ||
|
|
3fff94a555 | ||
|
|
b65cc8ad8e | ||
|
|
28ddfef2b1 | ||
|
|
f23cc1f41e | ||
|
|
1ca63ba125 | ||
|
|
af66ace345 | ||
|
|
c0079aee6f | ||
|
|
21a88f9cc1 | ||
|
|
9923ef98ee | ||
|
|
abce1dd873 | ||
|
|
308d500308 | ||
|
|
ae6cf97bce | ||
|
|
53bedd30c1 | ||
|
|
764d251986 | ||
|
|
1bfb96151f | ||
|
|
741e87e00e | ||
|
|
098bff1230 | ||
|
|
0374c5ec78 | ||
|
|
e7bec67c93 | ||
|
|
b9e0f67dec | ||
|
|
acd96d44d2 | ||
|
|
4e4da44c39 | ||
|
|
bb0f836e84 | ||
|
|
5f6a8c7f54 | ||
|
|
0c6bf5d8b1 | ||
|
|
f8210f94f2 | ||
|
|
243674ed96 | ||
|
|
322d352ca0 | ||
|
|
c8c71085e1 | ||
|
|
4969e6a8fd | ||
|
|
ece4a5fa8a | ||
|
|
7d034f44e4 | ||
|
|
c12d3856f2 | ||
|
|
24f9106cde | ||
|
|
58503141c3 | ||
|
|
3b214f491b | ||
|
|
f83ca18c7d | ||
|
|
1261cee8dc | ||
|
|
92ecaa9434 | ||
|
|
fd66228b26 | ||
|
|
bfd7556b50 | ||
|
|
3174e3dc9e | ||
|
|
ec26080bd2 | ||
|
|
5ea83ccf9d | ||
|
|
5af65d941a | ||
|
|
0d79ad3cb6 | ||
|
|
8499a6b426 | ||
|
|
577a79de47 | ||
|
|
6133b9c26d | ||
|
|
c4e91f8ccc | ||
|
|
589fd91d8e | ||
|
|
03eba6114b | ||
|
|
56f0786cc3 | ||
|
|
aff591fd9b | ||
|
|
bdaa3a1352 | ||
|
|
f3b104584d | ||
|
|
e47315e423 | ||
|
|
43335e30a9 | ||
|
|
79c4a48d60 | ||
|
|
a5538902ec | ||
|
|
1b9d905b28 | ||
|
|
89c8b018c8 | ||
|
|
cde69fdd88 | ||
|
|
a798fdf57e | ||
|
|
8b89ad0c5a | ||
|
|
309f4130e0 | ||
|
|
0f2ccdbe4f | ||
|
|
eeb33de590 | ||
|
|
91a8997826 | ||
|
|
5fb7bc434c | ||
|
|
77540355ed | ||
|
|
c5362b682e | ||
|
|
e0f3751fe8 | ||
|
|
54583f95a3 | ||
|
|
990e653e91 | ||
|
|
9d2fb48d3d | ||
|
|
e5e51c4389 | ||
|
|
74dbd4d7e5 | ||
|
|
784a46d165 | ||
|
|
83e1959db8 | ||
|
|
e0bf79f28b | ||
|
|
5c1f4772c7 | ||
|
|
deca14c2c2 | ||
|
|
8023ebe8e2 | ||
|
|
0e98604267 | ||
|
|
7e68c8e823 | ||
|
|
601dbfd062 | ||
|
|
35983534f1 | ||
|
|
f88330c7c9 | ||
|
|
a0bf7dadf8 | ||
|
|
f2added8d1 | ||
|
|
9f78a843ee | ||
|
|
3e78fdd675 | ||
|
|
c5dfd52eb9 | ||
|
|
08df39c3d4 | ||
|
|
9fad88fee3 | ||
|
|
6ae94fdbab | ||
|
|
8d5f0e5505 | ||
|
|
11b614cedf | ||
|
|
fc79649c9c | ||
|
|
b85e93a2cb | ||
|
|
dd8923b2e4 | ||
|
|
1437aea328 | ||
|
|
1fdad2314f | ||
|
|
6aac9dad43 | ||
|
|
fc248dd41f | ||
|
|
a2394df838 | ||
|
|
306d60ccf9 | ||
|
|
d78a722260 | ||
|
|
4a34799e09 | ||
|
|
489622fb0b | ||
|
|
9689dd8c19 | ||
|
|
d29f6817c6 | ||
|
|
f9ea7009fe | ||
|
|
ddd8381440 | ||
|
|
964b8c1165 | ||
|
|
0541a2fb62 | ||
|
|
f3654174fc | ||
|
|
0fc1055da6 | ||
|
|
a654b133e5 | ||
|
|
3a886c6a5b | ||
|
|
4a8d51aed1 | ||
|
|
70f5723c89 | ||
|
|
b85702a706 | ||
|
|
0bf1e83fa1 | ||
|
|
67d62631aa | ||
|
|
43f276abca | ||
|
|
7cea808f46 | ||
|
|
adbe8ed934 | ||
|
|
a3eba7cf45 | ||
|
|
3f26290614 | ||
|
|
d63660468a | ||
|
|
3daecf66a3 | ||
|
|
16db90a630 | ||
|
|
c1d7f82819 | ||
|
|
f8ee9504a8 | ||
|
|
c75d056b76 | ||
|
|
6c38f1b73b | ||
|
|
00b61a291d | ||
|
|
fcdc5f852b | ||
|
|
0424b0f119 | ||
|
|
82559fd572 | ||
|
|
3837ffae59 | ||
|
|
2e4cda0383 | ||
|
|
dc6ef18c21 | ||
|
|
bf3790183a | ||
|
|
bfa8b593ab | ||
|
|
401d679f80 | ||
|
|
157faaf0b5 | ||
|
|
cb49812d17 | ||
|
|
d88fa2a3ce | ||
|
|
5716ab7cfc | ||
|
|
04b9e40cc5 | ||
|
|
2f92036557 | ||
|
|
6aaa4fe2d4 | ||
|
|
ab0f54bb57 | ||
|
|
6642084132 | ||
|
|
c5ca7c7e1a | ||
|
|
5b24334b43 | ||
|
|
df93801021 | ||
|
|
64285879db | ||
|
|
0523f0bcd5 | ||
|
|
c6721ebc3e | ||
|
|
9d22f9a466 | ||
|
|
d58fb00970 | ||
|
|
62e189a9cb | ||
|
|
dc17946a55 | ||
|
|
78d8d858d2 | ||
|
|
30e7f95f38 | ||
|
|
8026d2e671 | ||
|
|
c98e00201a | ||
|
|
9b0ba130f1 | ||
|
|
83aa9709f4 | ||
|
|
340549e916 | ||
|
|
6d41964bba | ||
|
|
71f030f4ee | ||
|
|
67653d06d3 | ||
|
|
ab9f3a4b4a | ||
|
|
d9e9305e2c | ||
|
|
2bcc0c5561 | ||
|
|
cd03d8a658 | ||
|
|
589074886b | ||
|
|
c6ca493752 | ||
|
|
aef649d23a | ||
|
|
610b7323f4 | ||
|
|
eb6f6a9000 | ||
|
|
f3fe829d48 | ||
|
|
cb39d12615 | ||
|
|
5d52026736 | ||
|
|
48dce9c7ce | ||
|
|
2032a754e6 | ||
|
|
aa353140ef | ||
|
|
ee47e8458f | ||
|
|
081f127c85 | ||
|
|
7169c71360 | ||
|
|
5c3a757e5b | ||
|
|
673cadc6bf | ||
|
|
2318e714db | ||
|
|
a6d27a2de5 | ||
|
|
dc842b0312 | ||
|
|
3879f5c7ef | ||
|
|
e01d93afa8 | ||
|
|
6ec8086b0a | ||
|
|
b80572c3b6 | ||
|
|
3f6fd51f45 | ||
|
|
87af82f022 | ||
|
|
020ca9a1cf | ||
|
|
beccc3d5b7 | ||
|
|
1d03bd7d13 | ||
|
|
13290294a6 | ||
|
|
1eef500c73 | ||
|
|
ca5135c8aa | ||
|
|
740a1d798e | ||
|
|
b68a086698 | ||
|
|
0e60ceb4d0 | ||
|
|
2030c16b22 | ||
|
|
79b1bca8f7 | ||
|
|
76b3d3e4d1 | ||
|
|
90d8731a03 | ||
|
|
85270c7047 | ||
|
|
c9e596e60a | ||
|
|
24d83e130a | ||
|
|
4fc19d4289 | ||
|
|
74ad11b44f | ||
|
|
051a6f1f67 | ||
|
|
3f7eb981e6 | ||
|
|
8ca152262e | ||
|
|
f17501f0e5 | ||
|
|
6cc8d7de05 | ||
|
|
d4f6db8479 | ||
|
|
7b22a8d966 | ||
|
|
c5cebeaa4f | ||
|
|
f1cf6c7be8 | ||
|
|
80303ddde5 | ||
|
|
89ee62ea14 | ||
|
|
a1959d20f3 | ||
|
|
810cb73203 | ||
|
|
38b9ed7fcd | ||
|
|
35b8f2375f | ||
|
|
aa619b5f93 | ||
|
|
c03d3032aa | ||
|
|
191cdd2bdc | ||
|
|
9d5c8759e5 | ||
|
|
a4b5c6e028 | ||
|
|
113b606091 | ||
|
|
a69e031835 | ||
|
|
ba38055bed | ||
|
|
3c086e8ff0 | ||
|
|
f9c26d8684 | ||
|
|
2ed9789f9c | ||
|
|
282108942b | ||
|
|
6c107a0d4e | ||
|
|
6e4ab6faae | ||
|
|
e8016edfc1 | ||
|
|
30839f7c2c | ||
|
|
89459a6c2e | ||
|
|
c49db8c083 | ||
|
|
fa6588fa80 | ||
|
|
7d74256664 | ||
|
|
2210660ae4 | ||
|
|
f2fc93b7f8 | ||
|
|
d54a2d9486 | ||
|
|
88015d6d4b | ||
|
|
f1ff75b846 | ||
|
|
1123755dc7 | ||
|
|
6a4f379ab7 | ||
|
|
9369cde9a3 | ||
|
|
a1d985b4ca | ||
|
|
b26854d3d7 | ||
|
|
cbb4b4c7bb | ||
|
|
1a1aa746d5 | ||
|
|
b4f5b5b98e | ||
|
|
fa3b651ee1 | ||
|
|
91d079be1e | ||
|
|
d16ea0a7ea | ||
|
|
6133bf6297 | ||
|
|
14e1420b7e | ||
|
|
10568a0270 | ||
|
|
53da058fe1 | ||
|
|
4d199fb03b | ||
|
|
f04cbbd99c | ||
|
|
e572ba8b6e | ||
|
|
45974e88be | ||
|
|
8140bf3e52 | ||
|
|
4570965af2 | ||
|
|
fcd250a557 | ||
|
|
b92e42e685 | ||
|
|
5daccf4268 | ||
|
|
e0903a0789 | ||
|
|
bcf1546fc2 | ||
|
|
92f53be666 | ||
|
|
8ae0bd7f16 | ||
|
|
754159e2bc | ||
|
|
3f817d655c | ||
|
|
572837d7ba | ||
|
|
fb8dcf4025 | ||
|
|
c7b77b5555 | ||
|
|
fe1ac8564a | ||
|
|
9230390937 | ||
|
|
14f926124d | ||
|
|
76e8489304 | ||
|
|
0e0b1973f0 | ||
|
|
a6666a4fbd | ||
|
|
3a66db200d |
36
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Contributors Guide
|
||||
|
||||
Please read and understand the contribution guide before creating an issue or pull request. We would like to thank [Nishad TR](https://github.com/nishad) for their contributor's guide, upon which we based ours.
|
||||
|
||||
## Etiquette
|
||||
|
||||
This project is open source, and as such, we (the maintainers) give our **free time** to build, maintain and **provide user support** for the CCExtractor program. We make the code freely available in the hope that it will be of use to other developers and users. It would be extremely unfair for us to suffer abuse or anger for our hard work.
|
||||
|
||||
Please be considerate towards the developers and other users when raising issues or presenting pull requests.
|
||||
|
||||
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the decision of the maintainers, and do not be upset or abusive if your submission is not used.
|
||||
|
||||
## Viability
|
||||
|
||||
When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many developers, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project.
|
||||
|
||||
## Procedure
|
||||
|
||||
**Before filing an issue**:
|
||||
|
||||
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
|
||||
- Check to make sure your feature suggestion isn't already present within the project.
|
||||
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
|
||||
- Check the pull requests tab to ensure that the feature isn't already in progress.
|
||||
|
||||
**Before submitting a pull request**:
|
||||
|
||||
- Ensure that your submission is [viable](#viability) for the project.
|
||||
- Check the codebase to ensure that your feature doesn't already exist.
|
||||
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
|
||||
|
||||
## Technical requirements
|
||||
|
||||
- Before Submitting your Pull Request, merge `master` with your new branch and fix any conflicts. (Make sure you don't break anything in development!)
|
||||
- Commit Unix line endings.
|
||||
- Make sure to reasonably test your code. We have a sample platform that runs a test-suite for you, but it only covers a general set of tests.
|
||||
36
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION].
|
||||
|
||||
CCExtractor version (using the --version parameter preferably) : **X.X**
|
||||
|
||||
**In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):**
|
||||
|
||||
- [ ] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md).
|
||||
- [ ] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
|
||||
- [ ] I have checked that the issue I'm posting isn't already reported.
|
||||
- [ ] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues)
|
||||
- [ ] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
|
||||
- [ ] I have used the latest available version of CCExtractor to verify this issue exists.
|
||||
|
||||
**My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):**
|
||||
|
||||
- [ ] I have never used CCExtractor.
|
||||
- [ ] I have used CCExtractor just a couple of times.
|
||||
- [ ] I absolutely love CCExtractor, but have not contributed previously.
|
||||
- [ ] I am an active contributor to CCExtractor.
|
||||
|
||||
**Necessary information**
|
||||
- Is this a regression (did it work before)? [ ] NO | [ ] YES - *please specify the last known working version*
|
||||
- What platform did you use? [ ] Windows - [ ] Linux - [ ] Mac
|
||||
- What were the used arguments? `-autoprogram`
|
||||
|
||||
**Video links (replace text below with your links) **
|
||||
|
||||
Please make the affected input file available for us (no screenshots, those don't help!). Public links to Dropbox, Google Drive, etc, are all fine. If it is not possible to make it available publicly, send us a private invitation (both Dropbox and Google Drive allow that). In this case we will download the file and upload it to the private developer repository.
|
||||
|
||||
Do *not* upload your file to any location that will require us to sign up or endure a wait list, slow downloads, etc. If your upload expires make sure you keep it active somehow (replace links if needed). Keep in mind that while we go over all tickets some may take a few days, and it's important we have the file available when we actually need it.
|
||||
|
||||
**Additional information**
|
||||
|
||||
{issue content here, replace this line with your issue content}
|
||||
|
||||
PS: Make sure you set an alert in GitHub so you get notifications about your ticket. We may need to ask questions and we do everything inside GitHub's system.
|
||||
20
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**.
|
||||
|
||||
**In raising this pull request, I confirm the following (please check boxes):**
|
||||
|
||||
- [ ] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md).
|
||||
- [ ] I have checked that another pull request for this purpose does not exist.
|
||||
- [ ] I have considered, and confirmed that this submission will be valuable to others.
|
||||
- [ ] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
|
||||
- [ ] I give this submission freely, and claim no ownership to its content.
|
||||
|
||||
**My familiarity with the project is as follows (check one):**
|
||||
|
||||
- [ ] I have never used CCExtractor.
|
||||
- [ ] I have used CCExtractor just a couple of times.
|
||||
- [ ] I absolutely love CCExtractor, but have not contributed previously.
|
||||
- [ ] I am an active contributor to CCExtractor.
|
||||
|
||||
---
|
||||
|
||||
{pull request content here}
|
||||
119
.gitignore
vendored
@@ -1,3 +1,9 @@
|
||||
####
|
||||
# Ignore tests tmp files and results
|
||||
tests/runtest
|
||||
tests/**/*.gcda
|
||||
tests/**/*.gcno
|
||||
|
||||
####
|
||||
# Ignore CVS related files
|
||||
|
||||
@@ -7,12 +13,123 @@ CVS
|
||||
####
|
||||
# Linux Ignored binary and build folder
|
||||
*.o
|
||||
*.so
|
||||
mac/ccextractor
|
||||
linux/ccextractor
|
||||
linux/depend
|
||||
windows/debug/*
|
||||
windows/Debug/**
|
||||
windows/Debug-OCR/**
|
||||
windows/Release/**
|
||||
windows/Release-Full/**
|
||||
windows/Release-OCR/**
|
||||
windows/Debug-Full/**
|
||||
windows/x64/**
|
||||
windows/ccextractor.VC.db
|
||||
build/
|
||||
|
||||
####
|
||||
# Python
|
||||
*.pyc
|
||||
|
||||
####
|
||||
# Visual Studio project Ignored files
|
||||
|
||||
*.suo
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.user
|
||||
*.opendb
|
||||
*.db
|
||||
*.vscode
|
||||
|
||||
####
|
||||
# Ignore the header file that is updated upon build
|
||||
src/lib_ccx/compile_info_real.h
|
||||
|
||||
#### Ignore windows OCR libraries and folders
|
||||
windows/libs/leptonica/**
|
||||
windows/libs/tesseract/**
|
||||
|
||||
# Ctags
|
||||
*.tags*
|
||||
tags
|
||||
|
||||
# Vagrant
|
||||
.vagrant/
|
||||
|
||||
# Eclipse stuff
|
||||
.cproject
|
||||
.project
|
||||
.settings/
|
||||
|
||||
# Mac
|
||||
.DS_Store
|
||||
windows/enc_temp_folder/*
|
||||
|
||||
#CMake
|
||||
src/cmake-build-debug/
|
||||
src/.idea/
|
||||
|
||||
|
||||
#Autotools
|
||||
linux/config.h
|
||||
linux/config.log
|
||||
linux/config.status
|
||||
linux/Makefile
|
||||
linux/autom4te.cache
|
||||
linux/aclocal.m4
|
||||
linux/*.in
|
||||
linux/configure
|
||||
linux/build-conf/
|
||||
mac/config.h
|
||||
mac/config.log
|
||||
mac/config.status
|
||||
mac/Makefile
|
||||
mac/autom4te.cache
|
||||
mac/aclocal.m4
|
||||
mac/*.in
|
||||
mac/configure
|
||||
mac/build-conf/
|
||||
package_creators/*tar.gz
|
||||
package_creators/build/*.deb
|
||||
src/.deps/
|
||||
src/.dirstamp
|
||||
src/gpacmp4/.deps/
|
||||
src/gpacmp4/.dirstamp
|
||||
src/lib_ccx/.deps/
|
||||
src/lib_ccx/.dirstamp
|
||||
src/lib_hash/.deps/
|
||||
src/lib_hash/.dirstamp
|
||||
src/libpng/.deps/
|
||||
src/libpng/.dirstamp
|
||||
src/protobuf-c/.deps/
|
||||
src/protobuf-c/.dirstamp
|
||||
src/utf8proc/.deps/
|
||||
src/utf8proc/.dirstamp
|
||||
src/zlib/.deps/
|
||||
src/zlib/.dirstamp
|
||||
src/zvbi/.deps/
|
||||
src/zvbi/.dirstamp
|
||||
|
||||
# Arch
|
||||
package_creators/*.pkg.tar.xz
|
||||
|
||||
#RPMs
|
||||
package_creators/*.rpm
|
||||
src/lib_ccx/ccx.pc
|
||||
windows/combase.pdb/
|
||||
src/**/.deps
|
||||
src/**/.dirstamp
|
||||
mac/ccextractorGUI
|
||||
linux/ccextractorGUI
|
||||
linux/CMakeCache.txt
|
||||
linux/CMakeFiles/
|
||||
linux/cmake_install.cmake
|
||||
linux/install_manifest.txt
|
||||
linux/lib_ccx/
|
||||
mac/lib_ccx/
|
||||
mac/install_manifest.txt
|
||||
mac/cmake_install.cmake
|
||||
mac/CMakeFiles/
|
||||
mac/CMakeCache.txt
|
||||
*.py.bak
|
||||
|
||||
25
.travis.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
language: c
|
||||
os:
|
||||
- osx
|
||||
- linux
|
||||
|
||||
sudo:
|
||||
- true
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
before_install:
|
||||
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew upgrade automake; brew install pkg-config autoconf automake libtool tesseract leptonica; fi
|
||||
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install -y libcurl4-gnutls-dev tesseract-ocr tesseract-ocr-dev libleptonica-dev autoconf-archive; fi
|
||||
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install python-distutils-extra tesseract-ocr tesseract-ocr-eng libopencv-dev libtesseract-dev libleptonica-dev python-all-dev swig libcv-dev python-opencv python-numpy python-setuptools build-essential subversion; fi
|
||||
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then wget https://github.com/DanBloomberg/leptonica/releases/download/1.74.4/leptonica-1.74.4.tar.gz && tar xvf leptonica-1.74.4.tar.gz; cd leptonica-1.74.4; ./configure && make && sudo make install; cd ..; fi
|
||||
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then git clone https://github.com/tesseract-ocr/tesseract.git; cd tesseract; ./autogen.sh; ./configure --enable-debug; LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make; sudo make install; sudo ldconfig; cd ..; fi
|
||||
|
||||
script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd mac; ./build.command; cd ..; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd mac; ./autogen.sh; ./configure; make; cd ..; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd linux; ./build; cd ..; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir build; cd build; cmake ../src/; make; cd ..; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd linux; ./autogen.sh; ./configure; make; cd ..; fi
|
||||
339
LICENSE.txt
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 of the License, 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -4,7 +4,7 @@ MAINTAINER = Marc Espie <espie@openbsd.org>
|
||||
CATEGORIES = multimedia
|
||||
COMMENT = closed caption subtitles extractor
|
||||
HOMEPAGE = http://ccextractor.sourceforge.net/
|
||||
V = 0.75
|
||||
V = 0.77
|
||||
DISTFILES = ccextractor.${V:S/.//}-src.zip
|
||||
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=ccextractor/}
|
||||
DISTNAME = ccextractor-$V
|
||||
|
||||
84
README.md
@@ -1,12 +1,80 @@
|
||||
ccextractor
|
||||
===========
|
||||
<img src ="https://github.com/CCExtractor/ccextractor-org-media/blob/master/static/ccx_logo_transparent_800x600.png" width="200px" alt="logo" />
|
||||
|
||||
Carlos' version (mainstream) is the most stable branch.
|
||||
# CCExtractor
|
||||
|
||||
Extracting subtitles has never been so easy. Just type the following command:
|
||||
ccextrator "name of input"
|
||||
[](https://travis-ci.org/CCExtractor/ccextractor)
|
||||
[](https://sampleplatform.ccextractor.org/test/master/windows)
|
||||
[](https://sampleplatform.ccextractor.org/test/master/linux)
|
||||
[](https://sourceforge.net/projects/ccextractor/)
|
||||
|
||||
Gui lovers should download the Sorceforge version of CCExtractor, the Git Version is not your cup of tea.
|
||||
http://ccextractor.sourceforge.net/download-ccextractor.html
|
||||
CCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.
|
||||
|
||||
For News about release, please find CHANGES.TXT
|
||||
Subtitles are important for many people. If you're learning a new language, subtitles are a great way to learn it from movies or TV shows. If you are hard of hearing, subtitles can help you better understand what's happening on the screen. We aim to make it easy to generate subtitles by using the command line tool or Windows GUI.
|
||||
|
||||
The official repository is ([CCExtractor/ccextractor](https://github.com/CCExtractor/ccextractor)) and master being the most stable branch.
|
||||
|
||||
### **Features**
|
||||
|
||||
- Extract subtitles in real-time
|
||||
- Translate subtitles
|
||||
- Extract closed captions from DVDs
|
||||
- Convert closed captions to subtitles
|
||||
|
||||
### Programming Languages & Technologies
|
||||
|
||||
The core functionality is written in C. Other languages used include C++ and Python.
|
||||
|
||||
## Google Code-in 2018
|
||||
|
||||
CCExtractor is participating in Google Code-in 2018!
|
||||
|
||||
Google Code-in is a competition of encouraging young people to learn more about Open Source and contributing to it. Tasks range from coding, documentation, quality assurance, design, outreach and research.
|
||||
|
||||
This is our third year of participating and creating challenging tasks for pre-university students aged 13-17.
|
||||
|
||||
If you are a student fitting the age criteria, interested to contribute to CCExtractor feel free to join us. You can read more at the [Google Code-in website](https://codein.withgoogle.com).
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
Downloads for precompiled binaries and source code can be found [on our website](https://www.ccextractor.org?id=public:general:downloads).
|
||||
|
||||
Extracting subtitles is relatively simple. Just run the following command:
|
||||
|
||||
`ccextractor <input>`
|
||||
|
||||
This will extract the subtitles.
|
||||
|
||||
More usage information can be found on our website:
|
||||
|
||||
- [Using the command line tool](https://www.ccextractor.org/doku.php?id=public:general:command_line_usage)
|
||||
- [Using the Windows GUI](https://www.ccextractor.org/doku.php?id=public:general:win_gui_usage)
|
||||
|
||||
You can also find the list of parameters and their brief description by running `ccextractor` without any arguments.
|
||||
|
||||
## Compiling CCExtractor
|
||||
|
||||
To learn more about how to compile and build CCExtractor for your platform check the [compilation guide](https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD).
|
||||
|
||||
## Support
|
||||
|
||||
By far the best way to get support is by opening an issue at our [issue tracker](https://github.com/CCExtractor/ccextractor/issues).
|
||||
|
||||
When you create a new issue, please fill in the needed details in the provided template. That makes it easier for us to help you more efficiently.
|
||||
|
||||
If you have a question or a problem you can also [contact us by email or chat with the team in Slack](https://www.ccextractor.org/doku.php?id=public:general:support).
|
||||
|
||||
If you want to contribute to CCExtractor but can't submit some code patches or issues or video samples, you can also [donate to us](https://www.ccextractor.org/public:general:http:sourceforge.net_donate_index.php?group_id=190832)
|
||||
|
||||
## Contributing
|
||||
|
||||
You can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository. We have some rules, outlined in the [contributor's guide](.github/CONTRIBUTING.md).
|
||||
|
||||
## News & Other Information
|
||||
|
||||
News about releases and modifications to the code can be found in the [CHANGES.TXT](docs/CHANGES.TXT) file.
|
||||
|
||||
For more information visit the CCExtractor website: [https://www.ccextractor.org](https://www.ccextractor.org)
|
||||
|
||||
## License
|
||||
|
||||
GNU General Public License version 2.0 (GPL-2.0)
|
||||
|
||||
16
Vagrantfile
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "ubuntu/xenial64"
|
||||
|
||||
# Uncomment this line if you want to sync other folders
|
||||
# config.vm.synced_folder "/home/user/video", "/video"
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
sudo apt-get install -y gcc
|
||||
sudo apt-get install -y libcurl4-gnutls-dev
|
||||
sudo apt-get install -y tesseract-ocr
|
||||
sudo apt-get install -y tesseract-ocr-dev
|
||||
sudo apt-get install -y libleptonica-dev
|
||||
SHELL
|
||||
|
||||
end
|
||||
|
||||
40
api/api_support.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from builtins import str
|
||||
import ccextractor as cc
|
||||
import ccx_to_python_g608 as g608
|
||||
import python_srt_generator as srt_generator
|
||||
text,font,color = [],[],[]
|
||||
filename = " "
|
||||
srt_counter = " "
|
||||
def generate_output_srt(line, encoding):
|
||||
global text,font,color
|
||||
global filename, srt_counter
|
||||
if "filename:" in line:
|
||||
filename = str(str(line.split(":")[1]).split("\n")[0])
|
||||
with open(filename, 'w+') as fh:
|
||||
pass
|
||||
elif "srt_counter-" in line:
|
||||
srt_counter = str(line.split("-")[1])
|
||||
with open(filename, 'a+') as fh:
|
||||
fh.write(srt_counter)
|
||||
elif "start_time" in line:
|
||||
with open(filename, 'a+') as fh:
|
||||
data = line.split("-")
|
||||
end_time = str(data[-1].split("\n")[0])
|
||||
start_time = str(data[1].split("\t")[0])
|
||||
fh.write(start_time)
|
||||
fh.write(" --> ")
|
||||
fh.write(end_time)
|
||||
fh.write("\n")
|
||||
fh.flush()
|
||||
elif "***END OF FRAME***" in line:
|
||||
d={}
|
||||
d['text']=text
|
||||
d['color']=color
|
||||
d['font']=font
|
||||
srt_generator.generate_output_srt(filename,d, encoding)
|
||||
text,font,color = [],[],[]
|
||||
else:
|
||||
g608.g608_grid_former(line,text,color,font)
|
||||
|
||||
|
||||
|
||||
38
api/api_testing.py
Normal file
@@ -0,0 +1,38 @@
|
||||
from __future__ import print_function
|
||||
###
|
||||
#MANDATORY UPDATES IN EVERY PYTHON SCRIPT
|
||||
###
|
||||
import sys
|
||||
|
||||
import ccextractor as cc
|
||||
|
||||
|
||||
def callback(line, encoding):
|
||||
print(line)
|
||||
|
||||
|
||||
def init_ccextractor(callback):
|
||||
"""
|
||||
:param callback: The callback which we use to handle
|
||||
the extracted subtitle info
|
||||
:return return the initialized options
|
||||
"""
|
||||
optionos = cc.api_init_options()
|
||||
cc.check_configuration_file(optionos)
|
||||
for arg in sys.argv[1:]:
|
||||
cc.api_add_param(optionos, arg)
|
||||
compile_ret = cc.compile_params(optionos, len(sys.argv[1:]))
|
||||
|
||||
# use my_pythonapi to add callback in C source code
|
||||
cc.my_pythonapi(optionos, callback)
|
||||
|
||||
return optionos
|
||||
|
||||
|
||||
def main():
|
||||
options = init_ccextractor(callback)
|
||||
cc.api_start(options)
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
main()
|
||||
97
api/build_api
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DPYTHON_API"
|
||||
BLD_INCLUDE="-I/usr/include/python2.7/ -I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
|
||||
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
||||
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
||||
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
||||
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
||||
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
|
||||
SRC_FREETYPE="../src/freetype/autofit/autofit.c
|
||||
../src/freetype/base/ftbase.c
|
||||
../src/freetype/base/ftbbox.c
|
||||
../src/freetype/base/ftbdf.c
|
||||
../src/freetype/base/ftbitmap.c
|
||||
../src/freetype/base/ftcid.c
|
||||
../src/freetype/base/ftfntfmt.c
|
||||
../src/freetype/base/ftfstype.c
|
||||
../src/freetype/base/ftgasp.c
|
||||
../src/freetype/base/ftglyph.c
|
||||
../src/freetype/base/ftgxval.c
|
||||
../src/freetype/base/ftinit.c
|
||||
../src/freetype/base/ftlcdfil.c
|
||||
../src/freetype/base/ftmm.c
|
||||
../src/freetype/base/ftotval.c
|
||||
../src/freetype/base/ftpatent.c
|
||||
../src/freetype/base/ftpfr.c
|
||||
../src/freetype/base/ftstroke.c
|
||||
../src/freetype/base/ftsynth.c
|
||||
../src/freetype/base/ftsystem.c
|
||||
../src/freetype/base/fttype1.c
|
||||
../src/freetype/base/ftwinfnt.c
|
||||
../src/freetype/bdf/bdf.c
|
||||
../src/freetype/bzip2/ftbzip2.c
|
||||
../src/freetype/cache/ftcache.c
|
||||
../src/freetype/cff/cff.c
|
||||
../src/freetype/cid/type1cid.c
|
||||
../src/freetype/gzip/ftgzip.c
|
||||
../src/freetype/lzw/ftlzw.c
|
||||
../src/freetype/pcf/pcf.c
|
||||
../src/freetype/pfr/pfr.c
|
||||
../src/freetype/psaux/psaux.c
|
||||
../src/freetype/pshinter/pshinter.c
|
||||
../src/freetype/psnames/psnames.c
|
||||
../src/freetype/raster/raster.c
|
||||
../src/freetype/sfnt/sfnt.c
|
||||
../src/freetype/smooth/smooth.c
|
||||
../src/freetype/truetype/truetype.c
|
||||
../src/freetype/type1/type1.c
|
||||
../src/freetype/type42/type42.c
|
||||
../src/freetype/winfonts/winfnt.c"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
# the `swig -python ccextractor.i` will generate ccextractor_wrap.c
|
||||
BLD_SOURCES="../src/ccextractor.c ccextractor_wrap.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $API_WRAPPERS $SRC_FREETYPE"
|
||||
|
||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept -l python3.6m"
|
||||
|
||||
echo "Running pre-build script..."
|
||||
../linux/pre-build.sh
|
||||
echo "Trying to compile..."
|
||||
|
||||
|
||||
out=$((swig -python ccextractor.i && LC_ALL=C gcc -fPIC -c $BLD_FLAGS $BLD_INCLUDE $BLD_SOURCES $BLD_LINKER)2>&1)
|
||||
res=$?
|
||||
if [[ $out == *"gcc: command not found"* ]]
|
||||
then
|
||||
echo "Error: please install gcc";
|
||||
exit 1
|
||||
fi
|
||||
if [[ $out == *"curl.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install curl development library (libcurl4-gnutls-dev for Debian/Ubuntu)";
|
||||
exit 2
|
||||
fi
|
||||
if [[ $out == *"capi.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install tesseract development library (tesseract-ocr-dev for Debian/Ubuntu)";
|
||||
exit 3
|
||||
fi
|
||||
if [[ $out == *"allheaders.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install leptonica development library (libleptonica-dev for Debian/Ubuntu)";
|
||||
exit 4
|
||||
fi
|
||||
if [[ $res -ne 0 ]] # Unknown error
|
||||
then
|
||||
echo "Compiled with errors"
|
||||
>&2 echo "$out"
|
||||
exit 5
|
||||
fi
|
||||
if [[ "$out" != "" ]] ; then
|
||||
echo "$out"
|
||||
echo "Compilation successful, compiler message shown in previous lines"
|
||||
else
|
||||
echo "Compilation successful, no compiler messages."
|
||||
fi
|
||||
34
api/build_library
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept -l python2.7"
|
||||
WRAPPER_FLAGS="-Wl,-wrap,write"
|
||||
|
||||
out=$((./build_api && gcc -shared $(find -name '*.o') -o _ccextractor.so $BLD_LINKER)2>&1)
|
||||
res=$?
|
||||
if [[ $out == *"gcc: command not found"* ]]
|
||||
then
|
||||
echo "Error: please install gcc";
|
||||
exit 1
|
||||
fi
|
||||
if [[ $out == *"curl.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install curl development library (libcurl4-gnutls-dev for Debian/Ubuntu)";
|
||||
exit 2
|
||||
fi
|
||||
if [[ $out == *"capi.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install tesseract development library (tesseract-ocr-dev for Debian/Ubuntu)";
|
||||
exit 3
|
||||
fi
|
||||
if [[ $out == *"allheaders.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install leptonica development library (libleptonica-dev for Debian/Ubuntu)";
|
||||
exit 4
|
||||
fi
|
||||
if [[ $res -ne 0 ]] # Unknown error
|
||||
then
|
||||
echo "Compiled with errors"
|
||||
>&2 echo "$out"
|
||||
exit 5
|
||||
fi
|
||||
rm *.o
|
||||
echo "Compilation successful";
|
||||
18
api/ccextractor.i
Normal file
@@ -0,0 +1,18 @@
|
||||
%module ccextractor
|
||||
%{
|
||||
#define SWIG_FILE_WITH_INIT
|
||||
#include "../src/lib_ccx/lib_ccx.h"
|
||||
#include "../src/lib_ccx/configuration.h"
|
||||
#include "../src/lib_ccx/ccx_common_option.h"
|
||||
#include "../src/lib_ccx/ccx_mp4.h"
|
||||
#include "../src/lib_ccx/hardsubx.h"
|
||||
#include "../src/lib_ccx/ccx_share.h"
|
||||
#include "../src/ccextractor.h"
|
||||
#include "../src/wrappers/wrapper.h"
|
||||
%}
|
||||
struct ccx_s_options* api_init_options();
|
||||
void check_configuration_file(struct ccx_s_options api_options);
|
||||
int compile_params(struct ccx_s_options *api_options,int argc);
|
||||
void api_add_param(struct ccx_s_options* api_options,char* arg);
|
||||
int api_start(struct ccx_s_options api_options);
|
||||
void my_pythonapi(struct ccx_s_options *api_options, PyObject *func);
|
||||
63
api/ccx_to_python_g608.py
Normal file
@@ -0,0 +1,63 @@
|
||||
from __future__ import print_function
|
||||
from builtins import str
|
||||
def g608_grid_former(line,text,color,font):
|
||||
if "text[" in line:
|
||||
line = str(line.split(":", 1)[1])
|
||||
line = str(line.split("\n")[0])
|
||||
text.append(line)
|
||||
if "color[" in line:
|
||||
line = str(line.split(":", 1)[1])
|
||||
line = str(line.split("\n")[0])
|
||||
color.append(line)
|
||||
if "font[" in line:
|
||||
line = str(line.split(":", 1)[1])
|
||||
line = str(line.split("\n")[0])
|
||||
font.append(line)
|
||||
|
||||
def return_g608_grid(case,text,color,font):
|
||||
ret_val = {'text':" ",'color':" ",'font':" "}
|
||||
help_string = """
|
||||
Case is the value that would give the desired output.
|
||||
case = 0 --> print start_time,end_time,text,color,font
|
||||
case = 1 --> print start_time,end_time,text
|
||||
case = 2 --> print start_time,end_time,color
|
||||
case = 3 --> print start_time,end_time,font
|
||||
case = 4 --> print start_time,end_time,text,color
|
||||
case = 5 --> print start_time,end_time,text,font
|
||||
case = 6 --> print start_time,end_time,color,font
|
||||
"""
|
||||
if case==0:
|
||||
if text:
|
||||
ret_val['text']=text
|
||||
if color:
|
||||
ret_val['color']=color
|
||||
if font:
|
||||
ret_val['font']=font
|
||||
|
||||
elif case==1:
|
||||
if text:
|
||||
ret_val['text']=text
|
||||
elif case==2:
|
||||
if color:
|
||||
ret_val['color']=color
|
||||
elif case==3:
|
||||
if font:
|
||||
ret_val['font']=font
|
||||
elif case==4:
|
||||
if text:
|
||||
ret_val['text']=text
|
||||
if color:
|
||||
ret_val['color']=color
|
||||
elif case==5:
|
||||
if text:
|
||||
ret_val['text']=text
|
||||
if font:
|
||||
ret_val['font']=font
|
||||
elif case==6:
|
||||
if color:
|
||||
ret_val['color']=color
|
||||
if font:
|
||||
ret_val['font']=font
|
||||
else:
|
||||
print(help_string)
|
||||
return ret_val
|
||||
155
api/python_srt_generator.py
Normal file
@@ -0,0 +1,155 @@
|
||||
from __future__ import print_function
|
||||
from builtins import zip
|
||||
from builtins import str
|
||||
import ccextractor as cc
|
||||
import re
|
||||
"""
|
||||
#Handling underline
|
||||
buff = ""
|
||||
underline_flag = 0
|
||||
for i,font_type in enumerate(font_line):
|
||||
if font_type == 'U' and not underline_flag:
|
||||
buff = buff + '<u> '
|
||||
underline_flag = 1
|
||||
underline=1
|
||||
elif font_type =="R" and underline_flag:
|
||||
buff = buff + '</u>'
|
||||
underline_flag = 0
|
||||
continue;
|
||||
buff += letter[i]
|
||||
#adding a new line after buff has seen underline
|
||||
#need to cross check with CCExtractor output as to how they are doing
|
||||
if underline:
|
||||
buff+= "\n"
|
||||
else:
|
||||
buff=""
|
||||
"""
|
||||
encodings_map = {
|
||||
'0':'unicode',
|
||||
'1':'latin1',
|
||||
'2':'utf-8',
|
||||
'3':'ascii',
|
||||
}
|
||||
|
||||
color_text_start={
|
||||
"0":"",
|
||||
"1":"<font color=\"#00ff00\">",
|
||||
"2":"<font color=\"#0000ff\">",
|
||||
"3":"<font color=\"#00ffff\">",
|
||||
"4":"<font color=\"#ff0000\">",
|
||||
"5":"<font color=\"#ffff00\">",
|
||||
"6":"<font color=\"#ff00ff\">",
|
||||
"7":"<font color=\"",
|
||||
"8":"",
|
||||
"9":""
|
||||
};
|
||||
color_text_end={
|
||||
"0":"",
|
||||
"1":"</font",
|
||||
"2":"</font>",
|
||||
"3":"</font>",
|
||||
"4":"</font>",
|
||||
"5":"</font>",
|
||||
"6":"</font>",
|
||||
"7":"</font>",
|
||||
"8":"",
|
||||
"9":""
|
||||
};
|
||||
no_color_tag = ['0','8','9']
|
||||
def comparing_text_font_grids(text, font, color):
|
||||
original_text = text
|
||||
original_color = color
|
||||
temp_color = []
|
||||
for letter,color_line in zip(original_text,color):
|
||||
color = 0
|
||||
prev = color_line[0]
|
||||
buff = color_text_start[str(prev)]
|
||||
if prev not in no_color_tag:
|
||||
color_flag = 1
|
||||
else:
|
||||
color_flag = 0
|
||||
if letter.count(" ")<32:
|
||||
for i,color_type in enumerate(color_line):
|
||||
if color_type not in no_color_tag and prev!=color_type and not color_flag:
|
||||
color = 1
|
||||
buff = buff + color_text_start[str(color_type)]
|
||||
color_flag = 1
|
||||
elif prev!=color_type and color_flag:
|
||||
color = 1
|
||||
buff = buff + color_text_end[str(prev)]
|
||||
color_flag = 0
|
||||
buff += letter[i]
|
||||
prev=color_type
|
||||
if color_flag:
|
||||
color_flag=0
|
||||
buff+=color_text_end[str(prev)]
|
||||
if color:
|
||||
temp_color.append((buff,1))
|
||||
else:
|
||||
temp_color.append((letter,0))
|
||||
temp_font_italics=[]
|
||||
for letter,font_line in zip(original_text,font):
|
||||
if letter.count(" ")<32:
|
||||
buff=""
|
||||
underline,italics = 0,0
|
||||
#Handling italics
|
||||
italics_flag = 0
|
||||
for i,font_type in enumerate(font_line):
|
||||
if font_type == 'I' and not italics_flag:
|
||||
italics=1
|
||||
buff = buff + '<i>'
|
||||
italics_flag = 1
|
||||
elif font_type =="R" and italics_flag:
|
||||
italics=1
|
||||
buff = buff + '</i>'
|
||||
italics_flag = 0
|
||||
buff += letter[i]
|
||||
if italics_flag:
|
||||
buff+='</i>'
|
||||
if italics:
|
||||
temp_font_italics.append((buff,1))
|
||||
else:
|
||||
temp_font_italics.append((letter,0))
|
||||
else:
|
||||
temp_font_italics.append((letter,0))
|
||||
final = []
|
||||
for i,j in zip(temp_color,temp_font_italics):
|
||||
if i[1] and not j[1]:
|
||||
final.append(i[0])
|
||||
elif j[1] and not i[1]:
|
||||
final.append(j[0])
|
||||
else:
|
||||
if not i[1]:
|
||||
final.append(i[0])
|
||||
else:
|
||||
print("error")
|
||||
return (final,font,color)
|
||||
|
||||
|
||||
def generate_output_srt(filename,d, encoding):
|
||||
if encoding in list(encodings_map.keys()):
|
||||
if encoding!='0':
|
||||
encoding_format = encodings_map[encoding]
|
||||
else:
|
||||
encoding_format = ""
|
||||
else:
|
||||
print("encoding error in python")
|
||||
return
|
||||
if encoding_format:
|
||||
d['text'] = [str(item,encoding_format) for item in d['text']]
|
||||
else:
|
||||
d['text'] = [str(item) for item in d['text']]
|
||||
d['text'],d['font'],d['color']= comparing_text_font_grids(d['text'],d['font'],d['color'])
|
||||
for item in d['text']:
|
||||
if item.count(" ")<32:
|
||||
o=item
|
||||
with open(filename,'ab+') as fh:
|
||||
if encoding_format:
|
||||
fh.write(o.encode(encoding_format))
|
||||
else:
|
||||
fh.write(str(o))
|
||||
fh.write("\n")
|
||||
fh.flush()
|
||||
with open(filename,'ab+') as fh:
|
||||
fh.write("\n")
|
||||
fh.flush()
|
||||
26
api/recursive_tester.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
output_formats = ['.srt','.ass','.ssa','.webvtt','.sami','.txt','.original','.python','.py']
|
||||
args_list = sys.argv[1:]
|
||||
args_count = len(args_list)
|
||||
if args_count>1:
|
||||
print("wrong usage")
|
||||
exit(0)
|
||||
directory = args_list[0]
|
||||
if not os.path.isdir(directory):
|
||||
print("error: path given is not a directory")
|
||||
exit(0)
|
||||
files = []
|
||||
for item in os.listdir(directory):
|
||||
ext = os.path.splitext(item)[1]
|
||||
if ext not in output_formats:
|
||||
files.append(os.path.join(directory,item))
|
||||
for sample in files:
|
||||
print("Processing file: "+sample)
|
||||
#command=['../linux/ccextractor',sample]
|
||||
command = ['python','api_testing.py',sample]
|
||||
subprocess.call(command)
|
||||
print("Finished processing file: "+sample)
|
||||
@@ -28,4 +28,17 @@ To do:
|
||||
CCExtractor fully support Asian languages. I do need samples
|
||||
though. No samples, no support.
|
||||
- A few commands are not yet supported, specifically those related
|
||||
to delay.
|
||||
to delay.
|
||||
- Detect and extract captions from MP4 (MOV) files, handled by gpacmp4
|
||||
|
||||
Done (18.08.2015):
|
||||
|
||||
- Major refactoring
|
||||
- Librarized as much as possible (global vars moved to dtvcc context)
|
||||
- Added some control commands support
|
||||
- 16 bit charset support added (not "moved everything to 16-bit", but they could be successfully exported)
|
||||
- SAMI output added
|
||||
- Transcript output added
|
||||
- Timed transcript output added
|
||||
- Added colour support (only one colour/style can be applied for the whole screen at the moment)
|
||||
- Roll up captions handling
|
||||
|
||||
85
docs/AUTHORS.TXT
Normal file
@@ -0,0 +1,85 @@
|
||||
ccextractor was originally a mildly optimized C port of McPoodle's excellent
|
||||
but painfully slow Perl script SCC_RIP. That port (ccextractor 0.01) was
|
||||
written by Carlos Fernández (cfsmp3).
|
||||
|
||||
After a number of versions that did something semiuseful Volker Quetschke
|
||||
joined the effort and together Carlos and Volker to CCExtractor a point in
|
||||
which it was actually really usable, at least for the cases that interested
|
||||
them.
|
||||
|
||||
Unfortunately Volker moved on once CCExtractor did what he needed to do for
|
||||
him.
|
||||
|
||||
At some point David Liontooth from UCLA started to use CCExtractor as a
|
||||
replacement for libzvbi because libzvbi wasn't working for some specific
|
||||
streams. UCLA became the primary key user as they were using CCExtractor
|
||||
24x7 to process a huge amount of stream from several countries, and was
|
||||
therefore able to provide samples, proper bug reports, etc.
|
||||
|
||||
At that time CCEXtractor was still US-centric, because it was originally
|
||||
written so Carlos could get subtitles for US TV shows. But UCLA wanted
|
||||
European subtitles too, and they already had recording nodes in Denmark
|
||||
(which use teletext) and Spain (which uses DVB).
|
||||
|
||||
For teletext a good solution existed already: Petr Kutalek's telxcc.
|
||||
We contacted Petr and asked for permission to integrate his code into
|
||||
CCExtractor. Petr's absolutely brilliantly clean code was easy to
|
||||
integrate and build upon - and with it, we added support for the first
|
||||
kind of European subtitles.
|
||||
|
||||
Around that time, we decided to apply for Google Summer of Code. That
|
||||
was also a game changer, with Willem, Ruslan and Anshul being the first
|
||||
3 students. They are still around, now as mentors and year round
|
||||
contributors.
|
||||
|
||||
Since them, many more people have been involved: More than 10 as
|
||||
Google Summer of Code students, Code-In students, companies that
|
||||
sponsored development by hiring team members to do custom development
|
||||
(Comcast was the first one, and we'll always be grateful for the
|
||||
opportunity).
|
||||
|
||||
List of students is below (if they added themselves). For a complete
|
||||
list, just check the pull requests at GitHub.
|
||||
|
||||
Home: https://www.ccextractor.org
|
||||
|
||||
Google Summer of Code 2014 students
|
||||
- Willem Van Iseghem
|
||||
- Ruslan Kuchumov
|
||||
- Anshul Maheshwari
|
||||
|
||||
Google Summer of Code 2015 students
|
||||
- Willem Van Iseghem
|
||||
- Ruslan Kuchumov
|
||||
- Anshul Maheshwari
|
||||
- Nurendra Choudhary
|
||||
- Oleg Kiselev
|
||||
- Vasanth Kalingeri
|
||||
|
||||
Google Summer of Code 2016 students
|
||||
- Willem Van Iseghem
|
||||
- Ruslan Kuchumov
|
||||
- Abhishek Vinjamoori
|
||||
- Abhinav Shukla
|
||||
- Rishabh Garg
|
||||
|
||||
Google Code-in 2016 students
|
||||
- Evgeny Shulgin
|
||||
- Manveer Basra
|
||||
- Alexandru Bratosin
|
||||
- Matej Plavevski
|
||||
- Danila Fedorin
|
||||
|
||||
Google Code-in 2017 students
|
||||
- Matej Plavevski
|
||||
- Harry Yu
|
||||
- Theodore Fabian
|
||||
- Nikunj Taneja
|
||||
- John Chew
|
||||
- Aadi Bajpai
|
||||
- Wiliam(Hori75)
|
||||
|
||||
Google Summer of Code 2017 students
|
||||
- Diptanshu Jamgade
|
||||
- Mayank Gupta
|
||||
|
||||
337
docs/CHANGES.TXT
@@ -1,8 +1,285 @@
|
||||
0.87 (2018-10-23)
|
||||
-----------------
|
||||
- New: Upgrade libGPAC to 0.7.1.
|
||||
- New: mp4 tx3g & multitrack subtitles.
|
||||
- New: Guide to update dependencies (docs/Updating_Dependencies.txt).
|
||||
- New: Add LICENSE File (#959).
|
||||
- New: Display quantisation mode in info box (#954).
|
||||
- New: Add instruction required to build ccextractor with HARDSUBX support (#946).
|
||||
- New: Added version no. of libraries to --version.
|
||||
- New: Added -quant (OCR quantization function).
|
||||
- New: Python API now compatible with Python 3.
|
||||
- Fix: linux/builddebug: Added non-local directories to the incluye search path so we don't
|
||||
require a locally compiled tesseract or leptonica.
|
||||
- Fix: Correct -HARDSUBX Bug In CMake, allow build with hardsubx using cmake (#966).
|
||||
- Fix: possible segfaults in hardsubx_classifier.c due to strdup (#963).
|
||||
- Fix: Improve the start and end timestamps of extracted burned in captions (#962).
|
||||
- Fix: Update COMPILATION.md (#960).
|
||||
- Fix: Fixed crash with "-out=report" and "-out=null".
|
||||
- Fix: -nocf not working with OCR'ing (#958).
|
||||
- Fix: segfault in add_cc_sub_text and initialize to NULL in init_encoder (#950).
|
||||
- Fix: ccx_decoders_common.c: Copy data type when creating a copy of the subtitle structure.
|
||||
- Fix: Implicit declaration of these functions throws warning during build (#948).
|
||||
- Fix: ccx_decoders_common.c: Properly release allocated resources on free_subtitle().
|
||||
- Fix: Added a datatype member to struct cc_subtitle - needed so we can properly free all
|
||||
memory when void *data points to a structure that has its own pointers.
|
||||
- Fix: dvb_subtitle_decoder.c: When combining image regions verify that the offset is
|
||||
never negative.
|
||||
- Fix: Updated traivis.yml to fix osx build (#947).
|
||||
- Fix: Add utf8proc src file to cmake, updated header file (#944).
|
||||
- Fix: Added required pointers on freep() calls.
|
||||
- Fix: Removed dvb_debug_traces_to_stdout and used the usual dbg_print instead.
|
||||
- Fix: Additional debug traces for DVB.
|
||||
- Fix: Fix minor memory leak in ocr.c.
|
||||
- Fix: Fix issue with displaying utf8proc version.
|
||||
- Fix: Fix failing cmake due to liblept/tesseract header files.
|
||||
- Fix: Added missing \n in params.c.
|
||||
- Fix: builddebug: Use -fsanitize=address -fno-omit-frame-pointer.
|
||||
- Fix: ccx_decoders_common.c: Removed trivial memory leak.
|
||||
- Fix: ccx_encoders_srt.c: Made sure a pointer is non-NULL before dereferencing.
|
||||
- Fix: dvb_subtitle_decoder.c: Initialize pointer members to NULL when creating a structure.
|
||||
- Fix: lib_ccx.c: Initialize (memset 0) structure cc_subtitle after memory allocation.
|
||||
- Fix: Added verboseness to error/warnings in dvb_subtitle_decoder.c.
|
||||
- Fix: dvb_subtitle_decoder.c: Work on passing invalid streams errors upstream (plus some
|
||||
warning messages) so we can eventually recover from this situation instead of crashing.
|
||||
- Fix: telxcc.c: Currently setting a colour doesn't necessarily add a space even though the
|
||||
specifications mandate it. (#930).
|
||||
- Fix: dvb_subtitle_decoder.c: Fix null pointer derefence when region==NULL in write_dvb_sub.
|
||||
- Fix: DVB Teletext subtitle incomplete.
|
||||
- Fix: replace all 0xA characters within startbox with 0x20.
|
||||
- Fix: DVB Teletext subtitle incomplete (#922).
|
||||
- Fix: Add missing return value to one of the returns in process_tx3g().
|
||||
- Fix: Typos and other minor bugs.
|
||||
- Fix: Tidy CMakeLists & vcxproj (#920).
|
||||
- Fix: Added m2ts and -mxf to help screen.
|
||||
- Fix: Added MKV to demuxer_print_cfg.
|
||||
- Fix: Added MXF to demuxer_print_cfg.
|
||||
- Fix: "Out of order packets" error had wrong print() parameters.
|
||||
- Fix: Updated Python documentation.
|
||||
- Fix: Fix incorrect path in XML (#904).
|
||||
- Fix: linux build script (non-debug): Don't hide warnings from compiler.
|
||||
- Fix: linux build script (debug): Display what's step of the build script we're in.
|
||||
- Fix: Make the build reproducible (#976).
|
||||
- Fix: Remove instance of o1 and o2 from help.
|
||||
- Fix: Colors of DVB subtitles with depth 2 broken due to a missing break.
|
||||
- Fix: CEA-708: Caption loss due to CW command (#991).
|
||||
- Fix: CEA-708: Update patch for windows priority with functions (#990).
|
||||
|
||||
0.86 (2018-01-09)
|
||||
-----------------
|
||||
- New: Preliminary MXF support
|
||||
- New: Added a histogram in one-minute increments of the number of lines in a subtitle.
|
||||
- New: Added Autoconf build scripts for CCExtractor to generate makefiles (mac).
|
||||
- New: Added Autoconf build scripts for CCExtractor to generate makefiles (linux).
|
||||
- New: Added .rpm package generation script.
|
||||
- New: Added build/installation script for .pkg.tar.xz (Arch Linux).
|
||||
- New: Added tarball generation script.
|
||||
- New: Added --analyzevideo. If present the video stream will be processed even if the
|
||||
subtitles are in a different stream. This is useful when we want video information
|
||||
(resolution, frame type, etc). -vides now implies this option too.
|
||||
[Note: Tentative - some possibly breaking changed were made for this, so if you
|
||||
use it validate results]
|
||||
- New: Added a GUI in the main CCExtractor binary (separate from the external GUIs
|
||||
such as CCExtractorGUI).
|
||||
- New: A Python binding extension so it's possible to use CCExtractor's tools from
|
||||
Python.
|
||||
- New: Added -nospupngocr (don't OCR bitmaps when generating spupng, faster)
|
||||
- New: Add support for file split on keyframe (-segmentonkeyonly)
|
||||
- New: Added WebVTT output from Matroska.
|
||||
- New: Support for source-specific multicast.
|
||||
- New: FreeType-based text renderer (-out=spupng with teletext/EIA608).
|
||||
- New: Upgrade library UTF8proc
|
||||
- New: Upgrade library win_iconv
|
||||
- New: Upgrade library zlib
|
||||
- New: Upgrade library LibPNG
|
||||
- New: Support for Source-Specific Multicast
|
||||
- New: Added Travis CI support
|
||||
- New: Made error messages clearer, less ambiguous
|
||||
- Fix: Prevent the OCR being initialized more than once (happened on multiprogram and
|
||||
PAT changes)
|
||||
- Fix: Makefiles, build scripts, etc... everything updated and corrected for all
|
||||
platforms.
|
||||
-Fix: Proper line ending for .srt files from bitmaps.
|
||||
- Fix: OCR corrections using grayscale before extracting texts.
|
||||
- Fix: End timestamps in transcripts from DVB.
|
||||
- Fix: Forcing -noru to cause deduplication in ISDB
|
||||
- Fix: TS: Skip NULL packets
|
||||
- Fix: When NAL decoding fails, don't dump the whole decoded thing, limit to 160 bytes.
|
||||
- Fix: Modify Autoconf scripts to generate tarball for mac from `/package_creators/tarball.sh`
|
||||
and include GUI files in tarball
|
||||
- Fix: Started work on libGPAC upgrade.
|
||||
- Fix: DVB subtitle not extracted if there's no display segment
|
||||
- Fix: Heap corruption in add_ocrtext2str
|
||||
- Fix: bug that caused -out=spupng sometimes crashes
|
||||
- Fix: Checks for text before newlines on DVB subtitles
|
||||
- Fix: OCR issue caused by separated dvb subtitle regions
|
||||
- Fix: DVB crash on specific condition (!rect->ocr_text)
|
||||
- Fix: DVB bug (Multiple-line subtitle; Missing last line)
|
||||
- Fix: --sentencecap for teletext samples
|
||||
- Fix: Crash when image passed into OCR is empty
|
||||
- Fix: Temporarily wrapped the Python API, not production ready yet
|
||||
- Fix: -delay option in DVB
|
||||
|
||||
|
||||
0.85b (2017-01-26)
|
||||
------------------
|
||||
- Fix: Base Windows binary (without OCR) compiled without DLL dependencies.
|
||||
|
||||
0.85 (2017-01-23)
|
||||
-----------------
|
||||
- New: Added FFMPEG 3.0 to Windows build - last one that is XP compatible.
|
||||
- New: Major improvements in CEA-608 to WebVTT (styles, etc).
|
||||
- New: Return a non-zero return code if no subtitles are found.
|
||||
- New: Windows build files updated to Visual Studio 2015, new target platform is 140_xp.
|
||||
- New: Added basic support of Tesseract 4.0.0.
|
||||
- New: Added build script for .deb.
|
||||
- New: Updated -debugdvbsub parameter to get the most relevant DVB traces for debugging.
|
||||
- New: SMPTE-TT files are now compatible with Adobe Premiere.
|
||||
- New: Updated libpng.
|
||||
- New: Added 3rd party (Tracy from archive.org) static linux build script.
|
||||
- New: Add chapter extraction for MP4 files.
|
||||
- New: Return code 10 if no captions are found at all.
|
||||
- Fix: Teletext duplicate lines in certain cases.
|
||||
- Fix: Improved teletext timing.
|
||||
- Fix: DVB timing is finally good.
|
||||
- Fix: A few minor memory leaks.
|
||||
- Fix: tesseract library file included in mac build command.
|
||||
- Fix: Bad WTV timings in some cases.
|
||||
- Fix: Mac build script.
|
||||
- Fix: Memory optimization in HARDSUBX edit_distance.
|
||||
- Fix: SubStation Alpha subtitles in bitmap.
|
||||
- Fix: lept msg severity in linux.
|
||||
- Fix: SSA, SPUPNG and VTT timing and skipping of subtitles for SAMI and TTML.
|
||||
- Fix: SMPTE-TT : Added support for font color.
|
||||
- Fix: SAMI unnecessary empty subtitle when extracting DVB subs.
|
||||
- Fix: Skip the packet if the adaptation field length is broken.
|
||||
- Fix: 708 - lots of work done in the decoder. Implementation of more commands. Better timing.
|
||||
|
||||
|
||||
|
||||
0.84 (2016-12-16)
|
||||
-----------------
|
||||
- New: In Windows, both with and without-OCR binaries are bundled, since the OCR one causes problems due to
|
||||
dependencies in some system. So unless you need the OCR just use the non-OCR version.
|
||||
- New: Added -sbs (sentence by sentence) for DVB output. Each frame in the output file contains a complete
|
||||
sentence (experimental).
|
||||
- New: Added -curlposturl. If used each output frame will be sent with libcurl by doing a POST to that URL.
|
||||
- Fix: More code consistency checking in function names.
|
||||
- Fix: linux build script now tries to verify dependencies.
|
||||
- Fix: Mac build script was missing a directory.
|
||||
|
||||
|
||||
0.83 (2016-12-13)
|
||||
-----------------
|
||||
- Fix: Duplicate lines in mp4 (specifically affects itunes).
|
||||
- Fix: Timing in .mp4, timing now calculated for each CC pair instead of per atom.
|
||||
- Fix: Typos everywhere in the documentation and source code.
|
||||
- Fix: CMakeLists for build in cmake.
|
||||
- Fix: -unixts option.
|
||||
- Fix: FPS switching messages.
|
||||
- Fix: Removed ugly debug statement with local path in HardsubX.
|
||||
- Fix: Changed platform target to v120_xp in Visual Studio (so XP is supported again).
|
||||
- Fix: Added detail in many error messages.
|
||||
- Fix: Memory leaks in videos with XDS.
|
||||
- Fix: Makefile compatibility issues with Raspberry pi.
|
||||
- Fix: missing separation between WebVTT header and body.
|
||||
- Fix: Stupid bug in M2TS that preventing it from working.
|
||||
- Fix: OCR libraries dependencies for the release version in Windows.
|
||||
- Fix: non-buffered reading from pipes.
|
||||
- Fix: --stream option with stdin.
|
||||
- New: terminate_asap to buffered_read_opt
|
||||
- New: Added some TV-show specific spelling dictionaries.
|
||||
- New: Updated GPAC library.
|
||||
- New: ASS/SSA.
|
||||
- New: Capture sigterm to do some clean up before terminating.
|
||||
- New: Work on 708: Changed DefineWindow behavior, only clear text of an existing window is style has changed.
|
||||
|
||||
0.82 (2016-08-15)
|
||||
-----------------
|
||||
- New: HardsubX - Burned in subtitle extraction subsystem.
|
||||
- New: Color Detection in DVB Subtitles
|
||||
- Fix: Corrected sentence capitalization
|
||||
- Fix: Skipping redundant bytes at the end of tx3g atom in MP4
|
||||
- Fix: Illegal SRT files being created from DVB subtitles
|
||||
- Fix: Incorrect Progress Display
|
||||
|
||||
0.81 (2016-06-13)
|
||||
-----------------
|
||||
- New: --version parameter for extensive version information (version number, compile date, executable hash, git commit (if appropriate))
|
||||
- New: Add -sem (semaphore) to create a .sem file when an output file is open and delete it when it's closed.
|
||||
- New: Add --append parameter. This will prevent overwriting of existing files.
|
||||
- New: File Rotation support added. The user has to send a USR1 signal to rotate.
|
||||
- Fix: Issues with files <1 Mb
|
||||
- Fix: Preview of generated transcript.
|
||||
- Fix: Statistics were not generated anymore.
|
||||
- Fix: Correcting display of sub mode and info in transcripts.
|
||||
- Fix: Teletext page number displayed in -UCLA.
|
||||
- Fix: Removal of excessive XDS notices about aspect ratio info.
|
||||
- Fix: Force Flushing of file buffers works for all files now.
|
||||
- Fix: mp4 void atoms that was causing some .mp4 files to fail.
|
||||
- Fix: Memory usage caused by EPG processing was high due to many non-dynamic buffers.
|
||||
- Fix: Project files for Visual Studio now include OCR support in Windows.
|
||||
|
||||
0.80 (2016-04-24)
|
||||
-----------------
|
||||
- Fix: "Premature end of file" (one of the scenarios)
|
||||
- Fix: XDS data is always parsed again (needed to extract information such as program name)
|
||||
- Fix: Teletext parsing: @ was incorrectly exported as * - X/26 packet specifications in ETS 300 706 v1.2.1 now better followed
|
||||
- Fix: Teletext parsing: Latin G2 subsets and accented characters not displaying properly
|
||||
- Fix: Timing in -ucla
|
||||
- Fix: Timing in ISDB (some instances)
|
||||
- Fix: "mfra" mp4 box weight changed to 1 (this helps with correct file format detection)
|
||||
- Fix: Fix for TARGET File is null.
|
||||
- Fix: Fixed SegFaults while parsing parameters (if mandatory parameter is not present in -outinterval, -codec or -nocodec)
|
||||
- Fix: Crash when input small is too small
|
||||
- Fix: Update some URLs in code (references to docs)
|
||||
- Fix: -delay now updates final timestamp in ISDB, too
|
||||
- Fix: Removed minor compiler warnings
|
||||
- Fix: Visual Studio solution files working again
|
||||
- Fix: ffmpeg integration working again
|
||||
- New: Added --forceflush (-ff). If used, output file descriptors will be flushed immediately after being written to
|
||||
- New: Hexdump XDS packets that we cannot parse (shouldn't be many of those anyway)
|
||||
- New: If input file cannot be open, provide a decent human readable explanation
|
||||
- New: GXF support
|
||||
|
||||
0.79 (2016-01-09)
|
||||
-----------------
|
||||
- Support for Grid Format (g608)
|
||||
- Show Correct number of teletext packet processed
|
||||
- Removed Segfault on incorrect mp4 detection
|
||||
- Remove xml header from transcript format
|
||||
- Help message updated for Teletext
|
||||
- Added --help and -h for help message
|
||||
- Added --nohtmlescape option
|
||||
- Added --noscte20 option
|
||||
|
||||
0.78 (2015-12-12)
|
||||
-----------------
|
||||
- Support to extract Closed Caption from MultiProgram at once.
|
||||
- CEA-708: exporting to SAMI (.smi), Transcript (.txt), Timed Transcript (ttxt) and SubRip (.srt).
|
||||
- CEA-708: 16 bit charset support (tested on Korean).
|
||||
- CEA-708: Roll Up captions handling.
|
||||
- Changed TCP connection protocol (BIN data is now wrapped in packets, added EPG support and keep-alive packets).
|
||||
- TCP connection password prompt is removed. To set connection password use -tcppassword argument instead.
|
||||
- Support ISDB Closed Caption.
|
||||
- Added a new output format, simplexml (used internally by a CCExtractor user, may or may not be useful for
|
||||
anyone else).
|
||||
|
||||
0.77 (2015-06-20)
|
||||
-----------------
|
||||
- Fixed bug in capitalization code ('I' was not being capitalized).
|
||||
- GUI should now run in Windows 8 (using the include .Net runtime, since
|
||||
3.5 cannot be installed in Windows 8 apparently).
|
||||
- Fixed Mac build script, binary is now compiled with support for
|
||||
files over 2 GB.
|
||||
- Fixed bug in PMT code, damaged PMT sections could make CCExtractor
|
||||
crash.
|
||||
|
||||
0.76 (2015-03-28)
|
||||
-----------------
|
||||
- Added basic M2TS support
|
||||
- Added EPG support - you can now export the Program Guide to XML
|
||||
- Some bugfixes
|
||||
- Some bug fixes
|
||||
|
||||
0.75 (2015-01-15)
|
||||
-----------------
|
||||
@@ -26,7 +303,7 @@
|
||||
0.73 - GSOC (2014-08-19)
|
||||
------------------------
|
||||
- Added support of BIN format for Teletext
|
||||
- Added start of librarisation. This will allow in the future for other programs to use encoder/decoder functions and more.
|
||||
- Added start of librarization. This will allow in the future for other programs to use encoder/decoder functions and more.
|
||||
|
||||
0.72 - GSOC (2014-08-12)
|
||||
------------------------
|
||||
@@ -75,7 +352,7 @@ version of CCExtractor.
|
||||
- Display end time
|
||||
- Display caption mode
|
||||
- Display caption channel
|
||||
- Use a relative timestamp ( relative to the sample)
|
||||
- Use a relative timestamp (relative to the sample)
|
||||
- Display XDS info
|
||||
- Use colors
|
||||
Examples:
|
||||
@@ -128,7 +405,7 @@ version of CCExtractor.
|
||||
.raw, which depends on padding. Fixed.
|
||||
- MythTV's branch had a fixed size buffer that could not be enough
|
||||
some times. Made dynamic.
|
||||
- Better support for PAT changing mid stream.
|
||||
- Better support for PAT changing mid-stream.
|
||||
- Removed quotes in Start in .smi (format fix).
|
||||
- Added multicast support (Chris Small)
|
||||
- Added ability to select IP address to bind in UDP (Chris Small)
|
||||
@@ -158,10 +435,10 @@ version of CCExtractor.
|
||||
their PMT entry.
|
||||
- Added -datastreamtype to manually selecting a stream based on
|
||||
its type instead of its PID. Useful if your recording program
|
||||
always hides the caption under the stream stream type.
|
||||
always hides the caption under the stream type.
|
||||
- Added -streamtype so if an elementary stream is selected manually
|
||||
for processing the streamtype can be selected too. This can be
|
||||
needed if you process for example a stream that is declared as
|
||||
for processing, the streamtype can be selected too. This can be
|
||||
needed if you process, for example a stream that is declared as
|
||||
"private MPEG" in the PMT, so CCExtractor can't tell what it is.
|
||||
Usually you'll want -streamtype 2 (MPEG video) or -streamtype 6
|
||||
(MPEG private data).
|
||||
@@ -170,10 +447,10 @@ version of CCExtractor.
|
||||
- Fixes in roll-up, cursor was being moved to column 1 if a
|
||||
RU2, RU3 or RU4 was received even if already in roll-up mode.
|
||||
- Added -autoprogram. If a multiprogram TS is processed and
|
||||
-autoprogram is used CCExtractor will analyze all PMTs and use
|
||||
-autoprogram is used, CCExtractor will analyze all PMTs and use
|
||||
the first program that has a suitable data stream.
|
||||
- Timed transcript (ttxt) now also exports the caption mode
|
||||
(roll-up, paint-on, etc) next to each line, as it's useful to
|
||||
(roll-up, paint-on, etc.) next to each line, as it's useful to
|
||||
detect things like commercials.
|
||||
- Content Advisory information from XDS is now decoded if it's
|
||||
transmitted in "US TV parental guidelines" or "MPA".
|
||||
@@ -371,7 +648,7 @@ version of CCExtractor.
|
||||
|
||||
0.57 (2010-12-16)
|
||||
-----------------
|
||||
- Bugfixes in the Windows version. Some debug code was unintentionally
|
||||
- Bug fixes in the Windows version. Some debug code was unintentionally
|
||||
left in the released version.
|
||||
|
||||
0.56 (2010-12-09)
|
||||
@@ -399,7 +676,7 @@ version of CCExtractor.
|
||||
-----------------
|
||||
- Add -nosync and -fullbin switches for debugging purposes.
|
||||
- Remove -lg (--largegops) switch.
|
||||
- Improve syncronization of captions for source files with
|
||||
- Improve synchronization of captions for source files with
|
||||
jumps in their time information or gaps in the caption
|
||||
information.
|
||||
- [R. Abarca] Changed Mac script, it now compiles/link
|
||||
@@ -441,12 +718,12 @@ version of CCExtractor.
|
||||
- Removed -autopad and -goppad, no longer needed.
|
||||
- In preparation to a new binary format we have
|
||||
renamed the current .bin to .raw. Raw files
|
||||
have only CC data (with no header, timing, etc).
|
||||
have only CC data (with no header, timing, etc.).
|
||||
- The input file format (when forced) is now
|
||||
specified with
|
||||
-in=format
|
||||
such as -in=ts, -in=raw, -in=ps ...
|
||||
The old switches (-ts, -ps, etc) still work.
|
||||
The old switches (-ts, -ps, etc.) still work.
|
||||
The only exception is -bin which has been removed
|
||||
(reserved for the new binary format). Use
|
||||
-in=raw to process a raw file.
|
||||
@@ -484,11 +761,11 @@ version of CCExtractor.
|
||||
is broken please let me know.
|
||||
- Added new debug options.
|
||||
- [Volker] Added support for DVR-MS NTSC files.
|
||||
- Other minor bugfixes and changes.
|
||||
- Other minor bug fixes and changes.
|
||||
|
||||
0.46 (2008-11-24)
|
||||
-----------------
|
||||
- Added support for live streaming, ccextractor
|
||||
- Added support for live streaming, CCExtractor
|
||||
can now process files that are being recorded
|
||||
at the same time.
|
||||
|
||||
@@ -502,11 +779,11 @@ version of CCExtractor.
|
||||
|
||||
0.45 (2008-11-14)
|
||||
-----------------
|
||||
- Added autodetection of DVR-MS files.
|
||||
- Added auto-detection of DVR-MS files.
|
||||
- Added -asf to force DVR-MS mode.
|
||||
- Added some specific support for DVR-MS
|
||||
files. These format used to work
|
||||
correcty in 0.34 (pure luck) but the
|
||||
correctly in 0.34 (pure luck) but the
|
||||
MPEG code rework broke it. It should
|
||||
work as it used to.
|
||||
- Updated Windows GUI to support the
|
||||
@@ -530,7 +807,7 @@ version of CCExtractor.
|
||||
in one go.
|
||||
- Added an option to prevent duplicate
|
||||
lines in roll-up captions.
|
||||
- Several minor bugfixes.
|
||||
- Several minor bug fixes.
|
||||
- Updated the GUI to add the new options.
|
||||
|
||||
0.43 (2008-06-20)
|
||||
@@ -538,7 +815,7 @@ version of CCExtractor.
|
||||
- Fixed a bug in the read loop (no less)
|
||||
that caused some files to fail when
|
||||
reading without buffering (which is
|
||||
the default in the linux build).
|
||||
the default in the Linux build).
|
||||
- Several improvements in the GUI, such as
|
||||
saving current options as default.
|
||||
|
||||
@@ -561,7 +838,7 @@ version of CCExtractor.
|
||||
deaf people know if the person talking is
|
||||
at the left or the right of the screen, i.e.
|
||||
there aren't useless. But if they annoy
|
||||
you go ahead...
|
||||
you, go ahead...
|
||||
|
||||
0.40 (2008-05-20)
|
||||
-----------------
|
||||
@@ -580,7 +857,7 @@ version of CCExtractor.
|
||||
- Fixed a bug in the CC decoder that could cause
|
||||
the first line not to be cleared in roll-up
|
||||
mode.
|
||||
- ccextractor can now follow number sequences in
|
||||
- CCExtractor can now follow number sequences in
|
||||
file names, by suffixing the name with +.
|
||||
For example,
|
||||
|
||||
@@ -612,12 +889,12 @@ version of CCExtractor.
|
||||
being closed).
|
||||
- Displayed memory is now written to disk at end
|
||||
of stream even if there is no command requesting
|
||||
so (may prevent losing the last screenful).
|
||||
so (may prevent losing the last screen-full).
|
||||
- Important change that could break scripts, but
|
||||
that have been added because old behaviour was
|
||||
annoying to most people: _1 and _2 at the end
|
||||
of the output file names is now added ONLY if
|
||||
-12 is used (ie when there are two output
|
||||
-12 is used (i.e. when there are two output
|
||||
files to produce). So
|
||||
|
||||
ccextractor -srt sopranos.mpg
|
||||
@@ -719,7 +996,7 @@ version of CCExtractor.
|
||||
|
||||
0.32 (unreleased)
|
||||
-----------------
|
||||
- Added -delay ms, which adds (or substracts)
|
||||
- Added -delay ms, which adds (or subtracts)
|
||||
a number of milliseconds to all times in
|
||||
.srt/.sami files. For example,
|
||||
|
||||
@@ -730,7 +1007,7 @@ version of CCExtractor.
|
||||
|
||||
-delay -400
|
||||
|
||||
causes all substitles to appear 400 ms before
|
||||
causes all subtitles to appear 400 ms before
|
||||
they would normally do.
|
||||
- Added -startat at -endat which lets you
|
||||
select just a portion of data to be processed,
|
||||
@@ -756,7 +1033,7 @@ version of CCExtractor.
|
||||
|
||||
0.29 (unreleased)
|
||||
-----------------
|
||||
- Minor bugfix.
|
||||
- Minor bug fix.
|
||||
|
||||
0.28 (unreleased)
|
||||
-----------------
|
||||
@@ -770,7 +1047,7 @@ version of CCExtractor.
|
||||
|
||||
0.27 (unreleased)
|
||||
-----------------
|
||||
- Modified sanitizing code, it's less aggresive
|
||||
- Modified sanitizing code, it's less aggressive
|
||||
now. Ideally it should mean that characters
|
||||
won't be missed anymore. We'll see.
|
||||
|
||||
@@ -825,7 +1102,7 @@ version of CCExtractor.
|
||||
many others (bttv) with the same closed caption recording
|
||||
format.
|
||||
This is the result of hacking MythTV's MPEG parser into
|
||||
ccextractor. Integration is not very good (to put it
|
||||
CCExtractor. Integration is not very good (to put it
|
||||
midly) but it seems to work. Depending on the feedback I
|
||||
may continue working on this or just leave it 'as it'
|
||||
(good enough).
|
||||
@@ -842,7 +1119,7 @@ version of CCExtractor.
|
||||
It's fixed now at least for the samples I have, if it's not
|
||||
completely fixed let me know. Credit for this goes to
|
||||
Jack Ha who sent me a couple of samples and a first
|
||||
implementation of a semiworking fix.
|
||||
implementation of a semi working-fix.
|
||||
- Added support for several input files (see help screen for
|
||||
details).
|
||||
- Added Unicode and Latin-1 encoding.
|
||||
@@ -874,7 +1151,7 @@ version of CCExtractor.
|
||||
0.07 (2007-04-19)
|
||||
-----------------
|
||||
- Added MPEG reference clock parsing.
|
||||
- Added autopadding in TS. Does miracles with timing.
|
||||
- Added auto padding in TS. Does miracles with timing.
|
||||
- Added video information (as extracted from sequence header).
|
||||
- Some code clean-up.
|
||||
- FF sanity check enabled by default.
|
||||
|
||||
213
docs/COMPILATION.MD
Normal file
@@ -0,0 +1,213 @@
|
||||
# Compiling CCExtractor
|
||||
|
||||
You may compile CCExtractor across all major platforms using `CMakeLists.txt` stored under `ccextractor/src/` directory. Autoconf and custom build scripts are also available. See platform specific instructions in the below sections.
|
||||
|
||||
Downloads for precompiled binaries and source code can be found [on our website](https://www.ccextractor.org?id=public:general:downloads).
|
||||
|
||||
Clone the latest repository from Github
|
||||
|
||||
```
|
||||
git clone https://github.com/CCExtractor/ccextractor.git
|
||||
```
|
||||
|
||||
## Linux
|
||||
|
||||
1. Make sure all the dependencies are met.
|
||||
|
||||
```
|
||||
sudo apt-get install -y gcc
|
||||
sudo apt-get install -y libcurl4-gnutls-dev
|
||||
sudo apt-get install -y tesseract-ocr
|
||||
sudo apt-get install -y tesseract-ocr-dev
|
||||
sudo apt-get install -y libleptonica-dev
|
||||
```
|
||||
|
||||
**Note:** On Ubuntu Version 14.04 (Trusty) and earlier, you should build leptonica and tesseract from source
|
||||
|
||||
2. Compiling
|
||||
|
||||
|
||||
**Using the build script**
|
||||
|
||||
|
||||
```
|
||||
#Navigate to linux directory and call the build script
|
||||
|
||||
cd ccextractor/linux
|
||||
./build
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
```
|
||||
|
||||
**Standard linux compilation through Autoconf scripts**
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf #Dependency to generate configuration script
|
||||
cd ccextractor/linux
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
|
||||
# make build systemwide
|
||||
sudo make install
|
||||
```
|
||||
|
||||
**Using CMake**
|
||||
|
||||
```
|
||||
#Create and navigate to directory where you want to store built files
|
||||
|
||||
cd ccextractor/
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
#Generate makefile using cmake and then compile
|
||||
|
||||
cmake ../src/
|
||||
make
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
|
||||
# make build systemwide
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
**Compiling with GUI:**
|
||||
|
||||
To build CCExtractor with a gui you will additionally need to install [GLEW](http://glew.sourceforge.net/build.html) and [GLFW](http://www.glfw.org/docs/latest/compile.html)
|
||||
|
||||
In order to compile it you'll need to configure it using autoconf by passing the `-with-gui` option.
|
||||
|
||||
```
|
||||
./autogen.sh
|
||||
./configure --with-gui
|
||||
make
|
||||
|
||||
# make build systemwide
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Once set up you can run the GUI interface from the terminal `./ccextractorGUI`
|
||||
|
||||
## macOS
|
||||
|
||||
1. Make sure all the dependencies are met. They can be installed via Homebrew as
|
||||
|
||||
```
|
||||
brew install pkg-config
|
||||
brew install autoconf automake libtool
|
||||
brew install tesseract
|
||||
brew install leptonica
|
||||
```
|
||||
|
||||
To verify tesseract and leptonica are detected by pkg-config, e.g.
|
||||
|
||||
````
|
||||
pkg-config --exists --print-errors tesseract
|
||||
pkg-config --exists --print-errors lept
|
||||
````
|
||||
|
||||
2. Compiling
|
||||
|
||||
**Using build.command script:**
|
||||
|
||||
```
|
||||
cd ccextractor/mac
|
||||
./build.command OCR
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
```
|
||||
|
||||
If you don't want the OCR capabilities, then you don't need to configure the tesseract and leptonica packages, and build it with just
|
||||
|
||||
```
|
||||
cd ccextractor/mac
|
||||
./build.command
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
```
|
||||
|
||||
**Using CMake**
|
||||
|
||||
```
|
||||
#Create and navigate to directory where you want to store built files
|
||||
|
||||
cd ccextractor/
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
#Generate makefile using cmake and then compile
|
||||
|
||||
cmake ../src/
|
||||
make
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
```
|
||||
|
||||
**Standard compilation through Autoconf scripts :**
|
||||
|
||||
```
|
||||
cd ccextractor/mac
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
# test your build
|
||||
./ccextractor
|
||||
```
|
||||
|
||||
**Compiling with GUI:**
|
||||
|
||||
To use CCExtractor with a gui you will additionally need to install GLEW and GLFW. You can do that by installing it via homebrew using:
|
||||
|
||||
```
|
||||
brew install glfw
|
||||
brew install glew
|
||||
```
|
||||
|
||||
In order to compile it you'll need to configure it using autoconf by passing the `-with-gui` option.
|
||||
|
||||
```
|
||||
./autogen.sh
|
||||
./configure --with-gui
|
||||
make
|
||||
```
|
||||
|
||||
Once set up you can run the GUI interface from the terminal `./ccextractorGUI`
|
||||
|
||||
## Windows
|
||||
|
||||
Open the windows/ccextractor.sln file with Visual Studio (2015 at least), and build it.
|
||||
|
||||
Configurations options are: `(Debug|Release)-Full`
|
||||
|
||||
Configurations options include dependent libraries which are used for OCR.
|
||||
|
||||
**Using CMake**
|
||||
|
||||
You may also generate `.sln` files for Visual Studio and build using build tools, or open `.sln` files using Visual Studio.
|
||||
|
||||
```
|
||||
cmake ../src/ -G "Visual Studio 14 2015"
|
||||
cmake --build . --config Release --ccextractor
|
||||
```
|
||||
|
||||
## Building Installation Packages
|
||||
|
||||
### Arch Linux
|
||||
|
||||
Go to the package_creators folder using `cd` and run the `./arch.sh`
|
||||
|
||||
### Redhat Package Manager (rpm) based Linux Distributions
|
||||
|
||||
Go to the package_creators folder using `cd` and run the `./rpm.sh`
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Overview
|
||||
========
|
||||
FFmpeg Intigration was done to support multiple encapsulator.
|
||||
FFmpeg Integration was done to support multiple encapsulations.
|
||||
|
||||
Dependecy
|
||||
Dependency
|
||||
=========
|
||||
FFmpeg library's
|
||||
|
||||
Download and Install FFmpeg on your linux pc.
|
||||
Download and Install FFmpeg on your Linux pc.
|
||||
---------------------------------------------
|
||||
|
||||
Download latest source code from following link
|
||||
@@ -15,8 +15,8 @@ https://ffmpeg.org/download.html
|
||||
then following command to install ffmpeg
|
||||
./configure && make && make install
|
||||
|
||||
Note:If you installed ffmpeg on non standurd location, please change/update your
|
||||
enviorment variable $PATH and $LD_LIBRARY_PATH
|
||||
Note:If you installed ffmpeg on non-standard location, please change/update your
|
||||
environment variable $PATH and $LD_LIBRARY_PATH
|
||||
|
||||
Download and Install FFmpeg on your Windows pc.
|
||||
----------------------------------------------
|
||||
@@ -35,24 +35,24 @@ make ENABLE_FFMPEG=yes
|
||||
On Windows
|
||||
----------
|
||||
put the path of libs/include of ffmpeg library in library paths.
|
||||
step 1) In visual studio 2013 right click <Project> and select property.
|
||||
step 2) Select Configuration properties in left panel(column) of property.
|
||||
step 3) Select VC++ Directory.
|
||||
step 4) In the right pane, in the right-hand column of the VC++ Directory property,
|
||||
Step 1) In visual studio 2013 right click <Project> and select property.
|
||||
Step 2) Select Configuration properties in left panel(column) of property.
|
||||
Step 3) Select VC++ Directory.
|
||||
Step 4) In the right pane, in the right-hand column of the VC++ Directory property,
|
||||
open the drop-down menu and choose Edit.
|
||||
Step 5) Add path of Directory where you have kept uncompressed library of FFmpeg.
|
||||
|
||||
|
||||
Set preprocessor flag ENABLE_FFMPEG=1
|
||||
Step 1)In visual studio 2013 right click <Project> and select property.
|
||||
Step 2)In the left panel, select Configuration Properties, C/C++, Preprocessor.
|
||||
Step 3)In the right panel, in the right-hand column of the Preprocessor Definitions property, open the drop-down menu and choose Edit.
|
||||
Step 4)In the Preprocessor Definitions dialog box, add ENABLE_FFMPEG=1. Choose OK to save your changes.
|
||||
Step 1) In visual studio 2013 right click <Project> and select property.
|
||||
Step 2) In the left panel, select Configuration Properties, C/C++, Preprocessor.
|
||||
Step 3) In the right panel, in the right-hand column of the Preprocessor Definitions property, open the drop-down menu and choose Edit.
|
||||
Step 4) In the Preprocessor Definitions dialog box, add ENABLE_FFMPEG=1. Choose OK to save your changes.
|
||||
|
||||
Add library in linker
|
||||
step 1)Open property of project
|
||||
Step 2)Select Configuration properties
|
||||
Step 3)Select Linker in left panel(column)
|
||||
Step 4)Select Input
|
||||
Step 5)Select Additional dependencies in right panel
|
||||
Step 6)Add all FFmpeg's lib in new line
|
||||
Step 1) Open property of project
|
||||
Step 2) Select Configuration properties
|
||||
Step 3) Select Linker in left panel(column)
|
||||
Step 4) Select Input
|
||||
Step 5) Select Additional dependencies in right panel
|
||||
Step 6) Add all FFmpeg's lib in new line
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Starting with version 0.51, ccextractor has a mode
|
||||
Starting with version 0.51, CCExtractor has a mode
|
||||
that allows frontends and other programs know what
|
||||
the current progress is as well as get information
|
||||
on interesting events, such as a file being open
|
||||
@@ -80,7 +80,7 @@ VIDEOINFO - New video information found
|
||||
Horizontal resolution
|
||||
Vertical resolution
|
||||
Aspect ratio
|
||||
Framerate
|
||||
Frame rate
|
||||
|
||||
Example: ###VIDEOINFO#1980#1080#16:9#29.97
|
||||
|
||||
|
||||
58
docs/G608.TXT
Normal file
@@ -0,0 +1,58 @@
|
||||
G608
|
||||
====
|
||||
G608 (for grid 608) is generated by CCExtractor by using -out=g608.
|
||||
|
||||
This is a verbose format that exports the contents of the 608 grid verbatim
|
||||
so there's no loss of positioning or colors due the limitations or complexity
|
||||
or other output formats.
|
||||
|
||||
G608 is a text file with a structure based on .srt and looks like this:
|
||||
|
||||
1
|
||||
00:00:02,019 --> 00:00:03,585
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
- Previously on The Tudors... 90000000000000000000000000000009RIIIIIIIIIIIIIIIIRRRRRRRRRRRRRRR
|
||||
- Your Holy Father offs you 99000000000000000000000000000999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
|
||||
|
||||
For each subtitle frame there's exactly 15 rows (which represent the 15 rows of the 608 screen)
|
||||
of 96 characters each.
|
||||
|
||||
Each row is divided in 3 blocks: 32 characters for the text, 32 characters for the color, and
|
||||
32 characters for the font.
|
||||
|
||||
The possible color values are:
|
||||
COL_WHITE = 0,
|
||||
COL_GREEN = 1,
|
||||
COL_BLUE = 2,
|
||||
COL_CYAN = 3,
|
||||
COL_RED = 4,
|
||||
COL_YELLOW = 5,
|
||||
COL_MAGENTA = 6,
|
||||
COL_USERDEFINED = 7,
|
||||
COL_BLACK = 8,
|
||||
COL_TRANSPARENT = 9
|
||||
|
||||
And the possible font values are:
|
||||
R => Regular
|
||||
I => Italics
|
||||
U => Underlined
|
||||
B => Underlined + Italics
|
||||
|
||||
If a 'E' is found in either color or font that means a bug in CCExtractor. Should you ever get
|
||||
an E please send us a .bin file that causes it.
|
||||
|
||||
This format is intended for post processing tools that need to represent the output of a 608
|
||||
decoder accurately but that don't want to deal with the madness of other more generic subtitle
|
||||
formats.
|
||||
56
docs/HARDSUBX.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
Overview
|
||||
========
|
||||
Subtitles which are burned into the video (or hard subbed) can be extracted using the -hardsubx flag.
|
||||
The system works by processing video frames and extracting only the subtitles from them, followed
|
||||
by an OCR recognition using Tesseract.
|
||||
|
||||
Dependencies
|
||||
============
|
||||
Tesseract (OCR library by Google)
|
||||
Leptonica (C Image processing library)
|
||||
FFMpeg (Video Processing Library)
|
||||
|
||||
Compilation
|
||||
===========
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
Make sure Tesseract, Leptonica and FFMPeg are installed, and that their libraries can be found using pkg-config.
|
||||
Refer to OCR.txt for installation details.
|
||||
|
||||
To install FFmpeg (libav), follow the steps at:-
|
||||
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu - For Ubuntu, Debian and Linux Mint
|
||||
https://trac.ffmpeg.org/wiki/CompilationGuide/Generic - For generic Linux compilation
|
||||
|
||||
To validate your FFMpeg installation, make sure you can run the following commands on your terminal:-
|
||||
pkg-config --cflags libavcodec
|
||||
pkg-config --cflags libavformat
|
||||
pkg-config --cflags libavutil
|
||||
pkg-config --cflags libswscale
|
||||
pkg-config --libs libavcodec
|
||||
pkg-config --libs libavformat
|
||||
pkg-config --libs libavutil
|
||||
pkg-config --libs libswscale
|
||||
|
||||
On success, you should see the correct include directory path and the linker flags.
|
||||
|
||||
To build the program with hardsubx support,
|
||||
|
||||
== from the Linux directory run:-
|
||||
./configure --enable-hardsubx
|
||||
make ENABLE_HARDSUBX=yes
|
||||
|
||||
== using cmake from root directory
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DWITH_OCR=on -DWITH_HARDSUBX=on ../src/
|
||||
make
|
||||
|
||||
NOTE: The build has been tested with FFMpeg version 3.1.0, and Tesseract 3.04.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Coming Soon
|
||||
@@ -1,17 +1,9 @@
|
||||
A mailing list is now available from sourceforge:
|
||||
A mailing list is now available from google groups:
|
||||
|
||||
https://groups.google.com/forum/#!forum/ccextractor-dev
|
||||
|
||||
The old one, hosted in sourceforge, is discontinued, but here is the link just in case:
|
||||
|
||||
https://lists.sourceforge.net/lists/listinfo/ccextractor-users
|
||||
|
||||
I expect it to be very low traffic (right now there's around 10
|
||||
people actively helping with ccextractor in one way or
|
||||
another), so almost everything goes here:
|
||||
|
||||
- Bug reports
|
||||
- Feature requests
|
||||
- Announcements
|
||||
|
||||
NOT here:
|
||||
|
||||
- Samples
|
||||
|
||||
|
||||
|
||||
102
docs/OCR.md
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
Overview
|
||||
========
|
||||
OCR (Optical Character Recognition) is a technique used to
|
||||
extract text from images. In the World of Subtitle, subtitle stored
|
||||
in bitmap format are common and even necessary for converting subtitle
|
||||
in bitmap format to subtitle in text format OCR is used.
|
||||
|
||||
Dependency
|
||||
==========
|
||||
1. Tesseract (OCR library by Google)
|
||||
2. Leptonica (Image processing library)
|
||||
|
||||
Ubuntu install Dependency using package manager
|
||||
===============================================
|
||||
```
|
||||
sudo apt-get install libleptonica-dev libtesseract-dev tesseract-ocr-eng
|
||||
```
|
||||
|
||||
How to compile CCExtractor on Linux with OCR
|
||||
=============================================
|
||||
|
||||
Download and Install Leptonnica.
|
||||
-------------------------------
|
||||
This package is available in your distro, you need liblept-devel library.
|
||||
|
||||
If Leptonica isn't available for your distribution, or you want to use a newer version
|
||||
than they offer, you can compile your own.
|
||||
|
||||
you can download lib leptonica from http://www.leptonica.com/download.html
|
||||
|
||||
Download and Install Tesseract.
|
||||
-------------------------------
|
||||
Tesseract is available directly from many Linux distributions. The package is generally
|
||||
called 'tesseract' or 'tesseract-ocr' - search your distribution's repositories to
|
||||
find it. Packages are also generally available for language training data (search the
|
||||
repositories,) but if not you will need to download the appropriate training data,
|
||||
unpack it, and copy the .traineddata file into the 'tessdata' directory, probably
|
||||
/usr/share/tesseract-ocr/tessdata or /usr/share/tessdata.
|
||||
|
||||
If Tesseract isn't available for your distribution, or you want to use a newer version
|
||||
than they offer, you can compile your own.
|
||||
|
||||
If you compile Tesseract then following command in its source code are enough
|
||||
```
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
Note:
|
||||
1. CCExtractor is tested with Tesseract 3.04 version but it works with older versions.
|
||||
2. Useful Download links:
|
||||
1. *Tesseract* https://github.com/tesseract-ocr/tesseract/archive/3.04.00.tar.gz
|
||||
2. *Tesseract training data* https://github.com/tesseract-ocr/tessdata/archive/3.04.00.tar.gz
|
||||
|
||||
|
||||
|
||||
Compile CCExtractor passing flags like following
|
||||
-------------------------------------------------
|
||||
```
|
||||
make ENABLE_OCR=yes
|
||||
```
|
||||
|
||||
|
||||
How to compile CCExtractor on Windows with OCR
|
||||
===============================================
|
||||
|
||||
Download prebuild library of leptonica and tesseract from following link
|
||||
https://drive.google.com/file/d/0B2ou7ZfB-2nZOTRtc3hJMHBtUFk/view?usp=sharing
|
||||
|
||||
put the path of libs/include of leptonica and tesseract in library paths.
|
||||
1. In visual studio 2013 right click <Project> and select property.
|
||||
2. Select Configuration properties in left panel(column) of property.
|
||||
3. Select VC++ Directory.
|
||||
4. In the right pane, in the right-hand column of the VC++ Directory property, open the drop-down menu and choose Edit.
|
||||
5. Add path of Directory where you have kept uncompressed library of leptonica and tesseract.
|
||||
|
||||
|
||||
Set preprocessor flag ENABLE_OCR=1
|
||||
1. In visual studio 2013 right click <Project> and select property.
|
||||
2. In the left panel, select Configuration Properties, C/C++, Preprocessor.
|
||||
3. In the right panel, in the right-hand column of the Preprocessor Definitions property, open the drop-down menu and choose Edit.
|
||||
4. In the Preprocessor Definitions dialog box, add ENABLE_OCR=1. Choose OK to save your changes.
|
||||
|
||||
Add library in linker
|
||||
1. Open property of project
|
||||
2. Select Configuration properties
|
||||
3. Select Linker in left panel(column)
|
||||
4. Select Input
|
||||
5. Select Additional dependencies in right panel
|
||||
6. Add libtesseract304d.lib in new line
|
||||
7. Add liblept172.lib in new line
|
||||
|
||||
Download language data from following link
|
||||
https://code.google.com/p/tesseract-ocr/downloads/list
|
||||
after downloading the tesseract-ocr-3.02.eng.tar.gz extract the tar file and put
|
||||
tessdata folder where you have kept CCExtractor executable
|
||||
|
||||
Copy the tesseract and leptonica dll from lib folder downloaded from above link to folder of executable or in system32.
|
||||
96
docs/OCR.txt
@@ -1,96 +0,0 @@
|
||||
|
||||
Overview
|
||||
========
|
||||
OCR (Optical Character Recognisation ) is an technique used to
|
||||
extract text from images. In the World of Subtile, subtitle stored
|
||||
in bitmap format are common and even neccassary. for converting subtile
|
||||
in bitmap format to subtilte in text format ocr is used.
|
||||
|
||||
Dependency
|
||||
==========
|
||||
Tesseract (OCR library by google)
|
||||
Leptonica (image processing library)
|
||||
|
||||
How to compile ccextractor on linux with OCR
|
||||
=============================================
|
||||
|
||||
Download and Install Leptonnica.
|
||||
-------------------------------
|
||||
This package is available, you need liblept-devel library.
|
||||
|
||||
If Leptonica isn't available for your distribution, or you want to use a newer version
|
||||
than they offer, you can compile your own.
|
||||
|
||||
you can download lib leptonica from http://www.leptonica.com/download.html
|
||||
|
||||
Download and Install Tesseract.
|
||||
-------------------------------
|
||||
Tesseract is available directly from many Linux distributions. The package is generally
|
||||
called 'tesseract' or 'tesseract-ocr' - search your distribution's repositories to
|
||||
find it. Packages are also generally available for language training data (search the
|
||||
repositories,) but if not you will need to download the appropriate training data,
|
||||
unpack it, and copy the .traineddata file into the 'tessdata' directory, probably
|
||||
/usr/share/tesseract-ocr/tessdata or /usr/share/tessdata.
|
||||
|
||||
If Tesseract isn't available for your distribution, or you want to use a newer version
|
||||
than they offer, you can compile your own.
|
||||
|
||||
If you compile Tesseract then following command in its source code are enough
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
Note:
|
||||
1) CCExtractor is tested with Tesseract 3.02.02 version.
|
||||
|
||||
you can download tesseract from https://drive.google.com/folderview?id=0B7l10Bj_LprhQnpSRkpGMGV2eE0&usp=sharing
|
||||
|
||||
|
||||
|
||||
Compile CCextractor passing flags like following
|
||||
-------------------------------------------------
|
||||
make ENABLE_OCR=yes
|
||||
|
||||
|
||||
How to compile ccextractor on Windows with OCR
|
||||
===============================================
|
||||
|
||||
Download prebuild library of leptonica from following link
|
||||
http://www.leptonica.com/source/leptonica-1.68-win32-lib-include-dirs.zip
|
||||
|
||||
Download prebuild library of tesseract from following tesseract official link
|
||||
https://code.google.com/p/tesseract-ocr/downloads/detail?name=tesseract-3.02.02-win32-lib-include-dirs.zip
|
||||
|
||||
put the path of libs/include of leptonica and tesseract in library paths.
|
||||
step 1) In visual studio 2013 right click <Project> and select property.
|
||||
step 2) Select Configuration properties in left panel(column) of property.
|
||||
step 3) Select VC++ Directory.
|
||||
step 4) In the right pane, in the right-hand column of the VC++ Directory property,
|
||||
open the drop-down menu and choose Edit.
|
||||
Step 5) Add path of Directory where you have kept uncompressed library of leptonica
|
||||
and tesseract.
|
||||
|
||||
|
||||
Set preprocessor flag ENABLE_OCR=1
|
||||
Step 1)In visual studio 2013 right click <Project> and select property.
|
||||
Step 2)In the left panel, select Configuration Properties, C/C++, Preprocessor.
|
||||
Step 3)In the right panel, in the right-hand column of the Preprocessor Definitions property, open the drop-down menu and choose Edit.
|
||||
Step 4)In the Preprocessor Definitions dialog box, add ENABLE_OCR=1. Choose OK to save your changes.
|
||||
|
||||
Add library in linker
|
||||
step 1)Open property of project
|
||||
Step 2)Select Configuration properties
|
||||
Step 3)Select Linker in left panel(column)
|
||||
Step 4)Select Input
|
||||
Step 5)Select Additional dependencies in right panel
|
||||
Step 6)Add libtesseract302.lib in new line
|
||||
Step 7)Add liblept168.lib in new line
|
||||
|
||||
Download language data from following link
|
||||
https://code.google.com/p/tesseract-ocr/downloads/list
|
||||
after downloading the tesseract-ocr-3.02.eng.tar.gz extract the tar file and put
|
||||
tessdata folder where you have kept ccextractor executable
|
||||
|
||||
Copy the tesseract and leptonica dll in the folder of executable or in system32.
|
||||
246
docs/Python extension module.txt
Executable file
@@ -0,0 +1,246 @@
|
||||
This is the main documentation of Python extension module for CCExtractor:
|
||||
|
||||
====
|
||||
CCExtractor Library
|
||||
|
||||
----
|
||||
Refactoring the codebase into a library
|
||||
Earlier version of CCExtractor was compiled as a binary and could not be used as a library. The entire codebase was executed via a single main function defined in ccextractor.c and this architecture was not suitable for extending ccextractor source code to a library. Hence, many modifications were made to ccextractor.c so that conversion to a library could be done. Major modifications were:
|
||||
Segmenting the larger functions into smaller functions so that they could be called from one main function. Earlier the entire processing was carried out from one main function itself. This was not a good idea considering the possibility for library. This would allow the user to set the parameters to be passed to CCExtractor from Python with one parameter at a time and not the entire list of all parameters together.
|
||||
The refactoring of the code base and architectural judgements as to how the code should be segmented so that the entire working remains the same and also the library structure could be established.
|
||||
Apart from these changes, the header file ccextractor.h was also included into the codebase to define many global variables as well as the function declarations of definitions made in ccextractor.c. The major changes could be seen at this PR (merged). However, following the next stages of development after the changes made in the above mentioned PR, the final structure could be found at ccextractor.c and ccextractor.h.
|
||||
|
||||
----
|
||||
Definitions made in ccextractor.h
|
||||
In ccextractor.h, the major changes included declaring global variables which would be accessible throughout the codebase for calling the respective callbacks (discussed later in the documentation) from C to Python for processing the caption frames in Python as they are extracted in CCExtractor. So we need a global variable to store the py callback function for the future using which type is PyObject*.
|
||||
The major point to note is that the compilation of Python extension module includes setting a macro PYTHON_API which acts as an indication that the compilation is made for Python extension module and this helps in declaring as well as defining the functions which are only needed for Python extension module. As defined here, the PYTHON_API macro is used to define the functions/variables which are needed only by the extension module.
|
||||
Another major advantage of defining the macro PYTHON_API is that the definitions made for Python extension module only need python-dev package as a prerequisite for compilation. However, if the user wants to compile only CCExtractor and not the Python extension module, then the code should not have python-dev package as a dependency. This has been attained by using macro PYTHON_API and C pre-processors.
|
||||
|
||||
====
|
||||
CCExtractor Python Extension Module
|
||||
|
||||
----
|
||||
Extension module dependencies
|
||||
|
||||
1. SWIG
|
||||
For generation of the wrappers of the C code base, which would then be used to compile the extension module, I have used SWIG (swig-3.0.12). The entire compilation has been included in a build script (discussed later) and the user need not have prior knowledge of SWIG to get started.
|
||||
For compiling the Python extension module, the second dependency in addition to the dependencies of CCExtractor is SWIG. The user can follow these installation steps for getting SWIG installed.
|
||||
For generating the wrappers of the C/C++ code in a user required language, the user needs to have a basic understanding of the interface file which is used by SWIG. However, in case of generating the extension module for CCExtractor, the interface file has been written and is available here. SWIG uses this interface file to generate the wrappers for CCExtractor which are then compiled to form the extension module.
|
||||
2. Python-dev package
|
||||
|
||||
----
|
||||
Overall architecture
|
||||
|
||||
The entire Python Extension module related work is done in the api/ directory with modifications to the CCExtractor codebase to integrate the divergent path, CCExtractor would take if the processing is done via Python module.
|
||||
|
||||
----
|
||||
Generating the Python extension module:
|
||||
|
||||
For this project, I have mainly used two build scripts, viz., build_api and build_library which are both present in the api/ directory. For generating the Python bindings, user need to just run the build_library script as ./build_library. This would internally generate the SWIG wrappers from the SWIG interface file (ccextractor.i) present in the same directory. The user should note that if the user has not installed SWIG, the the compilation would stop at this step itself. Once the wrappers are generated, then the build_library script would execute the build_api script which would compile the entire code base of CCExtractor along with the wrappers generated by SWIG. In addition to this, build_api would also compile the wrappers defined in the wrappers/ directories. Once the compilation is successful, then build_library would generate a shared library called _ccextractor.so from the entire code which would be shared object for the module.
|
||||
In addition to generating the wrapper codes generated by SWIG, it also outputs the ccextractor.py which would be later used as Python extension module for accessing CCExtractor functionality via Python.
|
||||
As mentioned in earlier section, the build_api compiles the entire code base with an option -DPYTHON_API which is used by GCC to define a macro PYTHON_API. This macro then acts as a signal telling that the extension module is being generated and the bindings dependency need a check as well as the bindings dependent functions need to be defined.
|
||||
|
||||
----
|
||||
Workflow of Python extension module
|
||||
|
||||
The following section encompasses on the detailed description of the entire workflow of Python extension modules and the importance of each function in the codeflow. An example usage has been done in api_testing.py.
|
||||
|
||||
****
|
||||
api_init_options
|
||||
Function declaration- struct ccx_s_options* api_init_options()
|
||||
This function returns an initialized instance of struct ccx_s_options which is modified in CCExtractor according to the values of the parameters provided by the user while executing CCExtractor.
|
||||
****
|
||||
check_configuration_file
|
||||
Function declaration- void check_configuration_file(struct ccx_s_options api_options)
|
||||
This function is used to check the configuration file and it takes the struct ccx_s_options instance as returned by api_init_options().
|
||||
****
|
||||
api_add_param
|
||||
Function declaration- void api_add_param(struct ccx_s_options* api_options,char* arg)
|
||||
The api_add_param function is used to add user passed parameters to the struct ccx_s_options instance which would be used to compile the parameters and make the necessary modifications in the working of CCExtractor.
|
||||
This function takes the instance of struct ccx_s_options passed to check_configuration_file function and also, the string denoting the parameter passed by the user.
|
||||
The parameters are added to the python_params element of struct ccx_s_options and the count of the parameters is kept in python_param_count.
|
||||
****
|
||||
my_pythonapi
|
||||
Function declaration- void my_pythonapi(struct ccx_s_options *api_options, PyObject *callback_func)
|
||||
The my_pythonapi is aimed to provide a Python api to add the callback function when the subtitle extractor had done everyline
|
||||
Thus, it can been observed that my_pythonapi takes two arguments when the compilation is done as extension module. In both the case, the first argument is struct ccx_s_options instance as used by api_add_param. But in case of compiling the extension module, the my_pythonapi function takes a second parameter which is the python callback function that CCExtractor would call when passing values from C to Python (a detailed discussion about this has been done later).
|
||||
This function is not a mandatory function to call when using the CCExtractor binary.
|
||||
****
|
||||
compile_params
|
||||
Function declaration- int compile_params(struct ccx_s_options *api_options,int argc)
|
||||
The compile_params function mainly compiles all the parameters supplied by the user and modifies the elements of the api_options on the basis of the parameters supplied by the user.
|
||||
In this function, we add a dummy parameter ./ccextractor so that the parse_params function which is called from compile_params function properly compiles all the parameter except the first parameter as done in here.
|
||||
This function then returns the return value as obtained by the parse_params function.
|
||||
****
|
||||
api_start
|
||||
Function declaration- int api_start(struct ccx_s_options api_options)
|
||||
This is the most important function of entire processing done by CCExtractor. After the entire compiling of parameters have been completed, then comes the stage when the actual processing is done.
|
||||
The api_start is the function which is majorly responsible for extracting the caption frames and passing them back to Python for processing.
|
||||
|
||||
The user should note that the codeflow discussed above till this point is generic to both CCExtractor binary as well as CCExtractor’s Python extension module. From this point onwards, the codeflow that has been described is mainly how the Python extension module accepts the caption frames via callback function and then processings done on the caption frames to generate the output subtitle file (.srt) via Python.
|
||||
|
||||
The api_start function in case of CE-608 captions calls a function general_loop for processing of the sample(video) that needs to be processed which in turn makes a call to encode_sub which encodes the subtitle buffer obtained from the sample.
|
||||
In encode_sub function, the sub_type is checked to be CE-608. If the sub_type is 608, then a call to pass_cc_buffer_to_python is made. Otherwise, the processing continues as if the call for processing was made from CCExtractor binary.
|
||||
From the pass_cc_buffer_to_python function, the call is made to the extractor function, then the extractor function in turns calls the callback function provided earlier via my_pythonapi function. The arguments given to the callback function are the ones corresponding to the information content of the caption frame which has been processed by CCExtractor. This information is accessed via the Python SRT generator scripts which would process the caption frames and write the processed information in the output subtitle files.
|
||||
The following sections would be sequential in-detail descriptions about how each process functions:
|
||||
|
||||
----
|
||||
Python Encoder for CCExtractor
|
||||
|
||||
Following the architecture of CCExtractor’s codebase, a new file named ccx_encoders_python.c was added. The main reason of adding this file was to define the functions which would be called when the extraction process or CCExtractor extraction functionality is being performed via Python extension module. At this moment, since the extension module extends support only for CE-608 samples, only pass_cc_buffer_to_python function has been defined. Later on, when the binding’s support is extended to support other formats then in that case other functions like pass_cc_bitmap_to_python and others would be included in this file following the architecture of other encoders.
|
||||
****
|
||||
pass_cc_buffer_to_python
|
||||
Function declaration- int pass_cc_buffer_to_python(struct eia608_screen *data, struct encoder_ctx *context)
|
||||
This is the function where the actual work of passing the extracted caption buffer to Python extension modules for processing the caption frames is done.
|
||||
The pass_cc_buffer_to_python function is called when the sample from which the caption frames are to be extracted is a CE-608 sample and the call for extraction is made from Python extension module.
|
||||
In this function, whenever a caption frame element is extracted, be it the srt_counter, caption timing information or any information related to the text, font or color grid of the CE-608 captions, then that information is passed to extractor function defined in extractors/ directory. A detailed description about how exactly the extractors function would be included in the next section.
|
||||
|
||||
----
|
||||
Extractors for bindings
|
||||
|
||||
As documented in the previous section, when the extraction of CE-608 caption frames in done via Python, then the call is made to pass_cc_buffer_to_python function defined in ccx_encoders_python.c. In this function, after extracting lines in a caption frame (lines may belong to any of the text, font or color grid for CE-608), those lines are passed to python_extract_g608_grid function defined also in ccx_encoders_python.c.
|
||||
****
|
||||
python_extract_g608_grid
|
||||
Function declaration- void python_extract_g608_grid(unsigned h1, unsigned m1, unsigned s1, unsigned ms1, unsigned h2, unsigned m2, unsigned s2, unsigned ms2, char* buffer, int identifier, int srt_counter, int encoding)
|
||||
The main aim of using python_extract_g608_grid function is to able to identify the lines belonging to a particular frame and then passing these lines to the Python callback function with added identifiers for identification as to which CE-608 grid those lines belong to in a particular caption frame. More documentation about the identifiers and the nomenclature used for the bindings has been documented in the ‘Support for only CE-608 captions’ section and the user is advised to read that section to get a better understanding of the nomenclature.
|
||||
The arguments passed to python_extract_g608_grid include encoding which is the encoding that CCExtractor would have used to write the output subtitle file. Thus, the encoding is passed from CCExtractor to Python via the callback function so that the output subtitle file generated by Python would have the same encoding as the output generated by CCExtractor would have had.
|
||||
Out of all the arguments that are passed to the python_extract_g608_grid function, the one interesting argument is the identifier argument which has different values depending on the type of caption frame line it is called with. For example, if the line passed to python_extract_g608_grid function is a line belonging to its color grid, then the value of the identifier would be 2. Similarly, we have:
|
||||
identifier = 0 -> adding start and end time
|
||||
identifier = 1 -> subtitle
|
||||
identifier = 2 -> color
|
||||
identifier = 3 -> font
|
||||
identifier = 4 ---> end of frame
|
||||
This is how the python_extract_g608_grid function is able to generate the entire caption frame for a CE-608 sample along with timings.
|
||||
|
||||
----
|
||||
Callback Function architecture
|
||||
|
||||
When using the extension module, when a particular C function is called from Python, the control is transferred to C and returned to Python only after the execution of the function. However, according to the adopted architecture, a single function would process the entire sample and extract all the caption frames until the control is passed back to Python for processing the captions in Python. Thereupon, for further processing in Python the user would have had to wait until the end of the extraction of all the caption frames from the sample. This would violate the basic ideology that the module should be able to process the caption frames in Python as they are extracted in CCExtractor rather than waiting till the end of extraction from the entire sample.
|
||||
As a result of this, the callback function architecture was adopted. The main advantage of this architecture is that the moment a line from the caption frame is extracted the line is passed via a callback function to Python and the processing of the extracted line could be done in Python.
|
||||
In the present architecture, the user has a flexibility to tell CCExtractor which Python function would act as a callback function and a mechanism has been designed to convey this function to CCExtractor. This has been done with the use of my_pythonapi function as discussed in the previous sections.
|
||||
NOTE: In the api_testing.py, I have defined the callback function to be named callback. However, the user has complete freedom to define any name for the callback function. The user needs to note that the callback function would be getting nothing but a line from the caption frame that is extracted by CCExtractor. Further processing of the extracted line is the responsibility of the user.
|
||||
After defining the callback function, the user needs to make sure that this function is passed via Python to CCExtractor so that it can be used for callback. For doing so, the user needs to set the second argument of the function my_pythonapi as the callback function. This has been done in the api_testing.py script and the user can refer to it for example.
|
||||
A detailed description about why a single line of the caption frame is passed via the callback function and not the entire frame is described in detail in later sections.
|
||||
Also, when the user passes the callback function via Python to CCExtractor so the my_pythonapi function saves a pointer to this function as an element to a global structure, array, defined and declared in ccextractor.h. The element reporter holds the callback function passed by user via Python.
|
||||
Whenever the user wants to pass a line to the callback function then the user needs to call the function py_callback which has been defined in ccextractor.c.
|
||||
****
|
||||
py_callback
|
||||
Function declaration- void py_callback(char *line, int encoding);
|
||||
The py_callback function takes two arguments and their description is as follows:
|
||||
The first argument is the line which needs to be passed to Python.
|
||||
The second is the line's encoding.
|
||||
This is how the callback mechanism works for passing the lines from C to Python in real time.
|
||||
|
||||
----
|
||||
Processing output in Python
|
||||
|
||||
As described in the previous sections, the extension modules just return a single line from the caption frames. The processing of the caption frames to generate the output subtitle file is done in Python.
|
||||
A script to generate an output subtitle file from the extracted captions frames in Python has been written. The api_testing.py has a function named callback which acts as a callback function returning the extracted caption lines in Python. These lines then are passed to generated_output_srt in api_support.py described in the api/ directory. Thereupon, the function searches if the line has specific identifier which are used to decide how the output would be generated. A detailed section has been included in this documentation regarding the nomenclature used for processing different lines in CE-608 format caption fields (Support for only CE-608 captions section). The main reason for doing so is to avoid any buffering in C to hold the caption lines until the entire caption frames are extracted. This facilitates real time processing of the extracted caption frames.
|
||||
For getting the output filename from CCExtractor which would then be used to write the output srt file from Python, whenever the code is run from the extension module the first line that is passed via the callback function is the output filename generated by CCExtractor. This is incorporated by calling the callback function from init_write function defined in the src/lib_ccx/output.c file. The line passed to the callback function is of the format filename-<name of the output file to be generated> and this is then used to generate the output file. This line is then captured in the generate_output_srt function defined in the api_support.py.
|
||||
However, if the user wants the flexibility of defining the filename in a different manner, then for such outputs, the user must make changes in the generate_output_srt function to set the filename and ignoring the first line that appears in Python via the callback function.
|
||||
|
||||
----
|
||||
Support for only CE-608 captions:
|
||||
|
||||
For understanding the CE-608 caption format, the user is advised to refer to this documentation on CE-608.
|
||||
|
||||
The Python extension module is so far able to extract the captions frames from CE-608 samples. In samples with CE-608, the caption frames that are extracted by CCExtractor are in the form a 15x32 grid which depicts the screen. Thus, the information regarding the font of the captions, the colour they would be having on the screen as well as their alignment on the screen is captured in font,color and text grids respectively.
|
||||
Using Python modules each of such grids can be accessed in Python. However, as described in the previous section the callback function gets a single line and not the entire grid from CCExtractor, some processing needs to be done in Python for getting the user required grids per caption frames.
|
||||
The functions which would be acting as the processing and buffering functions for grid generations are present in the ccx_to_python_g608.py. The two major functions are return_g608_grid and g608_grid_former. The g608_grid_former is mainly used to form the grid from lines obtained at the callback function.
|
||||
The main advantage of the return_g608_grid function is that the user can generate whatever pattern the user desires to process in Python. For accessing various different combinations of the font, color and text grids in CE-608, a help_string has been defined in the return_g608_grid function in the ccx_to_python_g608.py file which describes on the value of mode to be passed to this function to get proper combination of the grids.
|
||||
In the earlier sections it has been stated that the callback function in Python is not passed with the entire caption frame but just one single line from the frame, a particular nomenclature has been devised to make sure that the lines belonging to the same caption frames are identified in the Python interface. The nomenclature is as follows:
|
||||
For every frame, the first line that is passed to the callback function is the srt_counter which indicates the identifier value of the caption frame that would be extracted next.
|
||||
Following the srt_counter, the next line would contain a conjunction of the start time and end time of the caption frame with respect to the timings when the captions would be visible on the screen. The start_time and end_time would be conjuncted as start_time-<start time>\t end_time-<end time>\n and the user needs to process this line to get the timings. This processing in case of getting a srt file as an output has been done in the generate_output_srt function.
|
||||
After the timings have been sent via the callback function, until the next srt_counter is extracted, the lines containing information about the color, font or text grids of CE-608 samples are passed via the callback function to Python.
|
||||
For processing the grids separately, the color grid could be identified by identifying the presence of color[<srt_counter value>]:<color grid line> in the line obtained from the callback function. Similarly, for the font and text grids, the nomenclatures are font[<srt_counter value>]:<font grid line> and text[<srt_counter value>]:<text grid line> respectively. Processing a grid on the basis of such a nomenclature has been done in the g608_grid_former in the ccx_to_python_g608.py file.
|
||||
After the entire caption frame has been sent via the callback function to Python for further processing, when the extraction of present caption frames finishes and CCExtractor shifts to a new frame, then a line containing ***END OF FRAME*** is passed via the callback function from C to Python. The user needs to catch this line in order to get the signal that from the next line onwards a new caption frame would begin. Similar approach has been implemented in the function generate_output_srt in the api_support.py file.
|
||||
This is how the entire CE-608 is transmitted to Python and the user needs to follow the nomenclature in order to get the caption frames in Python.
|
||||
However, if the user thinks to modify the nomenclature in accordance with some other nomenclature that suits their use case, then the user can do so by editing the python_extract_g608_grid function in the ccx_encoders_python.c file. In this file, the user needs to find the lines where the function py_callback is called with its parameter which are subtitle line and encoding.
|
||||
|
||||
----
|
||||
Wrappers for the extension module
|
||||
|
||||
In case of using an API, it is highly desired to set the parameters desired by the user not via command line but as call to built-in functions. This gave rise to the necessity of wrapper functions which can be called to set certain parameters for directing the functioning of the bindings.
|
||||
The wrappers have been defined in the wrapper.c file in api/wrappers/ directory. The user can use just call the wrappers to set some parameters. More wrappers can be defined according to the architecture followed in wrapper.c.
|
||||
The user needs to note that the wrappers can be called anytime in between adding parameters to CCExtractor instance (as done in api_testing.py) and before calling the compile_params function from the CCExtractor module.
|
||||
Another thing to note about the wrapper is that, the my_pythonapi wrapper function is a very important wrapper function. It tells CCExtractor that the call has been made using the Python module and thus the functioning of CCExtractor is altered. Hence, if the user intends to use the Python module the user is always advised to call this wrapper function with its first argument to be the object returned by api_init function from CCExtractor module and second argument being the callback function which would be called by the CCExtractor to pass the extracted caption lines back to Python.
|
||||
|
||||
----
|
||||
Test Script
|
||||
|
||||
Once the Python module are generated then the user can use them by importing ccextractor module in Python.
|
||||
For testing the output of the bindings a test script, api_testing.py. But to mention, the module at this stage only supports generating a subtitle file from the CE-608 standard samples only.
|
||||
Another testing feature, that has been added is that the user can use recursive_tester.py to generate the subtitle files for all the samples from a directory. The only parameter needed to run this script is the location of all the samples.
|
||||
|
||||
----
|
||||
Silent API
|
||||
|
||||
The Python bindings have been designed in such a way that the API is silent in itself as well as in the form of output generation. Silent in itself means that the API doesn’t write out any output to the STDOUT and the entire output of CCExtractor is silenced when the module is used for extraction of caption frames. This feature has been made possible by passing a parameter -pythonapi internally in api_testing.py using the function my_pythonapi() from the ccextractor module. The -pythonapi internally makes CCExtractor to silence all the outputs that could have been generated otherwise.
|
||||
If the user wants to add some print functionality from the CCExtractor, then may be defining the prints using printf C function could be an option. Note that the user cannot use the mprint function to get prints from the extension module from inside the CCExtractor C code part as used in CCExtractor to get the desired STDOUT prints as these are silenced via -pythonapi.
|
||||
|
||||
====
|
||||
Work status
|
||||
The proposal made by me for this project had a major component of multi-threading to let CCExtractor’s Python bindings run the CCExtractor’s extraction process in multi-threads.
|
||||
However, the end goal was modified while the GSOC 2017 coding period and after Second Phase Evaluation, the main aim was to create a Python extension module for CCExtractor which could process CE-608 video samples, extract the caption information present in them and pass this information to Python for further processing. The module was expected to be silent and the output generation from the caption information present in the video sample has to be done via Python.
|
||||
The present status of the extension module is that the module can extract caption information from CE-608 standard video samples and pass the caption information to Python. Further work has also been done to process this caption information to generate an output subtitle(srt) file (the user is advised to check completion of comparing_text_font_grids function sub-section under the future work section).
|
||||
|
||||
====
|
||||
Future Work
|
||||
|
||||
----
|
||||
Identifying the input format and raising errors if unsupported
|
||||
|
||||
CCExtractor does not process any non-video files. Similarly, the processing of non-video files is not supported by extension module. However, since the API has been designed to be silent, the module doesn’t output any error log stating that the input file is a non-video file and it cannot be processed.
|
||||
This is a much desired feature and the present version of CCExtractor extension module lacks this feature. I would be working on this feature post GSOC 2017 but if any user finds that this feature has not been added until they start contribution to CCExtractor’s extension module, then their work on this feature would be highly appreciated.
|
||||
For adding this feature to extension module, the extension module must be extended to process the return value from CCExtractor as done in the api_start function. When the sample (non-video) is processed via CCExtractor’s binary, then the processing is stopped by raising an ‘Invalid option to CCExtractor Library’ error. However, since the extension module has been designed to be silent, this error message is suppressed. Hence, the user should extend the test scripts to process the return value of api_start function in python extension module according to the constants defined in ccx_common_common.h
|
||||
|
||||
----
|
||||
Callback class mechanism
|
||||
|
||||
The present architecture uses a callback mechanism to pass the extracted caption lines from the caption frames of CE-608 captions to Python for further processing. In the callback mechanism, a callback function is supplied to CCExtractor in C via the my_pythonapi function which stores the callback function as a PyObject* in the global variable array. However, according to Python documentation on C-API, everything in Python is a PyObject; be it a function, a tuple or a class.
|
||||
So, the ideology is to replace the present callback function by a class which can have many methods that the user can use for different use cases.
|
||||
An example of such an implementation has been done here. The user needs to note that for accessing the Python class in C, some modifications need to be done to the py_callback function defined in ccextractor.c and a sample example for calling a class method named ‘callback’ could be found here.
|
||||
Also, an important point to be noted in this case is that the user needs to pass the callback function’s name to run function in C so that the corresponding callback method of the class passed via my_pythonapi could be called via C. As an example, the callback method’s name has been provided here.
|
||||
For understanding the exact implementation of this approach, I would recommend the user to understand C-API for Python as the documentation is quite extensive to every use case.
|
||||
|
||||
----
|
||||
Completion of comparing_text_font_grids function
|
||||
|
||||
The Python extension module for CCExtractor is able to pass lines of the caption frames for different grids of CE-608 captions. However, for generating the subtitle file from the caption grids, the text grid needs to be modified according to the color grid as well as font grid. In CCExtractor, this job is done at the function, get_decoder_line_encoded.
|
||||
For generation of subtitle files (.srt files) from Python, an equivalent version of get_decoder_line_encoded has been implemented in Python and has been defined as comparing_text_font_grids in python_srt_generator.py
|
||||
However, as the user can note that this function is not a complete implementation of get_decoder_line_encoded function, completion of this function’s definition is a matter of future work.
|
||||
|
||||
----
|
||||
Adding more wrapper functions
|
||||
|
||||
As described in the ‘Wrappers for the extension module’ section, more wrapper functions are needed to be declared in the wrapper.c file. For example, few wrappers have been defined. More wrapper functions can be defined in a similar manner.
|
||||
Extending the module to support other caption formats
|
||||
In this version, CCExtractor’s extension module supports processing of video samples having CE-608 standard captions in them and writing these captions to output subtitle (.srt) files.
|
||||
However, CCExtractor in itself has support for other caption standards like DVB, 708 etc. So, extension of module to extract of caption information from samples containing the caption information in these formats is a future task.
|
||||
The user should note that the information passed from CE-608 to Python is in raw form as lines which are then used to form the 608 grids. Similarly, the extension to other formats must consider passing the raw information of caption in respective format and then processing the information extracted by CCExtractor in Python.
|
||||
While extending, the architecture to be followed for ccx_encoders_python should be consistent to other encoders in the codebase to maintain uniformity. Thus for DVB samples, a function name pass_cc_bitmap_to_python and for 708 samples pass_cc_subtitle_to_python need to be declared in ccx_encoders_python.c.
|
||||
|
||||
====
|
||||
PyPI module
|
||||
(This section is for contributors who want to upload the package to PyPI)
|
||||
The PyPI module that has been uploaded has many things added to the CCExtractor code tree and all of this can be found here (branch - manifest_file).
|
||||
The contributor is advised to use the documentation at ‘An Introduction to Distutils’ and its subsequent parts to understand this section.
|
||||
The overall strategy or steps that have been followed to generate the distribution for being uploaded to PyPI is as follows:
|
||||
|
||||
----
|
||||
Adding files to distribution and generating the distribution
|
||||
|
||||
All the files that are needed to be included in the package distribution are to be added the MANIFEST file as done here. For understanding the syntax used in MANIFEST file the user can check this documentation.
|
||||
After the MANIFEST file has been written properly, the user can generate the distribution package by the command
|
||||
python setup.py sdist
|
||||
This command would generate the distribution on the basis of MANIFEST file and place in the dist/ directory as a .tar.gz file until specified otherwise by the user.
|
||||
One thing to mention about the MANIFEST file is that it can only include files/folders from the folder it is defined within. It cannot include directories/files from parent directory or any other child directory. However, in the MANIFEST file I used, I have added the symlink to src main src directory so that the source code can be added to the package distribution via the MANIFEST file.
|
||||
|
||||
----
|
||||
An analysis of the setup.py file used
|
||||
|
||||
The setup.py has been used to install the Python module on the user system. To understand what all the parameters mean in setup the user must refer to this documentation.
|
||||
The cmdclass defined at line is a very important part of the script as it internally makes call to the scripts included in package_build_scripts. A point to note is that this directory is used to include the scripts into the package distribution via the MANIFEST file.
|
||||
The scripts in package_build_scripts are the scripts which do the actual compilation of the source code to required python module and shared object. The user is advised to refer to build_library_package and build_api_package to understand how to compilation process takes place. The user may also refer to this documentation for understanding how the build scripts work.
|
||||
For any modifications made to the build scripts, viz, build_library and build_api corresponding modifications are to be made to the scripts included in package_build_scripts so that the compilation does not fail while installing the Python extension module.
|
||||
The ccextractor.i used in the package_build_scripts is an interface file used by SWIG to generate the wrapper codes. This is an essential part and should always be present with the distribution.
|
||||
@@ -1,37 +1,17 @@
|
||||
ccextractor, 0.75
|
||||
-----------------
|
||||
Authors: Carlos Fernández (cfsmp3), Volker Quetschke.
|
||||
Maintainer: cfsmp3
|
||||
|
||||
Lots of credit goes to other people, though:
|
||||
McPoodle (author of the original SCC_RIP), Neuron2, and others (see source
|
||||
code).
|
||||
|
||||
Home: http://www.ccextractor.org
|
||||
|
||||
You can subscribe to new releases notifications at freshmeat:
|
||||
|
||||
http://freshmeat.net/projects/ccextractor
|
||||
|
||||
Google Summer of Code 2014 students
|
||||
- Willem van iseghem
|
||||
- Ruslan KuchumoV
|
||||
- Anshul Maheshwari
|
||||
CCExtractor
|
||||
(check AUTHORS.TXT for history and developers)
|
||||
----------------------------------------------
|
||||
|
||||
License
|
||||
-------
|
||||
GPL 2.0.
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
ccextractor was originally a mildly optimized C port of McPoodle's excellent
|
||||
but painfully slow Perl script SCC_RIP. It lets you rip the raw closed
|
||||
captions (read: subtitles) data from a number of sources, such as DVD or
|
||||
ATSC (digital TV) streams.
|
||||
|
||||
Since the original port, lots of changes have been made, such as HDTV
|
||||
support, analog captures support (via bttv cards), direct .srt/.smi
|
||||
generation, time adjusting, and more.
|
||||
Since the original port, the whole code has been rewritten (more than once,
|
||||
one might add) and support for most subtitle formats around the world has
|
||||
been added (teletext, DVB, CEA-708, ISDB...)
|
||||
|
||||
Basic Usage
|
||||
-----------
|
||||
|
||||
27
docs/Updating_Dependencies.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
A guide to how dependencies should be updated in CCExtractor.
|
||||
|
||||
Author: thealphadollar
|
||||
======================
|
||||
|
||||
CCExtractor depends on multiple dependencies and they are updated from time to time. On every major revision of the dependencies, the changes need to be incorporated into our repository.
|
||||
|
||||
It is not straightforward since we make minor (or sometimes major) changes into the library to use it and these changes are lost in case of direct file replacement. To overcome this issue, we should follow the below pathway.
|
||||
|
||||
*) Create a duplicate copy of the CCExtractor's folder of the library, to be updated (we will be calling this folder lib(copy) in steps and original one as lib).
|
||||
*) Download the latest files of the library from official source (the folder is called as lib(orig) in further steps).
|
||||
*) Look for files with the same name in lib and lib(orig). It can be done manually in case of small libraries (libpng), otherwise a script can be written utilising the grep command to find out files from the library which we use.
|
||||
*) In lib, replace all the files (found in previous step) with their updated versions from lib(orig). A copy command can be used in the script written for the previous step to accomplish this step.
|
||||
|
||||
Now, the files in our repository have been updated. In steps to follow, we will try to grab lost changes using lib(copy).
|
||||
|
||||
*) Run diff command between lib(copy) and lib for all files and store the output in a text document. Here files from lib(copy) should be given as first argument to notice deletions clearly.
|
||||
*) Look for deletions in an updated file and manually inspect (or ask mentor) whether that part is to be restored or not. In most cases, it is to be restored but it's better to ask than to break.
|
||||
|
||||
Once the changes have been restored, try to compile CCExtractor. It is very much likely that the compilation will fail. The most probably reason for this could be inclusion of unnecessary lines of code and their accompanying dependencies.
|
||||
e.g "X is not defined" can be an error when we don't include the file in which X is defined nor remove the unnecessary line using X.
|
||||
CCExtractor doesn't use a library fully, we use only the code and files necessary. This requires manual removal of extra lines and dependencies.
|
||||
|
||||
*) Output the compilation erros in a text document while compiling.
|
||||
*) Use inspection and comparison with lib(copy) to decide whether the line causing error is to be removed.
|
||||
|
||||
Compile again, debug and push the change for the Continuous Integration tests on samples.
|
||||
@@ -1,13 +1,13 @@
|
||||
#######################################################
|
||||
# Version 0.01
|
||||
#
|
||||
# To enable required option please uncommnent option
|
||||
# To enable required option please uncomment option
|
||||
#
|
||||
|
||||
|
||||
# The Input Source tag option give ability to user
|
||||
# to take imput from file, standurd input or network
|
||||
# This tag take number in its input and there meanings
|
||||
# The Input Source tag option gives ability to user
|
||||
# to take input from file, standard input or network
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = file
|
||||
# 1 = stdin
|
||||
@@ -16,12 +16,12 @@
|
||||
INPUT_SOURCE=0
|
||||
|
||||
# The Buffer Input tag
|
||||
# This tag take number in its input.
|
||||
# This tag takes number in its input.
|
||||
|
||||
#BUFFER_INPUT=0
|
||||
|
||||
# The Direct Rollup tag
|
||||
# This tag take number in its input and there meanings
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = no
|
||||
# 1 = yes
|
||||
@@ -29,7 +29,7 @@ INPUT_SOURCE=0
|
||||
#DIRECT_ROLLUP=
|
||||
|
||||
#The No font Color Tag
|
||||
# This tag take number in its input and there meanings
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = no
|
||||
# 1 = yes
|
||||
@@ -37,16 +37,16 @@ INPUT_SOURCE=0
|
||||
#NOFONT_COLOR=
|
||||
|
||||
#The No type Setting Tag
|
||||
# This tag take number in its input and there meanings
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = no
|
||||
# 1 = yes
|
||||
|
||||
#NOTYPE_SETTING=
|
||||
|
||||
# The Codec Tag take the preference of codec
|
||||
# The Codec Tag takes the preference of codec
|
||||
# tag CCX_CODEC_ANY is by default
|
||||
# This tag take number in its input and there meaning
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = CCX_CODEC_ANY
|
||||
# 1 = CCX_CODEC_TELETEXT
|
||||
@@ -56,7 +56,7 @@ INPUT_SOURCE=0
|
||||
|
||||
# The NO Codec Tag do not use codec specified
|
||||
# tag CCX_CODEC_NONE is by default
|
||||
# This tag take number in its input and there meaning
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 1 = CCX_CODEC_TELETEXT
|
||||
# 2 = CCX_CODEC_DVB
|
||||
@@ -66,7 +66,7 @@ INPUT_SOURCE=0
|
||||
|
||||
# OUTPUT_FORMAT tag specify format of output
|
||||
# by default output format is srt
|
||||
# This tag take number in its input and there meaning
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = CCX_OF_RAW
|
||||
# 1 = CCX_OF_SRT (default)
|
||||
@@ -87,7 +87,7 @@ INPUT_SOURCE=0
|
||||
|
||||
#START_CREDIT_TEXT=
|
||||
|
||||
# Start credit do not start before apecified time in tag
|
||||
# Start credit do not start before specified time in tag
|
||||
# this tag only accepts SS, MM:SS or HH:MM:SS
|
||||
|
||||
#START_CREDIT_NOT_BEFORE=
|
||||
@@ -124,7 +124,7 @@ INPUT_SOURCE=0
|
||||
|
||||
#END_CREDITS_FOR_ATMOST
|
||||
|
||||
# Is Video edited or splitted by tool
|
||||
# Is Video edited or split by tool
|
||||
# By default its 1, ccextractor will process input files in
|
||||
# sequence as if they were all one large file i.e
|
||||
# split by a generic, non video-aware tool. If you
|
||||
@@ -140,7 +140,7 @@ INPUT_SOURCE=0
|
||||
# overrides the default PTS timing,GOP timing is always
|
||||
# used for Elementary Streams.
|
||||
#
|
||||
# This tag take number in its input and there meaning
|
||||
# This tag takes number in its input and their meanings
|
||||
# are following
|
||||
# 0 = use pts for time (when reasonable)
|
||||
# 1 = use gop for time (when reasonable)
|
||||
@@ -164,7 +164,7 @@ INPUT_SOURCE=0
|
||||
# emulation, you can have ccextractor write only one
|
||||
# line at a time, getting rid of these repeated lines.
|
||||
#
|
||||
# This tag take number in its input and there meaning
|
||||
# This tag take number in its input and their meanings
|
||||
# are following
|
||||
# 0 = no (default)
|
||||
# 1 = yes
|
||||
|
||||
340
docs/freetype.TXT
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 of the License, 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
339
docs/gpl-2.0.txt
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 of the License, 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
821
docs/guidoc.md
Normal file
@@ -0,0 +1,821 @@
|
||||
# Documentation
|
||||
## CCExtractor Graphical User Interface
|
||||
### Code Structure:
|
||||
```
|
||||
src/GUI
|
||||
├── activity.c -Activity window definitions
|
||||
├── activity.h -Activity window declarations
|
||||
├── ccextractorGUI.c -Contains main() and GUI code for 'Main' Tab + 'Menu'
|
||||
├── ccextractorGUI.h -Function and structure declarations
|
||||
├── ccx_cli_thread.c -All the functions (definitions) passed in threads
|
||||
├── ccx_cli_thread.h -Function, variables & structs declaration used in thread
|
||||
├── command_builder.c -Builds command to pass to CLI CCExtractor
|
||||
├── command_builder.h -Function, variables & structs declaration used
|
||||
├── file_browser.c -Function definition for File Browser
|
||||
├── file_browser.h -Function, struct & variable declaration
|
||||
├── nuklear_lib -Diretory contains Library Files
|
||||
│ ├── nuklear_glfw_gl2.h -GLFW backend source header to interact with Nuklear
|
||||
│ └── nuklear.h -Nuklear library source code
|
||||
├── popups.c -Function definitions for all Popups used
|
||||
├── popups.h -Function & network struct declaration for all Popups
|
||||
├── preview.c -Preview window definitions
|
||||
├── preview.h -Preview window definitions
|
||||
├── save_load_data.c -Function definition to save last run state
|
||||
├── save_load_data.h -Function declaration to save last run state
|
||||
├── stb_image.h -Code to load images
|
||||
├── tabs.c -Function definitions for all tabs except 'Main' tab
|
||||
├── tabs.h -Function, variable and structure declarations
|
||||
├── terminal.c -Code for terminal Window
|
||||
└── win_dirent.h -Dirent API for Windows
|
||||
```
|
||||
### File by File functions:
|
||||
activity.c
|
||||
[nk_begin](#nk-begin)(ctx, "Activity", nk_rect(x, y, width, height), NK_WINDOW_TITLE|NK_WINDOW_BACKGROUND);
|
||||
[nk_end](#nk-end)(ctx);
|
||||
[nk_layout_row_dynamic](#nk-layout-row-dynamic)(ctx, 40, 1);
|
||||
[nk_label_wrap](#nk-label-wrap)(ctx, [main_settings](#struct-main-tab)->activity_string[i]);
|
||||
[nk_window_is_closed](#nk-window-is-closed)(ctx, "Activity");
|
||||
|
||||
activity.h
|
||||
int [activity](#func-activity)(struct [nk_context](#nk-context) *ctx, int x, int y, int width, int height, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
|
||||
ccextractorGUI.c
|
||||
[nk_menubar_begin](#nk-menubar-begin)(ctx);
|
||||
[nk_layout_row_begin](#nk-layout-row-begin)(ctx, NK_STATIC, 30, 3);
|
||||
[nk_layout_row_push](#nk-layout-row-push)(ctx, 80);
|
||||
[nk_menu_begin_label](#nk-menu-begin-label)(ctx, "Preferences", NK_TEXT_LEFT, [nk_vec2](#nk-vec2)(120, 200));
|
||||
[nk_menu_end](#nk-menu-end)(ctx);
|
||||
[nk_menubar_end](#nk-menubar-end)(ctx);
|
||||
[nk_layout_space_begin](#nk-layout-space-begin)(ctx, NK_STATIC, 15, 1);
|
||||
[nk_layout_space_end](#nk-layout-space-end)(ctx);
|
||||
[nk_style_push_vec2](#nk-style-push-vec2)(ctx, &ctx->style.window.spacing, [nk_vec2(](#nk-vec2)0, 0));
|
||||
[nk_style_push_float](#nk-style-push-float)(ctx, &ctx->style.button.rounding, 0);
|
||||
[nk_button_label](#nk-label-button)(ctx, names[i]);
|
||||
[nk_style_pop_float](#nk-style-pop-float)(ctx);
|
||||
[nk_group_begin](#nk-group-begin)(ctx, "Advanced Tabs", NK_WINDOW_NO_SCROLLBAR);
|
||||
[nk_group_end](#nk-group-end)(ctx);
|
||||
[nk_layout_row](#nk-layout-row)(ctx, NK_DYNAMIC, 20, 3, ratio_adv_mode);
|
||||
[nk_spacing](#nk-spacing)(ctx, 1);
|
||||
[nk_checkbox_label](#nk-checkbox-label)(ctx, "Advanced Mode", &advanced_mode_check);
|
||||
[nk_option_label](#nk-option-label)(ctx, "Extract from files below:", [main_settings](#struct-main-tab).port_or_files == FILES));
|
||||
[nk_selectable_label](#nk-selectable-label)(ctx, [truncate_path_string](#func-truncate-path-string)([main_settings](#struct-main-tab).filenames[i]), NK_TEXT_LEFT, &[main_settings](#struct-main-tab).is_file_selected[i]);
|
||||
[nk_combo](#nk-combo)(ctx, [main_settings](#struct-main-tab).port_type, 2, [main_settings](#struct-main-tab).port_select, 20, [nk_vec2](#nk-vec2)_(85,100));
|
||||
[nk_label](#nk-label)(ctx, "Drag and Drop files for extraction.", NK_TEXT_CENTERED
|
||||
[nk_progress](#nk-progress)(ctx, &[main_settings](#struct-main-tab).progress_cursor, 101, nk_true);
|
||||
|
||||
ccextractorGUI.h
|
||||
void [setup_main_settings](#func-setup-main-settings)(struct main_tab *main_settings);
|
||||
char* [truncate_path_string](#func-truncate-path-string)(char *filePath);
|
||||
void [remove_path_entry](#func-remove-path-entry)(struct [main_tab](#struct-main-tab) *main_settings, int indexToRemove);
|
||||
|
||||
ccx_cli_thread.c || ccx_cli_thread.h
|
||||
void* [read_activity_data](#func-read-activity-data)(void *read_args);
|
||||
void* [read_data_from_thread](#func-read-data-from-thread)(void* read_args);
|
||||
void* [extract_thread](#func-extract-thread)(void* extract_args);
|
||||
void* [feed_files_for_extraction](#func-feed-files-for-extraction)(void* file_args);
|
||||
void [setup_and_create_thread](#fun-setup-and-create-thread)(struct [main_tab](#struct-main-tab) *main_settings, struct [built_string](#struct-built-string) *command);
|
||||
void&asst; [find_hd_homerun_devices](#func-hd-homerun-devices)(void *args);
|
||||
void* [setup_hd_homerun_device](#func-setup-hd-homerun-device)(void *args);
|
||||
|
||||
command_builder.c || command_builder.h
|
||||
void [command_builder](#func-command-builder)(struct [built_string](#struct-built-string) *command,
|
||||
struct [main_tab](#struct-main-tab) *main_settings,
|
||||
struct [network_popup](#struct-network-popup) *network_settings,
|
||||
struct [input_tab](#struct-input-tab) *input,
|
||||
struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input,
|
||||
struct [output_tab](#struct-output-tab) *output,
|
||||
struct [decoders_tab](#struct-output-tab) *decoders,
|
||||
struct [credits_tab](#struct-output-tab) *credits,
|
||||
struct [debug_tab](#struct-debug-tab) *debug,
|
||||
struct [burned_subs_tab](#struct-debug-tab) *burned_subs);
|
||||
|
||||
file_browser.c || file_browser.h
|
||||
void [die](#func-die)(const char *fmt, ...);
|
||||
char* [file_load](#func-file-load)(const char* path, size_t* siz);
|
||||
char* [str_duplicate](#func-str-duplicate)(const char *src);
|
||||
void [dir_free_list](#func-dir-free-list)(char **list, size_t size);
|
||||
char** [dir_list](#func-dir-list)(const char *dir, int return_subdirs, size_t *count);
|
||||
struct file_group [FILE_GROUP](#func-file-group)(enum file_groups group, const char *name, struct nk_image *icon);
|
||||
struct file [FILE_DEF](#func-file-def)(enum file_types type, const char *suffix, enum file_groups group);
|
||||
struct nk_image* [media_icon_for_file](#func-media-icon-for-file)(struct media *media, const char *file);
|
||||
void [media_init](#func-media-init)(struct media *media);
|
||||
void [file_browser_reload_directory_content](#func-file-browser-reload-directory-content)(struct file_browser *browser, const char *path);
|
||||
void [get_drives](#func-get-drives)(struct file_browser *browser);
|
||||
void [file_browser_init](#func-file-browser-init)(struct file_browser *browser, struct media *media);
|
||||
void [file_browser_free](#func-file-browser-free)(struct file_browser *browser);
|
||||
int [file_browser_run](#func-file-browser-run)(struct file_browser *browser, struct [nk_context](#nk-context) *ctx, struct [main_tab](#struct-main-tab) *main_settings, struct [output_tab](#struct-output-tab) *output, struct [debug_tab](#struct-debug-tab) *debug, struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun);
|
||||
|
||||
popups.c || popups.h
|
||||
void [draw_network_popup](#func-draw-network-popup)(struct [nk_context](#nk-context) *ctx, int *show_preferences_network, struct [network_popup](#struct-network-popup) *network_settings);
|
||||
void [draw_getting_started_popup](#func-draw-getting-started-popup)(struct [nk_context](#nk-context) *ctx, int *show_getting_started);
|
||||
void [draw_about_ccx_popup](#func-draw-about-ccx-popup)(struct [nk_context](#nk-context) *ctx, int *show_about_ccx, struct nk_user_font *droid_big, struct nk_user_font *droid_head);
|
||||
void [draw_progress_details_popup](#func-draw-progress-details-popup)(struct [nk_context](#nk-context) *ctx, int *show_progress_details, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
void [draw_color_popup](#func-draw-color-popup)(struct [nk_context](#nk-context) *ctx, struct [output_tab](#struct-output-tab) *output);
|
||||
void [draw_thread_popup](#fun-draw-thread-popup)(struct [nk_context](#nk-context) *ctx, int *show_thread_popup);
|
||||
void [setup_network_settings](#func-setup-network-settings)(struct [network_popup](#struct-network-popup) *network_settings);
|
||||
|
||||
preview.c || preview.h
|
||||
int [preview](#func-preview)(struct [nk_context](#nk-context) *ctx, int x, int y, int width, int height, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
|
||||
save_load_data.c || save_load_data.h
|
||||
void [load_data](#func-load-data)(FILE *file,
|
||||
struct [main_tab](#struct-main-tab) *main_settings,
|
||||
struct [input_tab](#struct-input-tab) *input,
|
||||
struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input,
|
||||
struct [output_tab](#struct-output-tab) *output,
|
||||
struct [decoders_tab](#struct-decoders-tab) *decoders,
|
||||
struct [credits_tab](#struct-credits-tab) *credits,
|
||||
struct [debug_tab](#struct-debug-tab) *debug,
|
||||
struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun,
|
||||
struct [burned_subs_tab](#struct-burned-subs-tab) *burned_subs);
|
||||
|
||||
void [save_data](#func-save-data)(FILE *file,
|
||||
struct [main_tab](#struct-main-tab) *main_settings,
|
||||
struct [input_tab](#struct-input-tab) *input,
|
||||
struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input,
|
||||
struct [output_tab](#struct-output-tab) *output,
|
||||
struct [decoders_tab](#struct-decoders-tab) *decoders,
|
||||
struct [credits_tab](#struct-credits-tab) *credits,
|
||||
struct [debug_tab](#struct-debug-tab) *debug,
|
||||
struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun,
|
||||
struct [burned_subs_tab](#struct-burned-subs-tab) *burned_subs);
|
||||
|
||||
void [write_credits](#func-write-credits)(FILE* file, struct [credits_tab](#struct-credits-tab) *credits);
|
||||
void [read_credits](#func-read-credits)(FILE* file, struct [credits_tab](#struct-credits-tab) *credits);
|
||||
|
||||
terminal.c
|
||||
int [terminal](#func-terminal)(struct [nk_context](#nk-context) *ctx, int x, int y, int width, int height, char *command);
|
||||
|
||||
### About CCExtractor specific functions
|
||||
#### int <a id="func-activity">activity</a>(struct nk_context *ctx, int x, int y, int width, int height, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
##### Info:
|
||||
--Contains the procedure to be carried out when Activity Window is toggled.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` structure.
|
||||
* x - X co-ordinate to draw Activity Window
|
||||
* y - Y co-ordinate to draw Activty Window.
|
||||
* width - width of window to draw.
|
||||
* height - height of window to draw.
|
||||
* *main_settings - pointer to [`main_tab`](#struct-main-tab) structure.
|
||||
##### Return Type: int
|
||||
* Returns non-zero value if window is not closed.
|
||||
* Returns zero if window is closed.
|
||||
#### void <a id="func-setup-main-settings">setup_main_settings</a>(struct [main_tab](#struct-main-tab) *main_settings);
|
||||
##### Info:
|
||||
Setups the required defaults of variables in [`main_tab`](#struct-main-tab) structure.
|
||||
##### Parameters:
|
||||
* *main_settings - pointer to [`main_tab`](#struct-main-tab) structure.
|
||||
##### Return Type: void
|
||||
#### char* <a id="func-truncate-path-string">truncate_path_string</a>(char *filePath);
|
||||
##### Info:
|
||||
Truncated the Path String of file to visible area using `...`
|
||||
##### Parameters:
|
||||
* *filePath - Pointer to string to be truncated.
|
||||
##### Return Type: *char
|
||||
* Returns pointer to truncated string.
|
||||
#### void <a id="func-remove-path-entry">remove_path_entry</a>(struct [main_tab](#struct-main-tab) *main_settings, int indexToRemove);
|
||||
##### Info:
|
||||
Removes the selected path in the extraction queue (Selected entry's index is passed).
|
||||
##### Parameters:
|
||||
* *main_settings - pointer to [`main_tab`](#struct-main-tab) structure.
|
||||
* indexToRemove - index of the string to be removed from dynamic array of many strings.
|
||||
##### Return Type: void
|
||||
|
||||
#### void* <a id="func-read-activity-data">read_activity_data</a>(void *read_args);
|
||||
##### Info:
|
||||
Reads activity data related to CCExtractor on `stdout`. And outputs to activity window (Updates variables that code of activity window uses).
|
||||
##### Parameters:
|
||||
* *read_args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
##### Return type: void*
|
||||
|
||||
#### void* <a id="func-read-data-from-thread>read_data_from_thread</a>(void* read_args);
|
||||
##### Info:
|
||||
Reads data from`--gui_mode_reports` redirected from `stderr` to a file. Reads the subtitles extracted in realtime and updates the variables for the same, updates the state of progress bar. Also, lanches [read_activity_data](#func-read-activity-data) in a new thread.
|
||||
##### Parameters:
|
||||
* *read_args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
##### Return type: void*
|
||||
|
||||
#### void* <a id="func-extract-thread">extract_thread</a>(void* extract_args);
|
||||
##### Info:
|
||||
Passes command with all options from GUI to CLI CCExtractor.
|
||||
##### Parameters:
|
||||
* *extract_args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
##### Return type: void*
|
||||
|
||||
#### void* <a id="func-feed-files-for-extraction">feed_files_for_extraction</a>(void* file_args);
|
||||
##### Info:
|
||||
Feeds file by file to a new thread and waits until its extraction is done. This is done until all the files in extraction queue are extracted.
|
||||
##### Parameters:
|
||||
* *file_args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
##### Return type: void*
|
||||
|
||||
#### void <a id="func-setup-and-create-thread">setup_and_create_thread</a>(struct [main_tab](#struct-main-tab) *main_settings, struct [built_string](#struct-built-string) *command);
|
||||
##### Info:
|
||||
Initialises some values for the structure used in thread arguments and creates [feed_files_for_extraction](#feed-files-for-extraction).
|
||||
##### Parameters:
|
||||
* *main_settings - Pointer to `main_tab` struct.
|
||||
* *command - Pointer to `built_string` struct.
|
||||
##### Return type: void*
|
||||
|
||||
#### void* <a id="func-hind-hd-homerun-devices">find_hd_homerun_devices</a>(void *args);
|
||||
Finds devices connected to HD HomeRun Network.
|
||||
#### Parameters:
|
||||
* *args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
#### Return type: void*
|
||||
|
||||
#### void* <a id="func-setup-hd-homerun-device">setup_hd_homerun_device</a>(void *args);
|
||||
##### Info:
|
||||
Sets up various parameters required to extract subtitle from incoming stream from a HD HomeRun Device.
|
||||
##### Parameters:
|
||||
* *args - Pointer to void, because thread functions don't allow any datatype as argument or return type. Therefore they are passed as void then typecasted later in the function.
|
||||
##### Return type: void*
|
||||
|
||||
#### void [command_builder](#func-command-builder)(struct [built_string](#struct-built-string) *command, struct [main_tab](#struct-main-tab) *main_settings, struct [network_popup](#struct-network-popup) *network_settings, struct [input_tab](#struct-input-tab) *input, struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input, struct [output_tab](#struct-output-tab) *output, struct [decoders_tab](#struct-output-tab) *decoders, struct [credits_tab](#struct-output-tab) *credits, struct [debug_tab](#struct-debug-tab) *debug, struct [burned_subs_tab](#struct-debug-tab) *burned_subs);
|
||||
##### Info:
|
||||
Fetches the options from the whole GUI and adds the respective CLI commands to the `term_string` in `built_string` struct.
|
||||
##### Parameters:
|
||||
* *command - Pointer to `built_string` command.
|
||||
* *main_settings - Pointer to `main_tab` struct.
|
||||
* *network_settings - Pointer to `network_popup` struct.
|
||||
* *input - Pointer to `input_tab` struct.
|
||||
* *advance_input - Pointer to `advanced_input` struct.
|
||||
* *output - Pointer to `output_tab` struct.
|
||||
* *decoders - Pointer to `decoders_tab` struct.
|
||||
* *credits - Pointer to `credits_tab` struct.
|
||||
* *debug - Pointer to `debug_tab` struct.
|
||||
* *burned_subs - Pointer to `burned_subs_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-die">die</a>(const char *fmt, ...);
|
||||
##### Info:
|
||||
Custom function to generate error if something in File Browser goes wrong.
|
||||
##### Parameters:
|
||||
* *fmt - Format of char string along with place holder for variables.
|
||||
* ... - Variables in order of their specified place holder.
|
||||
##### Return type: void
|
||||
|
||||
#### char* <a id="func-file-load">file_load</a>(const char* path, size_t* siz);
|
||||
##### Info:
|
||||
Custom function to load file and read data from loaded file.
|
||||
##### Parameters:
|
||||
* *path - Pointer to string literal (Path of the file).
|
||||
* *siz - Size of string literal provided (To allocate memory accordingly).
|
||||
##### Return type: void
|
||||
|
||||
#### char* <a id="func-str-duplicate">str_duplicate</a>(const char *src);
|
||||
##### Info:
|
||||
Dynamically copies specified string to memory.
|
||||
##### Parameters:
|
||||
* *src - The String to be copied.
|
||||
##### Return type: char*
|
||||
* Pointer to the string in the memory.
|
||||
|
||||
#### void <a id="func-dir-free-list">dir_free_list</a>(char **list, size_t size);
|
||||
##### Info:
|
||||
Frees the memory allocated to Files' and Directories' name and path.
|
||||
##### Parameters:
|
||||
* **char - Pointer to list (array of strings) to be freed
|
||||
##### Return type: void
|
||||
|
||||
#### char** <a id="func-dir-list">dir_list</a>(const char *dir, int return_subdirs, size_t *count);
|
||||
##### Info:
|
||||
Opens the selected directory and adds its path to list and returns the same list.
|
||||
#####Parameters:
|
||||
* *dir - Pointer to string (name of directory to be opened).
|
||||
* return_subdirs - `nk_true` if subdirectories are to be returned then.
|
||||
* *count - Number of directories in opened directories.
|
||||
#### Retrun type: char**
|
||||
* Pointer to List (Array of strings, name of directories and files) is returned.
|
||||
|
||||
#### struct file_group <a id="func-file-group">FILE_GROUP</a>(enum file_groups group, const char *name, struct nk_image *icon);
|
||||
##### Info:
|
||||
Initialises variables for `file_group` struct.
|
||||
##### Parameters:
|
||||
* group - specifies to which group does the file belong to. Selected from `file_groups` enum, like `FILE_GROUP_MUSIC`.
|
||||
* *name - Pointer to a string literal (to set `name` member in `file_group`.
|
||||
* *icon - Pointer to `nk_image` struct (Holds attributes for loaded image file) to set to `icon`member of `file_group`.
|
||||
##### Returnt type: struct `file_group`
|
||||
* Returns a `file_group` instance with set variables.
|
||||
|
||||
#### struct file <a id="func-file-def">FILE_DEF</a>(enum file_types type, const char *suffix, enum file_groups group);
|
||||
##### Info:
|
||||
Initialises variables for `file` struct.
|
||||
##### Parameters:
|
||||
* type - specifies which type does the file belong to. Selected from `file_types` enum, like `FILE_TEXT`.
|
||||
* *suffix - Pointer to string( to set `suffix` member in `file`).
|
||||
* group - specifies to which group does the file belong to. Selected from `file_groups` enum, like `FILE_GROUP_MUSIC`.
|
||||
##### Return type: struct `file`
|
||||
* Returns a `file` instance with set variables.
|
||||
|
||||
#### struct nk_image* <a id="func-media-icon-for-file">media_icon_for_file</a>(struct media *media, const char *file);
|
||||
##### Info:
|
||||
Analyses the files and checks to which `file` or `file_group` they belong and assign appropriate icon to the file and returns the same.
|
||||
##### Parameters:
|
||||
* *media - pointer to `media` struct.
|
||||
* *file - pointer to string literal (name of file with extension)
|
||||
##### Return type: struct `nk_image`*
|
||||
* Returns appropriate `nk_image` corresponding to the file.
|
||||
|
||||
#### void <a id="func-media-init">media_init</a>(struct media *media);
|
||||
##### Info:
|
||||
Assigns icons to `file` and `file_group` members from.
|
||||
##### Parameters:
|
||||
* *media - pointer to `media` struct.
|
||||
#### Return type: void
|
||||
|
||||
#### void <a is="func-file-browser-reload-directory-content">file_browser_reload_directory_content</a>(struct file_browser *browser, const char *path);
|
||||
##### Info:
|
||||
Updates various variables related to Files/Directories path and names when screen of File Browser reloads. (Due to clicking on a directory or any other button leading to different directory).
|
||||
##### Parameters:
|
||||
* *browser - Pointer to `file_browser` struct.
|
||||
* *path - Path of the new directory whose contents are to be reloaded and showed on file browser.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-get-drives">get_drives</a>(struct file_browser *browser);
|
||||
##### Info:
|
||||
NOTE: Windows Specific Function.
|
||||
Detects the number of drives and their respective Drive Letters to show the same in File Browser.
|
||||
#####Parameters:
|
||||
* *browser - pointer to `file_browser` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-file-browser-init">file_browser_init</a>(struct file_browser *browser, struct media *media);
|
||||
##### Info:
|
||||
Initialised various variables/attributes required whenever the File Browser is run.
|
||||
##### Parameters:
|
||||
* *browser - Pointer to `file_browser` struct.
|
||||
* *media - pointer to `media` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-file-browser-free">file_browser_free</a>(struct file_browser *browser);
|
||||
##### Info:
|
||||
Frees the memory allocated to various variables in [file_browser_init](#func-file-browser-init).
|
||||
##### Parameters:
|
||||
* *browser - pointer to `file_browser` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="func-file-browser-run">file_browser_run</a>(struct file_browser *browser, struct [nk_context](#nk-context) *ctx, struct [main_tab](#struct-main-tab) *main_settings, struct [output_tab](#struct-output-tab) *output, struct [debug_tab](#struct-debug-tab) *debug, struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun);
|
||||
##### Info:
|
||||
Provides runtime of File Browser on GUI.
|
||||
##### Parameters:
|
||||
* *browser - pointer to `file_browser` struct.
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *main_settings - pointer to `main_tab` struct.
|
||||
* *output - poiter to `output_tab` struct.
|
||||
* *debug - pointer to `debug_tab` struct.
|
||||
* *hd_homerun - pointer to `hd_homerun_tab` struct.
|
||||
##### Return type: int
|
||||
* Returns `1` if any File name/path is copied to current variable.
|
||||
* Returns `0` otherwise.
|
||||
|
||||
#### void <a -d="func-draw-network-popup">draw_network_popup</a>(struct [nk_context](#nk-context) *ctx, int *show_preferences_network, struct [network_popup](#struct-network-popup) *network_settings);
|
||||
##### Info:
|
||||
Draws popup with Network Settings on GUI.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *show_preferences_network - pointer to variable status if which triggers the popup.
|
||||
* *network_settings - pointer to `network_popup` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-draw-getting-started-popup">draw_getting_started_popup</a>(struct [nk_context](#nk-context) *ctx, int *show_getting_started);
|
||||
##### Info:
|
||||
Draws popup on screen which shows Getting Started Info.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *show_getting_started - pointer to variable status if which triggers the popup.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-draw-about-ccx-popup">draw_about_ccx_popup</a>(struct [nk_context](#nk-context) *ctx, int *show_about_ccx, struct nk_user_font *droid_big, struct nk_user_font *droid_head);
|
||||
##### Info:
|
||||
Draws popup on screen containing information about CCExtractor.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *show_about_ccx - pointer to variable status if which triggers the popup.
|
||||
* *droid_big - pointer to `nk_user_font` struct.
|
||||
* *droid_head - pointer to `nk_user_font` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-draw-progress-details-popup">draw_progress_details_popup</a>(struct [nk_context](#nk-context) *ctx, int *show_progress_details, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
##### Info:
|
||||
Draws popup on screen which shows progress details.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *show_pogress_details - pointer to variable status if which triggers the popup.
|
||||
* *main_settings - pointer to `main_tab` struct.
|
||||
##### Return type: void
|
||||
#### void <a id="func-draw-color-popup">draw_color_popup</a>(struct [nk_context](#nk-context) *ctx, struct [output_tab](#struct-output-tab) *output);
|
||||
##### Info:
|
||||
Draws popup on screen which shows color-picker.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *output - pointer to `output_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-draw-thread-popup">draw_thread_popup</a>(struct [nk_context](#nk-context) *ctx, int *show_thread_popup);
|
||||
##### Info:
|
||||
This popup is shown if anyhow the GUI is unable to read file.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *show_thread_popup - pointer to variable status if which triggers the popup.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-setup-network-settings">setup_network_settings</a>(struct [network_popup](#struct-network-popup) *network_settings);
|
||||
##### Info:
|
||||
Sets up defaults for Network Settings.
|
||||
##### Parameters:
|
||||
* *network_settings - pointer to `network_popup` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="func-preview">preview</a>(struct [nk_context](#nk-context) *ctx, int x, int y, int width, int height, struct [main_tab](#struct-main-tab) *main_settings);
|
||||
##### Info:
|
||||
Draws `Preview` Nuklear window and shows preview strings (lines of subtitles extracted in realtime).
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* x - X co-ordinate from where to draw window.
|
||||
* y - Y co-ordinate from where to draw window.
|
||||
* width - width of window.
|
||||
* height - height of window.
|
||||
* *main_settings - pointer to `main_tab ` struct.
|
||||
##### Return type:
|
||||
* Returns non-zero value if window is not closed.
|
||||
* Returns zero if window is closed.
|
||||
|
||||
#### void <a id="func-load-data">load_data</a>(FILE *file, struct [main_tab](#struct-main-tab) *main_settings, struct [input_tab](#struct-input-tab) *input, struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input, struct [output_tab](#struct-output-tab) *output, struct [decoders_tab](#struct-decoders-tab) *decoders, struct [credits_tab](#struct-credits-tab) *credits, struct [debug_tab](#struct-debug-tab) *debug, struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun, struct [burned_subs_tab](#struct-burned-subs-tab) *burned_subs);
|
||||
##### Info:
|
||||
Loads values of all the variables stored in a file at last exit of GUI.
|
||||
##### Parameters:
|
||||
* *file - pointer to `FILE`.
|
||||
* *main_settings - pointer to `main_tab` struct.
|
||||
* *intput - pointer to `input_tab` struct.
|
||||
* *advanced_input - pointer to `advanced_input_tab` struct.
|
||||
* *output - pointer to `output_tab` struct.
|
||||
* *decoders - pointer to `decoders_tab` struct.
|
||||
* *credits - poitner to `credits_tab` struct.
|
||||
* *debug - pointer to `debug_tab` struct.
|
||||
* *hd_homerun - pointer to `hd_homerun_tab` struct.
|
||||
* *burned_subs - pointer to `burned_subs_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-save-data">save_data</a>(FILE *file, struct [main_tab](#struct-main-tab) *main_settings, struct [input_tab](#struct-input-tab) *input, struct [advanced_input_tab](#struct-advanced-input-tab) *advanced_input, struct [output_tab](#struct-output-tab) *output, struct [decoders_tab](#struct-decoders-tab) *decoders, struct [credits_tab](#struct-credits-tab) *credits, struct [debug_tab](#struct-debug-tab) *debug, struct [hd_homerun_tab](#struct-hd-homerun-tab) *hd_homerun, struct [burned_subs_tab](#struct-burned-subs-tab) *burned_subs);
|
||||
##### info:
|
||||
Saves values of all the variables as a "Current State" in a file on exit.
|
||||
##### Parameters:
|
||||
* *file - pointer to `FILE`.
|
||||
* *main_settings - pointer to `main_tab` struct.
|
||||
* *intput - pointer to `input_tab` struct.
|
||||
* *advanced_input - pointer to `advanced_input_tab` struct.
|
||||
* *output - pointer to `output_tab` struct.
|
||||
* *decoders - pointer to `decoders_tab` struct.
|
||||
* *credits - poitner to `credits_tab` struct.
|
||||
* *debug - pointer to `debug_tab` struct.
|
||||
* *hd_homerun - pointer to `hd_homerun_tab` struct.
|
||||
* *burned_subs - pointer to `burned_subs_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-write-credits">write_credits</a>(FILE *file, struct [credits_tab](#struct-credits-tab) *credits);
|
||||
##### Info:
|
||||
Writes Credits to files after some operations, since extra`\n` character gives problems while reading file.
|
||||
##### Parameters:
|
||||
* *file - pointer to `FILE`.
|
||||
* *credits - pointer to `credits_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="func-read-credits">read_credits</a>(FILE* file, struct [credits_tab](#struct-credits-tab) *credits);
|
||||
##### Info:
|
||||
Reads credits from file in a specific format (as written by [write_credits](#func-write-credits)) from file.
|
||||
##### Parameters:
|
||||
* *file - pointer to `FILE`.
|
||||
* *credits - pointer to `credits_tab` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="func-terminal">terminal</a>(struct [nk_context](#nk-context) *ctx, int x, int y, int width, int height, char *command);
|
||||
##### Info:
|
||||
Writes the command string (that would be passed to CLI CCExtractor) in "Terminal" Nuklear Window.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* x - X co-ordinate from where to draw the window.
|
||||
* y - Y co-ordinate from where to draw the window.
|
||||
* width - Width of the window.
|
||||
* height - height of the window.
|
||||
* *command - String to write on window (the command to be passed).
|
||||
##### Return type: int
|
||||
* Returns non-zero value if window is not closed.
|
||||
* Returns zero if window is closed.
|
||||
|
||||
|
||||
### About CCExtractor specific Structures/Variables
|
||||
#### <a id="struct-main-tab">main_tab</a>
|
||||
##### Info:
|
||||
Contains all the variables for `Main` tab.
|
||||
##### Variables worth noting:
|
||||
* `int is_file_browser_active`
|
||||
* `nk_true` if File Browser is triggered by any event.
|
||||
* `nk_false` otherwise.
|
||||
* `int scaleWindowForFileBrowser`
|
||||
* Sets to `nk_true` if `is_file_browser_active` is `nk_true` to scale the `glfwWindow` to required size to accommodate File Browser.
|
||||
* Sets to `nk_false` otherwise.
|
||||
|
||||
#### <a id="struct-input-tab">input_tab</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Input` tab.
|
||||
|
||||
#### <a id="struct-advanced-input">advanced_input_tab</a>
|
||||
Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Advanced Input` tab.
|
||||
|
||||
#### <a id="struct-output-tab">output_tab</a>
|
||||
#####Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Advanced Input` tab.
|
||||
|
||||
#### <a id="struct-decoders-tab">decoders_tab</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Decoders` tab.
|
||||
|
||||
#### <a id="struct-credits-tab">credits_tab</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Credits` tab.
|
||||
|
||||
#### <a id="struct-debug-tab">debug_tab</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `Debug` tab.
|
||||
|
||||
#### <a id="struct-hd-homerun-tab">hd_homerun_tab</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `HDHomeRun` tab.
|
||||
|
||||
#### <a id="struct-burned-subs-tab">burned_subs</a>
|
||||
##### Info:
|
||||
Contains all variables to hold data of options selected/changed and view dynamically generated data to GUI in `HDHomeRun` tab.
|
||||
|
||||
#### <a id="struct-network-popup">networ_popup</a>
|
||||
##### Info:
|
||||
Contains all the variables to store all the Network related options or showing them in GUI dynamically.
|
||||
|
||||
### About Nuklear Specific functions
|
||||
#### int <a id="nk-begin">nk_begin</a>(struct nk_context*, const char *title, struct nk_rect bounds, nk_flags flags);
|
||||
##### Info:
|
||||
Draws a basic(and blank) window(Nuklear Window inside main GLFW window) to hold other Nuklear widgets.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* *title - Title for the so drawn Nuklear Window.
|
||||
* bounds - instance of `nk_rect` structure to hold co-ordinates, width and height of the Nuklear Window.
|
||||
* flags - Which flags to pass( from those contained in `enum flags`) to change behaviour of the Nuklear Window.
|
||||
##### Return Type: int
|
||||
* Returns true if window creation is successful.
|
||||
* Returns false if window creation fails.
|
||||
|
||||
#### void <a id="nk-end">nk_end</a>(struct nk_context *ctx)
|
||||
##### Info:
|
||||
Marks the end of the Nuklear Window.
|
||||
##### Parameter:
|
||||
* *ctx - Pointer to `nk_context` structure.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-row-dynamic">nk_layout_row_dynamic</a>(struct nk_context*, float height, int cols);
|
||||
##### Info:
|
||||
Used to define a dynamic row layout(to hold widgets), dynamic in the sense that the width is dynamically allocated to widgets.
|
||||
##### Parameters:
|
||||
* *nk_context - Pointer to `nk_context` structure.
|
||||
* height - height to set for widgets of that row.
|
||||
* cols - Columns to set for layout (generally the number of widgets to place).
|
||||
##### Return Type: void
|
||||
|
||||
#### void <a id="nk-label-wrap">nk_label_wrap</a>(struct nk_context*, const char*);
|
||||
##### Info:
|
||||
Writes a label ( A plain String) and wraps it to the next line if the border of Nuklear Window, Group or Popup is reached.
|
||||
*Note*: If the text wraps to next line, height for a new line must be considered while defining a layout, else the wrapped text won't be visible (but it will be there).
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* char* - Pointer to string literal (to view).
|
||||
|
||||
#### int <a id="nk-window-is-closed">nk_window_is_closed</a>(struct nk_context *ctx, const char *name);
|
||||
##### Info:
|
||||
Checks if the active Nuklear Window is closed (by any trigger).
|
||||
##### Parameters:
|
||||
* *ctx - Pointer to `nk_context` structure.
|
||||
* *name - Pointer to String literal(Name of window to check).
|
||||
##### Return type: int
|
||||
* Returns true if window is closed (by any trigger).
|
||||
* Returns false of window is not closed.
|
||||
|
||||
#### void <a id="nk-menubar-begin">nk_menubar_begin</a>(struct nk_context *ctx);
|
||||
##### Info:
|
||||
Marks the end of Menu Bar definition(Menubar code).
|
||||
##### Parameters:
|
||||
* *ctx - Pointer to `nk_context` structure.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-row-begin">nk_layout_row_begin</a>(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);
|
||||
##### Info:
|
||||
Marks the beginning of custom layout. Which means, marking that layout has begun, now the widgets will be pushed row by row as per requirement using [nk_layout_row_push](#nk-layout-row-push).
|
||||
##### Parameters:
|
||||
* *ctx - Pointer to `nk_context` structure.
|
||||
* fmt - Layout format from provided formats (`enum nk_layout_format`), example - `NK_STATIC`, `NK_DYNAMIC`.
|
||||
* row_height - height of row pushed.
|
||||
* cols - Number of columns pushed in row.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-row-push">nk_layout_row_push</a>(struct nk_context*, float value);
|
||||
##### Info:
|
||||
Pushes a row to hold widgets after defining the beginning of custom layout by [nk_layout_row_begin](#nk-layout-row-begin).
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* value - ratio or width of the widget to be pushed next.
|
||||
##### Return Type: void
|
||||
|
||||
#### int <a id="nk-menu-begin-label">nk_menu_begin_label</a>(struct nk_context *ctx, const char *text, nk_flags align, struct [nk_vec2](#nk-vec2) size);
|
||||
##### Info:
|
||||
The label of the Menu Item to be pushed, for example - "Preferences" is marked by this function.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` structure.
|
||||
* *text - pointer to string literal (Title of the Menu, example - "Settings").
|
||||
* align - alignment enumeration in `nk_flags`, example `NK_TEXT_LEFT`.
|
||||
* size - Size of label (as `nk_vec2` struct)
|
||||
##### Return type: int
|
||||
* Returns true if label creation successful.
|
||||
* Returns false if label creation fails.
|
||||
|
||||
#### void <a id="nk-menubar-end">nk_menubar_end</a>(struct nk_context*);
|
||||
##### Info:
|
||||
Marks the end of the MenuBar definition.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-space-begin">nk_layout_space_begin</a>(struct nk_context *ctx, enum nk_layout_format fmt, float height, int widget_count);
|
||||
##### Info:
|
||||
Marks the beginning of an empty space (Custom space for proper placement of widgets).
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` structure.
|
||||
* fmt - Layout format as in `enu nk_layout_format`, example - `NK_STATIC`, `NK_DYNAMIC`.
|
||||
* height = height of space to be added.
|
||||
* widget_count - Number of spaces to add.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-space-end">nk_layout_space_end</a>(struct nk_context *ctx);
|
||||
##### Info:
|
||||
Marks the end of custom space (empty) definition.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` structure.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="nk-style-push-vec2">nk_style_push_vec2</a>(struct nk_context* struct nk_vec2*, struct nk_vec2);
|
||||
##### Info:
|
||||
Comes under `Style Stack`. Used to temporarily modify length, width, spacing related attributes of Styles of Nuklear Context.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* nk_vec2* - Pointer to attribute to be modified.
|
||||
* nk_vec2* - New value in the form `nk_vec2(x, y)` as an instance of nk_vec2 structure.
|
||||
##### Return type: int
|
||||
* Returns true if successful.
|
||||
* Returns false if unsuccessful.
|
||||
|
||||
#### int <a id="nk-style-push-float">nk_style_push_float</a>(struct nk_context*, float*, float);
|
||||
##### Info:
|
||||
Comes under `Style Stack`. Used to temporarily modify attributes requiring precision with floating point such as rounding value for buttons.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* float* - Pointer to variable whose value is to be changed.
|
||||
* float - new value to set.
|
||||
|
||||
#### int <a id="nk-button-label">nk_button_label</a>(struct nk_context*, const char *title);
|
||||
##### Info:
|
||||
Draws a Button with provided label.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` struct.
|
||||
* *title - Pointer to string literal (Label to put on button).
|
||||
##### Return type: int
|
||||
* Returns true of Button is clicked.
|
||||
* Returns false of Button is in 'unclicked' state.
|
||||
|
||||
#### int <a id="nk-style-pop-float">nk_style_pop_float</a>(struct nk_context*);
|
||||
##### Info:
|
||||
Pops the float values modified off the `Style Stack`. Which means, returns them to original state as they were before being modified by [nk_style_push_float](#nk-style-push-float).
|
||||
##### Paramaters:
|
||||
* nk_context* - Pointer to `nk_context` struct.
|
||||
##### Return type: int
|
||||
* Returns true if successful.
|
||||
* Returns false if unsuccessful.
|
||||
|
||||
#### int <a id="nk-group-begin">nk_group_begin</a>(struct nk_context *ctx, const char *title, nk_flags flags);
|
||||
##### Info:
|
||||
Makes a group with given flags. Looks just like a window created by [nk_begin](#nk-begin) but can be created inside a window.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *title - string literal (Title of the group).
|
||||
* flags - All the required flags among available flags in `nk_flags`.
|
||||
##### Return Type: int
|
||||
* Returns false if creation unsuccessful.
|
||||
* Returns true if creation successful.
|
||||
|
||||
#### void <a id="nk-group-end">nk_group_end</a>(struct nk_context *ctx);
|
||||
##### Info:
|
||||
Marks the end of the group created by [nk_group_begin](#nk-group-begin).
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-layout-row">nk_layout_row</a>(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
|
||||
##### Info:
|
||||
Used to create custom row layout in which widget placement (including spacing) is done using ratios in floating point. Maximum ratio allowed is one. So, if there are two widgets (say buttons) need to placed in 50% available area each. Then `ratio` will be {0.5f, 0.5f}.
|
||||
##### Parameters:
|
||||
* nk_context* - pointer to `nk_context` struct.
|
||||
* nk_layout_format - format from available formats in `enum nk_layout_format` like `NK_STATIC` , `NK_DYNAMIC`.
|
||||
* height - height of the layout.
|
||||
* cols - Number of widgets(including spaces) to be used.
|
||||
* *ratio - Ratio for widget placement.
|
||||
##### Return type: void
|
||||
|
||||
#### void <a id="nk-spacing">nk_spacing</a>(struct nk_context*, int cols);
|
||||
##### Info:
|
||||
Used to create spacing (blank) of specified columns.
|
||||
##### Parameters:
|
||||
* nk_context* - pointer to `nk_context` struct.
|
||||
* cols - Number of columns for which spacing has to be true.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="nk-checkbox-label">nk_checkbox_label</a>(struct nk_context *ctx, const char *label, int *active);
|
||||
##### Info:
|
||||
Creates a checkbox with specified label.
|
||||
##### Parameters:
|
||||
* *ctx - Pointer to `nk_context` struct.
|
||||
* * - Pointer to string literal(Label of checkbox).
|
||||
* * - Pointer to variable to store the active value. `nk_false` if unchecked, `nk_true` if checked.
|
||||
##### Return type: int
|
||||
* Returns false if unable to draw widget or old value of `*active` = new value of `*active`.
|
||||
* Returns true of old value of `*active` != new value of `*active`.
|
||||
|
||||
#### int <a id="nk-option-label">nk_option_label</a>(struct nk_context *ctx, const char *label, int active);
|
||||
##### Info:
|
||||
Draws radio button (among radio group) with specified label.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` struct.
|
||||
* *label - Pointer to string literal (label of radio button).
|
||||
* active - Any check to specify if the radio button is active.
|
||||
##### Return type: int
|
||||
* Returns true if radio button is active.
|
||||
* Returns false if radio button is inactive.
|
||||
|
||||
#### int <a id="nk-selectable-label">nk_selectable_label</a>(struct nk_context*, const char*, nk_flags align, int *value);
|
||||
##### Info:
|
||||
Draws a selectable label. (Just like a regular [nk_label](#nk-label) but with a difference that it can be selected)
|
||||
##### Parameters:
|
||||
* nk_context* - pointer to `nk_context` struct.
|
||||
* char* - Pointer to string literal (Label to display on GUI).
|
||||
* align - required alignment flags from `nk_flags` like `NK_TEXT_LEFT`.
|
||||
* *value - Pointer to integer variable to store the value if the label is triggered or not.
|
||||
* Sets to `nk_true` if label selected.
|
||||
* Sets to `nk_false` if label is in unselected state.
|
||||
##### Return type: int
|
||||
* Returns false if unable to draw widget or old value of `*value` = new value of `*value`.
|
||||
* Returns true of old value of `*value` != new value of `*value`.
|
||||
|
||||
#### int <a id="nk-combo">nk_combo</a>(struct nk_context*, const char **items, int count, int selected, int item_height, struct nk_vec2 size);
|
||||
##### Info:
|
||||
Draws combobox with given items as array of strings.
|
||||
##### Parameters:
|
||||
* nk_context* - Pointer to `nk_context` structure.
|
||||
* **items - Array of strings of items to populate the list of combobox.
|
||||
* count - Number of items in the combobox.
|
||||
* selected - variable to store the index of selected item.
|
||||
* item_height - Height to allocate to each item in combobox.
|
||||
* size - size of combobox after expansion(when dropdown arrow is clicked). Given as [nk_vec2](#nk-vec2)(x, y).
|
||||
##### Return type: int
|
||||
* Returns the index of selected item.
|
||||
|
||||
#### void <a id="nk-label">nk_label</a>(struct nk_context *ctx, const char *str, nk_flags alignment);
|
||||
##### Info:
|
||||
Draws a plain text on Nuklear Window, Popup or group.
|
||||
##### Parameters:
|
||||
* *ctx - pointer to `nk_context` structure.
|
||||
* *str - Pointer to string literal (Text to draw).
|
||||
* alignment - required flags for text alignment from `nk_flags`, like `NK_TEXT_LEFT`.
|
||||
##### Return type: void
|
||||
|
||||
#### int <a id="nk-progress">nk_progress</a>(struct nk_context *ctx, nk_size *cur, nk_size max, int is_modifyable);
|
||||
##### Info:
|
||||
Draws a progress bar.
|
||||
##### Parameters:
|
||||
* *ctx - Poitner to `nk_context` struct.
|
||||
* *cur - Realtime value to update in progress bar.
|
||||
* max - Maximum value `*cur` can achieve (usually 100, for 100% progress).
|
||||
* is_modifyable -
|
||||
* `nk_true` if progress bar can be modified with other events like mouse click and drag.
|
||||
* `nk_false` if progress bar needs to be modified only by value of `*cur`
|
||||
##### Return type: int
|
||||
* Returns false if unable to draw widget or old value of `*cur` = new value of `*cur`.
|
||||
* Returns true of old value of `*cur` != new value of `*cur`.
|
||||
|
||||
|
||||
|
||||
|
||||
### About Nuklear Specific Structures/Variables
|
||||
#### <a id="nk-context">nk_context</a>
|
||||
##### Info:
|
||||
Contains various Variables/attributes related to current Window.
|
||||
|
||||
#### <a id="nk-vec2">nk_vec2</a>
|
||||
##### Info:
|
||||
A simple structure containing 2 variables `x` and `y`. Used for various purposes where 2 variables are required for example.. using offset for position or size of any widget/window.
|
||||
|
||||
|
||||
12
docs/raspberrypi.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Installing on a Raspberry Pi
|
||||
|
||||
dependencies for ocr mode:
|
||||
|
||||
* libleptonica-dev
|
||||
* libtesseract-dev
|
||||
|
||||
```bash
|
||||
sudo apt-get install libleptonica-dev libtesseract-dev
|
||||
```
|
||||
|
||||
Other than this you just need to cd into the linux directory and run `make` or `make ENABLE_OCR=yes` if you want ocr enabled.
|
||||
@@ -1,4 +1,4 @@
|
||||
For building ccextractor using cmake folllow below steps..
|
||||
For building CCExtractor using cmake follow steps below..
|
||||
|
||||
Step 1) Check you have right version of cmake installed. ( version >= 3.0.2 )
|
||||
We are using CMP0037 policy of cmake which was introduced in 3.0.0
|
||||
@@ -6,13 +6,15 @@ Step 1) Check you have right version of cmake installed. ( version >= 3.0.2 )
|
||||
suggest to use 3.0.2 or higher version.
|
||||
|
||||
|
||||
Step 2) create a seprate directory where you want to build the target.
|
||||
In Unix you can do it using follwing commands.
|
||||
Step 2) create a separate directory where you want to build the target.
|
||||
In Unix you can do it using following commands.
|
||||
~> cd ccextractor
|
||||
~> mkdir build
|
||||
|
||||
Step 3) make the build sytem using cmake
|
||||
~> cmake ../src/
|
||||
Step 3) make the build system using cmake. Params in [] are optional and have
|
||||
been explained later in the document.
|
||||
~> cmake [-DWITH_FFMPEG=ON] [-DWITH_OCR=ON] [-DWITH_SHARING=ON]
|
||||
[-DWITH_HARDSUBX=ON] ../src/
|
||||
|
||||
Step 4) Compile the code.
|
||||
~> make
|
||||
@@ -24,5 +26,14 @@ Step 5) Use CCextractor as you would like
|
||||
If you want to build CCExtractor with FFMpeg you need to pass
|
||||
cmake -DWITH_FFMPEG=ON ../src/
|
||||
|
||||
If you want to build CCExtractor with OCR you need to pass
|
||||
cmake -DWITH_OCR=ON ../src/
|
||||
|
||||
If you want to build CCExtractor with Sharing and Translating service:
|
||||
cmake -DWITH_SHARING=ON ../src/
|
||||
|
||||
If you want to build CCExtractor with HARDSUBX support
|
||||
cmake -DWITH_HARDSUBX=ON ../src/
|
||||
|
||||
Hint for looking all the things you want to set from outside
|
||||
cmake -LAH ../src/
|
||||
|
||||
BIN
fonts/Cousine-Regular.ttf
Normal file
BIN
fonts/DroidSans.ttf
Normal file
BIN
fonts/Karla-Regular.ttf
Normal file
BIN
fonts/ProggyClean.ttf
Normal file
BIN
fonts/ProggyTiny.ttf
Normal file
BIN
fonts/Raleway-Bold.ttf
Normal file
BIN
fonts/Roboto-Bold.ttf
Normal file
BIN
fonts/Roboto-Light.ttf
Normal file
BIN
fonts/Roboto-Regular.ttf
Normal file
BIN
fonts/kenvector_future.ttf
Normal file
BIN
fonts/kenvector_future_thin.ttf
Normal file
6
gsoc/skrill/first_phase_evaluation_script
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
find /vagrant/Second\ phase\ evaluation/ -name '*.ts' -exec sh -c '
|
||||
for file do
|
||||
python ../../api/api_testing.py $file -quiet
|
||||
done
|
||||
' sh {} +
|
||||
BIN
icon/computer.png
Normal file
|
After Width: | Height: | Size: 620 B |
BIN
icon/default.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
icon/desktop.png
Normal file
|
After Width: | Height: | Size: 583 B |
BIN
icon/directory.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
icon/drive.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
icon/font.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
icon/home.png
Normal file
|
After Width: | Height: | Size: 819 B |
BIN
icon/img.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
icon/movie.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
icon/music.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
icon/text.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
117
linux/Makefile
@@ -1,117 +0,0 @@
|
||||
SHELL = /bin/sh
|
||||
|
||||
CC = gcc
|
||||
SYS := $(shell gcc -dumpmachine)
|
||||
CFLAGS = -O3 -std=gnu99
|
||||
INCLUDE = -I../src/gpacmp4/ -I../src/libpng -I../src/zlib -I../src/lib_ccx -I../src/.
|
||||
ALL_FLAGS = -Wno-write-strings -D_FILE_OFFSET_BITS=64
|
||||
LDFLAGS = -lm
|
||||
|
||||
ifneq (, $(findstring linux, $(SYS)))
|
||||
CFLAGS +=-DGPAC_CONFIG_LINUX
|
||||
endif
|
||||
TARGET = ccextractor
|
||||
|
||||
OBJS_DIR = objs
|
||||
VPATH = ../src:../src/gpacmp4:../src/libpng:../src/zlib:../src/lib_ccx
|
||||
|
||||
SRCS_DIR = ../src
|
||||
SRCS_C = $(wildcard $(SRCS_DIR)/*.c)
|
||||
OBJS = $(SRCS_C:$(SRCS_DIR)/%.c=$(OBJS_DIR)/%.o)
|
||||
|
||||
SRCS_CCX_DIR = $(SRCS_DIR)/lib_ccx
|
||||
SRCS_CCX = $(wildcard $(SRCS_CCX_DIR)/*.c)
|
||||
OBJS_CCX = $(SRCS_CCX:$(SRCS_CCX_DIR)/%.c=$(OBJS_DIR)/%.o)
|
||||
|
||||
SRCS_PNG_DIR = $(SRCS_DIR)/libpng
|
||||
SRCS_PNG = $(wildcard $(SRCS_PNG_DIR)/*.c)
|
||||
OBJS_PNG = $(SRCS_PNG:$(SRCS_PNG_DIR)/%.c=$(OBJS_DIR)/%.o)
|
||||
|
||||
SRCS_GPACMP4_DIR = $(SRCS_DIR)/gpacmp4
|
||||
SRCS_GPACMP4_C = $(wildcard $(SRCS_GPACMP4_DIR)/*.c)
|
||||
SRCS_GPACMP4_CPP = $(wildcard $(SRCS_GPACMP4_DIR)/*.cpp)
|
||||
OBJS_GPACMP4 = $(SRCS_GPACMP4_C:$(SRCS_GPACMP4_DIR)/%.c=$(OBJS_DIR)/%.o) \
|
||||
$(SRCS_GPACMP4_CPP:$(SRCS_GPACMP4_DIR)/%.cpp=$(OBJS_DIR)/%.o)
|
||||
|
||||
SRCS_ZLIB_DIR = $(SRCS_DIR)/zlib
|
||||
SRCS_ZLIB = $(wildcard $(SRCS_ZLIB_DIR)/*.c)
|
||||
OBJS_ZLIB = $(SRCS_ZLIB:$(SRCS_ZLIB_DIR)/%.c=$(OBJS_DIR)/%.o)
|
||||
|
||||
INSTLALL = cp -f -p
|
||||
INSTLALL_PROGRAM = $(INSTLALL)
|
||||
DESTDIR = /usr/bin
|
||||
|
||||
ifeq ($(ENABLE_OCR),yes)
|
||||
CFLAGS+=-DENABLE_OCR
|
||||
TESS_LDFLAGS+= $(shell pkg-config --libs tesseract)
|
||||
LEPT_LDFLAGS+= $(shell pkg-config --libs lept)
|
||||
|
||||
#error checking of library are there or not
|
||||
ifeq ($(TESS_LDFLAGS),$(EMPTY))
|
||||
$(error **ERROR** "tesseract not found")
|
||||
else
|
||||
#TODO print the version of library found
|
||||
$(info "tesseract found")
|
||||
endif
|
||||
ifeq ($(LEPT_LDFLAGS),$(EMPTY))
|
||||
$(error **ERROR** "leptonica not found")
|
||||
else
|
||||
#TODO print the version of library found
|
||||
$(info "Leptonica found")
|
||||
endif
|
||||
|
||||
CFLAGS += $(shell pkg-config --cflags tesseract)
|
||||
CFLAGS += $(shell pkg-config --cflags lept)
|
||||
LDFLAGS += $(TESS_LDFLAGS)
|
||||
LDFLAGS += $(LEPT_LDFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(ENABLE_FFMPEG),yes)
|
||||
CFLAGS+=-DENABLE_FFMPEG
|
||||
CFLAGS+= $(shell pkg-config --cflags libavcodec)
|
||||
CFLAGS+= $(shell pkg-config --cflags libavformat)
|
||||
CFLAGS+= $(shell pkg-config --cflags libavutil)
|
||||
LDFLAGS+= $(shell pkg-config --libs libavcodec )
|
||||
LDFLAGS+= $(shell pkg-config --libs libavformat )
|
||||
LDFLAGS+= $(shell pkg-config --libs libavutil )
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: objs_dir $(TARGET)
|
||||
|
||||
.PHONY: objs_dir
|
||||
objs_dir:
|
||||
mkdir -p $(OBJS_DIR)
|
||||
|
||||
$(TARGET): $(OBJS) $(OBJS_PNG) $(OBJS_GPACMP4) $(OBJS_ZLIB) $(OBJS_CCX)
|
||||
$(CC) $(ALL_FLAGS) $(CFLAGS) $(OBJS) $(OBJS_CCX) $(OBJS_PNG) $(OBJS_GPACMP4) $(OBJS_ZLIB) $(LDFLAGS) -o $@
|
||||
|
||||
$(OBJS_DIR)/%.o: %.c
|
||||
$(CC) -c $(ALL_FLAGS) $(INCLUDE) $(CFLAGS) $< -o $@
|
||||
|
||||
$(OBJS_DIR)/%.o: %.cpp
|
||||
$(CC) -c $(ALL_FLAGS) $(INCLUDE) $(CFLAGS) $< -o $@ -I../src/gpacmp4
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm $(TARGET) 2>/dev/null || true
|
||||
rm $(OBJS_CCX) $(OBJS_PNG) $(OBJS_ZLIB) $(OBJS_GPACMP4) $(OBJS) 2>/dev/null || true
|
||||
rm -rd $(OBJS_DIR) 2>/dev/null || true
|
||||
rm .depend 2>/dev/null || true
|
||||
|
||||
.PHONY: install
|
||||
install: $(TARGET)
|
||||
$(INSTLALL_PROGRAM) $(TARGET) $(DESTDIR)
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
rm -iv $(DESTDIR)/$(TARGET)
|
||||
|
||||
.PHONY: depend dep
|
||||
depend dep:
|
||||
$(CC) $(CFLAGS) -E -MM $(SRCS_C) $(SRCS_PNG) $(SRCS_ZLIB) $(SRCS_CXX) \
|
||||
$(SRCS_GPACMP4_C) $(SRCS_GPACMP4_CPP) |\
|
||||
sed 's/^[a-zA-Z_0-9]*.o/$(OBJS_DIR)\/&/' > .depend
|
||||
|
||||
-include .depend
|
||||
426
linux/Makefile.am
Normal file
@@ -0,0 +1,426 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
|
||||
bin_PROGRAMS = ccextractor
|
||||
ccextractor_SOURCES = \
|
||||
../src/ccextractor.c \
|
||||
../src/ccextractor.h \
|
||||
../src/gpacmp4/avc_ext.c \
|
||||
../src/gpacmp4/avilib.c \
|
||||
../src/gpacmp4/av_parsers.c \
|
||||
../src/gpacmp4/base_encoding.c \
|
||||
../src/gpacmp4/bitstream.c \
|
||||
../src/gpacmp4/box_code_3gpp.c \
|
||||
../src/gpacmp4/box_code_adobe.c \
|
||||
../src/gpacmp4/box_code_apple.c \
|
||||
../src/gpacmp4/box_code_base.c \
|
||||
../src/gpacmp4/box_code_drm.c \
|
||||
../src/gpacmp4/box_dump.c \
|
||||
../src/gpacmp4/box_code_meta.c \
|
||||
../src/gpacmp4/box_funcs.c \
|
||||
../src/gpacmp4/color.c \
|
||||
../src/gpacmp4/configfile.c \
|
||||
../src/gpacmp4/data_map.c \
|
||||
../src/gpacmp4/desc_private.c \
|
||||
../src/gpacmp4/descriptors.c \
|
||||
../src/gpacmp4/drm_sample.c \
|
||||
../src/gpacmp4/error.c \
|
||||
../src/gpacmp4/gpac_ogg.c \
|
||||
../src/gpacmp4/hint_track.c \
|
||||
../src/gpacmp4/hinting.c \
|
||||
../src/gpacmp4/ipmpx_code.c \
|
||||
../src/gpacmp4/ipmpx_parse.c \
|
||||
../src/gpacmp4/isom_intern.c \
|
||||
../src/gpacmp4/isom_read.c \
|
||||
../src/gpacmp4/isom_store.c \
|
||||
../src/gpacmp4/isom_write.c \
|
||||
../src/gpacmp4/list.c \
|
||||
../src/gpacmp4/math.c \
|
||||
../src/gpacmp4/media.c \
|
||||
../src/gpacmp4/media_odf.c \
|
||||
../src/gpacmp4/meta.c \
|
||||
../src/gpacmp4/movie_fragments.c \
|
||||
../src/gpacmp4/mp4.c \
|
||||
../src/gpacmp4/odf_code.c \
|
||||
../src/gpacmp4/odf_codec.c \
|
||||
../src/gpacmp4/odf_command.c \
|
||||
../src/gpacmp4/os_config_init.c \
|
||||
../src/gpacmp4/os_divers.c \
|
||||
../src/gpacmp4/os_file.c \
|
||||
../src/gpacmp4/qos.c \
|
||||
../src/gpacmp4/sample_descs.c \
|
||||
../src/gpacmp4/slc.c \
|
||||
../src/gpacmp4/stbl_read.c \
|
||||
../src/gpacmp4/stbl_write.c \
|
||||
../src/gpacmp4/track.c \
|
||||
../src/gpacmp4/tx3g.c \
|
||||
../src/gpacmp4/url.c \
|
||||
../src/gpacmp4/utf.c \
|
||||
../src/gpacmp4/gpac/avparse.h \
|
||||
../src/gpacmp4/gpac/base_coding.h \
|
||||
../src/gpacmp4/gpac/bitstream.h \
|
||||
../src/gpacmp4/gpac/color.h \
|
||||
../src/gpacmp4/gpac/config_file.h \
|
||||
../src/gpacmp4/gpac/configuration.h \
|
||||
../src/gpacmp4/gpac/constants.h \
|
||||
../src/gpacmp4/gpac/events_constants.h \
|
||||
../src/gpacmp4/gpac/ietf.h \
|
||||
../src/gpacmp4/gpac/isomedia.h \
|
||||
../src/gpacmp4/gpac/list.h \
|
||||
../src/gpacmp4/gpac/maths.h \
|
||||
../src/gpacmp4/gpac/media_tools.h \
|
||||
../src/gpacmp4/gpac/mpeg4_odf.h \
|
||||
../src/gpacmp4/gpac/network.h \
|
||||
../src/gpacmp4/gpac/revision.h \
|
||||
../src/gpacmp4/gpac/setup.h \
|
||||
../src/gpacmp4/gpac/tools.h \
|
||||
../src/gpacmp4/gpac/utf.h \
|
||||
../src/gpacmp4/gpac/version.h \
|
||||
../src/gpacmp4/gpac/internal/avilib.h \
|
||||
../src/gpacmp4/gpac/internal/isomedia_dev.h \
|
||||
../src/gpacmp4/gpac/internal/media_dev.h \
|
||||
../src/gpacmp4/gpac/internal/odf_dev.h \
|
||||
../src/gpacmp4/gpac/internal/odf_parse_common.h \
|
||||
../src/gpacmp4/gpac/internal/ogg.h \
|
||||
../src/libpng/pngstruct.h \
|
||||
../src/libpng/pngpriv.h \
|
||||
../src/libpng/pnginfo.h \
|
||||
../src/libpng/pnglibconf.h \
|
||||
../src/libpng/pngconf.h \
|
||||
../src/libpng/pngdebug.h \
|
||||
../src/libpng/png.h \
|
||||
../src/libpng/png.c \
|
||||
../src/libpng/pngerror.c \
|
||||
../src/libpng/pngget.c \
|
||||
../src/libpng/pngmem.c \
|
||||
../src/libpng/pngpread.c \
|
||||
../src/libpng/pngread.c \
|
||||
../src/libpng/pngrio.c \
|
||||
../src/libpng/pngrtran.c \
|
||||
../src/libpng/pngrutil.c \
|
||||
../src/libpng/pngset.c \
|
||||
../src/libpng/pngtrans.c \
|
||||
../src/libpng/pngwio.c \
|
||||
../src/libpng/pngwrite.c \
|
||||
../src/libpng/pngwtran.c \
|
||||
../src/libpng/pngwutil.c \
|
||||
../src/lib_ccx/ccx_common_common.h \
|
||||
../src/lib_ccx/ccx_common_option.h \
|
||||
../src/lib_ccx/utility.h \
|
||||
../src/lib_ccx/activity.h \
|
||||
../src/lib_ccx/asf_constants.h \
|
||||
../src/lib_ccx/avc_functions.h \
|
||||
../src/lib_ccx/bitstream.h \
|
||||
../src/lib_ccx/ccx_common_option.c \
|
||||
../src/lib_ccx/ccx_common_common.c \
|
||||
../src/lib_ccx/utility.c \
|
||||
../src/lib_ccx/activity.c \
|
||||
../src/lib_ccx/asf_functions.c \
|
||||
../src/lib_ccx/avc_functions.c \
|
||||
../src/lib_ccx/cc_bitstream.c \
|
||||
../src/lib_ccx/ccx_common_char_encoding.c \
|
||||
../src/lib_ccx/ccx_common_char_encoding.h \
|
||||
../src/lib_ccx/ccx_common_constants.c \
|
||||
../src/lib_ccx/ccx_common_constants.h \
|
||||
../src/lib_ccx/ccx_common_platform.h \
|
||||
../src/lib_ccx/ccx_common_structs.h \
|
||||
../src/lib_ccx/ccx_common_timing.c \
|
||||
../src/lib_ccx/ccx_common_timing.h \
|
||||
../src/lib_ccx/ccx_decoders_608.c \
|
||||
../src/lib_ccx/ccx_decoders_608.h \
|
||||
../src/lib_ccx/ccx_decoders_708.c \
|
||||
../src/lib_ccx/ccx_decoders_708_encoding.c \
|
||||
../src/lib_ccx/ccx_decoders_708_encoding.h \
|
||||
../src/lib_ccx/ccx_decoders_708.h \
|
||||
../src/lib_ccx/ccx_decoders_708_output.c \
|
||||
../src/lib_ccx/ccx_decoders_708_output.h \
|
||||
../src/lib_ccx/ccx_decoders_common.c \
|
||||
../src/lib_ccx/ccx_decoders_common.h \
|
||||
../src/lib_ccx/ccx_decoders_isdb.c \
|
||||
../src/lib_ccx/ccx_decoders_isdb.h \
|
||||
../src/lib_ccx/ccx_decoders_structs.h \
|
||||
../src/lib_ccx/ccx_decoders_vbi.c \
|
||||
../src/lib_ccx/ccx_decoders_vbi.h \
|
||||
../src/lib_ccx/ccx_decoders_xds.c \
|
||||
../src/lib_ccx/ccx_decoders_xds.h \
|
||||
../src/lib_ccx/ccx_demuxer.c \
|
||||
../src/lib_ccx/ccx_demuxer.h \
|
||||
../src/lib_ccx/ccx_demuxer_mxf.c \
|
||||
../src/lib_ccx/ccx_demuxer_mxf.h \
|
||||
../src/lib_ccx/ccx_dtvcc.c \
|
||||
../src/lib_ccx/ccx_dtvcc.h \
|
||||
../src/lib_ccx/ccx_encoders_common.c \
|
||||
../src/lib_ccx/ccx_encoders_common.h \
|
||||
../src/lib_ccx/ccx_encoders_curl.c \
|
||||
../src/lib_ccx/ccx_encoders_g608.c \
|
||||
../src/lib_ccx/ccx_encoders_helpers.c \
|
||||
../src/lib_ccx/ccx_encoders_helpers.h \
|
||||
../src/lib_ccx/ccx_encoders_python.c \
|
||||
../src/lib_ccx/ccx_encoders_sami.c \
|
||||
../src/lib_ccx/ccx_encoders_smptett.c \
|
||||
../src/lib_ccx/ccx_encoders_splitbysentence.c \
|
||||
../src/lib_ccx/ccx_encoders_spupng.c \
|
||||
../src/lib_ccx/ccx_encoders_srt.c \
|
||||
../src/lib_ccx/ccx_encoders_ssa.c \
|
||||
../src/lib_ccx/ccx_encoders_structs.h \
|
||||
../src/lib_ccx/ccx_encoders_transcript.c \
|
||||
../src/lib_ccx/ccx_encoders_webvtt.c \
|
||||
../src/lib_ccx/ccx_encoders_xds.c \
|
||||
../src/lib_ccx/ccx_encoders_xds.h \
|
||||
../src/lib_ccx/ccx_gxf.c \
|
||||
../src/lib_ccx/ccx_gxf.h \
|
||||
../src/lib_ccx/ccx_mp4.h \
|
||||
../src/lib_ccx/ccx_share.c \
|
||||
../src/lib_ccx/ccx_share.h \
|
||||
../src/lib_ccx/ccx_sub_entry_message.pb-c.c \
|
||||
../src/lib_ccx/ccx_sub_entry_message.pb-c.h \
|
||||
../src/lib_ccx/compile_info.h \
|
||||
../src/lib_ccx/compile_info_real.h \
|
||||
../src/lib_ccx/configuration.c \
|
||||
../src/lib_ccx/configuration.h \
|
||||
../src/lib_ccx/disable_warnings.h \
|
||||
../src/lib_ccx/dvb_subtitle_decoder.c \
|
||||
../src/lib_ccx/dvb_subtitle_decoder.h \
|
||||
../src/lib_ccx/dvd_subtitle_decoder.c \
|
||||
../src/lib_ccx/dvd_subtitle_decoder.h \
|
||||
../src/lib_ccx/es_functions.c \
|
||||
../src/lib_ccx/es_userdata.c \
|
||||
../src/lib_ccx/ffmpeg_intgr.c \
|
||||
../src/lib_ccx/ffmpeg_intgr.h \
|
||||
../src/lib_ccx/file_buffer.h \
|
||||
../src/lib_ccx/file_functions.c \
|
||||
../src/lib_ccx/general_loop.c \
|
||||
../src/lib_ccx/hamming.h \
|
||||
../src/lib_ccx/hardsubx.c \
|
||||
../src/lib_ccx/hardsubx_classifier.c \
|
||||
../src/lib_ccx/hardsubx_decoder.c \
|
||||
../src/lib_ccx/hardsubx.h \
|
||||
../src/lib_ccx/hardsubx_imgops.c \
|
||||
../src/lib_ccx/hardsubx_utility.c \
|
||||
../src/lib_ccx/lib_ccx.c \
|
||||
../src/lib_ccx/lib_ccx.h \
|
||||
../src/lib_ccx/list.h \
|
||||
../src/lib_ccx/matroska.c \
|
||||
../src/lib_ccx/matroska.h \
|
||||
../src/lib_ccx/myth.c \
|
||||
../src/lib_ccx/networking.c \
|
||||
../src/lib_ccx/networking.h \
|
||||
../src/lib_ccx/ocr.c \
|
||||
../src/lib_ccx/ocr.h \
|
||||
../src/lib_ccx/output.c \
|
||||
../src/lib_ccx/params.c \
|
||||
../src/lib_ccx/params_dump.c \
|
||||
../src/lib_ccx/sequencing.c \
|
||||
../src/lib_ccx/stdintmsc.h \
|
||||
../src/lib_ccx/stream_functions.c \
|
||||
../src/lib_ccx/teletext.h \
|
||||
../src/lib_ccx/telxcc.c \
|
||||
../src/lib_ccx/ts_functions.c \
|
||||
../src/lib_ccx/ts_functions.h \
|
||||
../src/lib_ccx/ts_info.c \
|
||||
../src/lib_ccx/ts_tables.c \
|
||||
../src/lib_ccx/ts_tables_epg.c \
|
||||
../src/lib_ccx/wtv_constants.h \
|
||||
../src/lib_ccx/wtv_functions.c \
|
||||
../src/zlib/adler32.c \
|
||||
../src/zlib/compress.c \
|
||||
../src/zlib/crc32.c \
|
||||
../src/zlib/crc32.h \
|
||||
../src/zlib/deflate.c \
|
||||
../src/zlib/deflate.h \
|
||||
../src/zlib/gzclose.c \
|
||||
../src/zlib/gzguts.h \
|
||||
../src/zlib/gzlib.c \
|
||||
../src/zlib/gzread.c \
|
||||
../src/zlib/gzwrite.c \
|
||||
../src/zlib/infback.c \
|
||||
../src/zlib/inffast.c \
|
||||
../src/zlib/inffast.h \
|
||||
../src/zlib/inffixed.h \
|
||||
../src/zlib/inflate.c \
|
||||
../src/zlib/inflate.h \
|
||||
../src/zlib/inftrees.c \
|
||||
../src/zlib/inftrees.h \
|
||||
../src/zlib/trees.c \
|
||||
../src/zlib/trees.h \
|
||||
../src/zlib/uncompr.c \
|
||||
../src/zlib/zconf.h \
|
||||
../src/zlib/zlib.h \
|
||||
../src/zlib/zutil.c \
|
||||
../src/zlib/zutil.h \
|
||||
../src/utf8proc/utf8proc.c \
|
||||
../src/utf8proc/utf8proc.h \
|
||||
../src/lib_hash/sha2.c \
|
||||
../src/lib_hash/sha2.h \
|
||||
../src/protobuf-c/protobuf-c.c \
|
||||
../src/protobuf-c/protobuf-c.h \
|
||||
../src/zvbi/bcd.h \
|
||||
../src/zvbi/bit_slicer.c \
|
||||
../src/zvbi/bit_slicer.h \
|
||||
../src/zvbi/decoder.c \
|
||||
../src/zvbi/macros.h \
|
||||
../src/zvbi/misc.h \
|
||||
../src/zvbi/raw_decoder.c \
|
||||
../src/zvbi/raw_decoder.h \
|
||||
../src/zvbi/sampling_par.c \
|
||||
../src/zvbi/sampling_par.h \
|
||||
../src/zvbi/sliced.h \
|
||||
../src/zvbi/zvbi_decoder.h \
|
||||
../src/wrappers/wrapper.c \
|
||||
../src/wrappers/wrapper.h \
|
||||
../src/freetype/autofit/autofit.c \
|
||||
../src/freetype/base/ftbase.c \
|
||||
../src/freetype/base/ftbbox.c \
|
||||
../src/freetype/base/ftbdf.c \
|
||||
../src/freetype/base/ftbitmap.c \
|
||||
../src/freetype/base/ftcid.c \
|
||||
../src/freetype/base/ftfntfmt.c \
|
||||
../src/freetype/base/ftfstype.c \
|
||||
../src/freetype/base/ftgasp.c \
|
||||
../src/freetype/base/ftglyph.c \
|
||||
../src/freetype/base/ftgxval.c \
|
||||
../src/freetype/base/ftinit.c \
|
||||
../src/freetype/base/ftlcdfil.c \
|
||||
../src/freetype/base/ftmm.c \
|
||||
../src/freetype/base/ftotval.c \
|
||||
../src/freetype/base/ftpatent.c \
|
||||
../src/freetype/base/ftpfr.c \
|
||||
../src/freetype/base/ftstroke.c \
|
||||
../src/freetype/base/ftsynth.c \
|
||||
../src/freetype/base/ftsystem.c \
|
||||
../src/freetype/base/fttype1.c \
|
||||
../src/freetype/base/ftwinfnt.c \
|
||||
../src/freetype/bdf/bdf.c \
|
||||
../src/freetype/bzip2/ftbzip2.c \
|
||||
../src/freetype/cache/ftcache.c \
|
||||
../src/freetype/cff/cff.c \
|
||||
../src/freetype/cid/type1cid.c \
|
||||
../src/freetype/gzip/ftgzip.c \
|
||||
../src/freetype/lzw/ftlzw.c \
|
||||
../src/freetype/pcf/pcf.c \
|
||||
../src/freetype/pfr/pfr.c \
|
||||
../src/freetype/psaux/psaux.c \
|
||||
../src/freetype/pshinter/pshinter.c \
|
||||
../src/freetype/psnames/psnames.c \
|
||||
../src/freetype/raster/raster.c \
|
||||
../src/freetype/sfnt/sfnt.c \
|
||||
../src/freetype/smooth/smooth.c \
|
||||
../src/freetype/truetype/truetype.c \
|
||||
../src/freetype/type1/type1.c \
|
||||
../src/freetype/type42/type42.c \
|
||||
../src/freetype/winfonts/winfnt.c
|
||||
|
||||
ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP
|
||||
|
||||
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi/ -I../src/lib_hash/ -I../src/protobuf-c/ -I../src/utf8proc/ -I../src/ -I../src/freetype/include/
|
||||
|
||||
|
||||
ccextractor_LDADD=-lm
|
||||
|
||||
if SYS_IS_LINUX
|
||||
ccextractor_CFLAGS += -O3 -s -DGPAC_CONFIG_LINUX
|
||||
endif
|
||||
|
||||
if SYS_IS_MAC
|
||||
ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek
|
||||
ccextractor_LDADD += -liconv -lz
|
||||
endif
|
||||
|
||||
if HARDSUBX_IS_ENABLED
|
||||
ccextractor_CFLAGS += -DENABLE_HARDSUBX
|
||||
ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS}
|
||||
ccextractor_CPPFLAGS+= ${libavformat_CFLAGS}
|
||||
ccextractor_CPPFLAGS+= ${libavutil_CFALGS}
|
||||
ccextractor_CPPFLAGS+= ${libswscale_CFLAGS}
|
||||
AV_LIB = ${libavcodec_LIBS}
|
||||
AV_LIB += ${libavformat_LIBS}
|
||||
AV_LIB += ${libavutil_LIBS}
|
||||
AV_LIB += ${libswscale_LIBS}
|
||||
ccextractor_LDADD += $(AV_LIB)
|
||||
endif
|
||||
|
||||
if OCR_IS_ENABLED
|
||||
ccextractor_CFLAGS += -DENABLE_OCR -DPN3G_NO_CONFIG_H
|
||||
LEPT_LIB = ${lept_LIBS}
|
||||
LEPT_CPPFLAG = ${lept_CFLAGS}
|
||||
|
||||
if TESSERACT_PRESENT
|
||||
TESS_LIB = ${tesseract_LIBS}
|
||||
TESS_CPPFLAG = ${tesseract_CFLAGS}
|
||||
else
|
||||
|
||||
#fix for raspberry pi not having a pkgconfig file for tesseract
|
||||
|
||||
if TESSERACT_PRESENT_RPI
|
||||
TESS_LIB = -ltesseract
|
||||
TESS_CPPFLAG = -I/usr/include/tesseract
|
||||
endif
|
||||
endif
|
||||
|
||||
ccextractor_CPPFLAGS += $(TESS_CPPFLAG)
|
||||
ccextractor_CPPFLAGS += $(LEPT_CPPFLAG)
|
||||
ccextractor_LDADD += $(TESS_LIB)
|
||||
ccextractor_LDADD += $(LEPT_LIB)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c fonts/ icon/
|
||||
|
||||
#For GUI
|
||||
if BUILD_WITH_GUI
|
||||
bin_PROGRAMS += ccextractorGUI
|
||||
|
||||
ccextractorGUI_SOURCES = \
|
||||
../src/GUI/ccextractorGUI.c \
|
||||
../src/GUI/ccextractorGUI.h \
|
||||
../src/GUI/activity.c \
|
||||
../src/GUI/activity.h \
|
||||
../src/GUI/terminal.c \
|
||||
../src/GUI/preview.c \
|
||||
../src/GUI/preview.h \
|
||||
../src/GUI/ccx_cli_thread.c \
|
||||
../src/GUI/ccx_cli_thread.h \
|
||||
../src/GUI/command_builder.c \
|
||||
../src/GUI/command_builder.h \
|
||||
../src/GUI/save_load_data.c \
|
||||
../src/GUI/save_load_data.h \
|
||||
../src/GUI/file_browser.c \
|
||||
../src/GUI/file_browser.h \
|
||||
../src/GUI/popups.c \
|
||||
../src/GUI/popups.h \
|
||||
../src/GUI/tabs.c \
|
||||
../src/GUI/tabs.h \
|
||||
../src/GUI/stb_image.h \
|
||||
../src/GUI/nuklear_lib/nuklear.h \
|
||||
../src/GUI/nuklear_lib/nuklear_glfw_gl2.h
|
||||
|
||||
ccextractorGUI_CFLAGS = -std=gnu99
|
||||
|
||||
|
||||
ccextractorGUI_LDADD = ${glfw3_LIBS}
|
||||
|
||||
|
||||
if SYS_IS_LINUX
|
||||
ccextractorGUI_CFLAGS += -s -O3 -DUNIX
|
||||
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
|
||||
ccextractorGUI_LDADD += ${glew_LIBS}
|
||||
ccextractorGUI_LDADD += -lX11 -lXinerama -lXcursor -lXi -lXrandr -lXxf86vm -lm -ldl -lpthread
|
||||
endif
|
||||
|
||||
if SYS_IS_MAC
|
||||
ccextractorGUI_CFLAGS += -O3 -DUNIX
|
||||
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
|
||||
ccextractorGUI_LDADD += ${glew_LIBS}
|
||||
ccextractorGUI_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
|
||||
ccextractorGUI_LDADD += -lglfw -lm -L/usr/local/lib -lpthread
|
||||
endif
|
||||
|
||||
if HARDSUBX_IS_ENABLED
|
||||
if OCR_IS_ENABLED
|
||||
ccextractorGUI_CFLAGS += -DENABLE_OCR
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_DIST += ../icon/ ../fonts/
|
||||
|
||||
endif
|
||||
|
||||
4
linux/autogen.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
./pre-build.sh
|
||||
autoreconf -i
|
||||
94
linux/build
@@ -1,2 +1,94 @@
|
||||
#!/bin/bash
|
||||
gcc -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c') -lm -zmuldefs
|
||||
BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
|
||||
BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
|
||||
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
||||
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
||||
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
||||
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
||||
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
|
||||
SRC_FREETYPE="../src/freetype/autofit/autofit.c
|
||||
../src/freetype/base/ftbase.c
|
||||
../src/freetype/base/ftbbox.c
|
||||
../src/freetype/base/ftbdf.c
|
||||
../src/freetype/base/ftbitmap.c
|
||||
../src/freetype/base/ftcid.c
|
||||
../src/freetype/base/ftfntfmt.c
|
||||
../src/freetype/base/ftfstype.c
|
||||
../src/freetype/base/ftgasp.c
|
||||
../src/freetype/base/ftglyph.c
|
||||
../src/freetype/base/ftgxval.c
|
||||
../src/freetype/base/ftinit.c
|
||||
../src/freetype/base/ftlcdfil.c
|
||||
../src/freetype/base/ftmm.c
|
||||
../src/freetype/base/ftotval.c
|
||||
../src/freetype/base/ftpatent.c
|
||||
../src/freetype/base/ftpfr.c
|
||||
../src/freetype/base/ftstroke.c
|
||||
../src/freetype/base/ftsynth.c
|
||||
../src/freetype/base/ftsystem.c
|
||||
../src/freetype/base/fttype1.c
|
||||
../src/freetype/base/ftwinfnt.c
|
||||
../src/freetype/bdf/bdf.c
|
||||
../src/freetype/bzip2/ftbzip2.c
|
||||
../src/freetype/cache/ftcache.c
|
||||
../src/freetype/cff/cff.c
|
||||
../src/freetype/cid/type1cid.c
|
||||
../src/freetype/gzip/ftgzip.c
|
||||
../src/freetype/lzw/ftlzw.c
|
||||
../src/freetype/pcf/pcf.c
|
||||
../src/freetype/pfr/pfr.c
|
||||
../src/freetype/psaux/psaux.c
|
||||
../src/freetype/pshinter/pshinter.c
|
||||
../src/freetype/psnames/psnames.c
|
||||
../src/freetype/raster/raster.c
|
||||
../src/freetype/sfnt/sfnt.c
|
||||
../src/freetype/smooth/smooth.c
|
||||
../src/freetype/truetype/truetype.c
|
||||
../src/freetype/type1/type1.c
|
||||
../src/freetype/type42/type42.c
|
||||
../src/freetype/winfonts/winfnt.c"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $API_WRAPPERS $SRC_FREETYPE"
|
||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept"
|
||||
|
||||
echo "Running pre-build script..."
|
||||
./pre-build.sh
|
||||
echo "Trying to compile..."
|
||||
|
||||
out=$((LC_ALL=C gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER)2>&1)
|
||||
res=$?
|
||||
if [[ $out == *"gcc: command not found"* ]]
|
||||
then
|
||||
echo "Error: please install gcc";
|
||||
exit 1
|
||||
fi
|
||||
if [[ $out == *"curl.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install curl development library (libcurl4-gnutls-dev for Debian/Ubuntu)";
|
||||
exit 2
|
||||
fi
|
||||
if [[ $out == *"capi.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install tesseract development library (tesseract-ocr-dev for Debian/Ubuntu)";
|
||||
exit 3
|
||||
fi
|
||||
if [[ $out == *"allheaders.h: No such file or directory"* ]]
|
||||
then
|
||||
echo "Error: please install leptonica development library (libleptonica-dev for Debian/Ubuntu)";
|
||||
exit 4
|
||||
fi
|
||||
if [[ $res -ne 0 ]] # Unknown error
|
||||
then
|
||||
echo "Compiled with errors"
|
||||
>&2 echo "$out"
|
||||
exit 5
|
||||
fi
|
||||
if [[ "$out" != "" ]] ; then
|
||||
echo "$out"
|
||||
echo "Compilation successful, compiler message shown in previous lines"
|
||||
else
|
||||
echo "Compilation successful, no compiler messages."
|
||||
fi
|
||||
|
||||
112
linux/build-static.sh
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
####################################################################
|
||||
# setup by tracey apr 2012
|
||||
# updated version dec 2016
|
||||
# see: http://www.ccextractor.org/doku.php
|
||||
####################################################################
|
||||
|
||||
|
||||
# build it static!
|
||||
# simplest way is with linux alpine
|
||||
# hop onto box with docker on it and cd to dir of the file you are staring at
|
||||
# You will get a static-compiled binary and english language library file in the end.
|
||||
if [ ! -e /tmp/cc/ccextractor-README.txt ]; then
|
||||
rm -rf /tmp/cc;
|
||||
mkdir -p -m777 /tmp/cc;
|
||||
mkdir -p -m777 ../lib/tessdata/;
|
||||
cp ccextractor-README.txt /tmp/cc/;
|
||||
sudo docker run -v /tmp/cc:/tmp/cc --rm -it alpine:latest /tmp/cc/ccextractor-README.txt;
|
||||
# NOTE: _AFTER_ testing/validating, you can promote it from "ccextractor.next" to "ccextractor"... ;-)
|
||||
cp /tmp/cc/*traineddata ../lib/tessdata/;
|
||||
chmod go-w ../lib/tessdata/;
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# NOW we are inside docker container...
|
||||
cd /tmp/cc;
|
||||
|
||||
|
||||
# we want tesseract (for OCR)
|
||||
echo '
|
||||
http://dl-cdn.alpinelinux.org/alpine/v3.5/main
|
||||
http://dl-cdn.alpinelinux.org/alpine/v3.5/community
|
||||
' >| /etc/apk/repositories;
|
||||
apk update; apk upgrade;
|
||||
|
||||
apk add --update bash zsh alpine-sdk perl;
|
||||
|
||||
# (needed by various static builds below)
|
||||
# Even though we're going to (re)builid tesseract from source statically, get its dependencies setup by
|
||||
# installing it now, too.
|
||||
apk add autoconf automake libtool tesseract-ocr-dev;
|
||||
|
||||
|
||||
# Now comes the not-so-fun parts... Many packages _only_ provide .so files in their distros -- not the .a
|
||||
# needed files for building something with it statically. Step through them now...
|
||||
|
||||
|
||||
# libgif
|
||||
wget https://sourceforge.net/projects/giflib/files/giflib-5.1.4.tar.gz;
|
||||
zcat giflib*tar.gz | tar xf -;
|
||||
cd giflib*/;
|
||||
./configure --disable-shared --enable-static; make; make install;
|
||||
hash -r;
|
||||
cd -;
|
||||
|
||||
|
||||
# libwebp
|
||||
git clone https://github.com/webmproject/libwebp;
|
||||
cd libwebp;
|
||||
./autogen.sh;
|
||||
./configure --disable-shared --enable-static; make; make install;
|
||||
cd -;
|
||||
|
||||
|
||||
# leptonica
|
||||
wget http://www.leptonica.org/source/leptonica-1.73.tar.gz;
|
||||
zcat leptonica*tar.gz | tar xf -;
|
||||
cd leptonica*/;
|
||||
./configure --disable-shared --enable-static; make; make install;
|
||||
hash -r;
|
||||
cd -;
|
||||
|
||||
|
||||
# tesseract
|
||||
git clone https://github.com/tesseract-ocr/tesseract;
|
||||
cd tesseract;
|
||||
./autogen.sh;
|
||||
./configure --disable-shared --enable-static; make; make install;
|
||||
cd -;
|
||||
|
||||
|
||||
# ccextractor -- build static
|
||||
git clone https://github.com/CCExtractor/ccextractor;
|
||||
cd ccextractor/linux/;
|
||||
# wget https://sourceforge.net/projects/ccextractor/files/ccextractor/0.82/ccextractor.src.0.82.zip;
|
||||
# unzip ccextractor*.zip;
|
||||
# cd ccextractor.*/linux/;
|
||||
perl -i -pe 's/O3 /O3 -static /' Makefile;
|
||||
# quick patch:
|
||||
perl -i -pe 's/(strchr|strstr)\(/$1((char *)/' ../src/gpacmp4/url.c ../src/gpacmp4/error.c;
|
||||
set +e; # this _will_ FAIL at the end..
|
||||
make ENABLE_OCR=yes;
|
||||
set -e;
|
||||
# I confess hand-compiling (cherrypicking which .a to use when there are 2, etc.) is fragile...
|
||||
# But it was the _only_ way I could get a fully static build after hours of thrashing...
|
||||
gcc -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -O3 -std=gnu99 -s -DGPAC_CONFIG_LINUX -DENABLE_OCR -DPNG_NO_CONFIG_H -I/usr/local/include/tesseract -I/usr/local/include/leptonica objs/*.o -o ccextractor \
|
||||
--static -lm \
|
||||
/usr/local/lib/libtesseract.a \
|
||||
/usr/local/lib/liblept.a \
|
||||
/usr/local/lib/libgif.a \
|
||||
/usr/local/lib/libwebp.a \
|
||||
/usr/lib/libjpeg.a \
|
||||
/usr/lib/libtiff.a \
|
||||
/usr/lib/libgomp.a \
|
||||
-lstdc++;
|
||||
|
||||
cp ccextractor /tmp/cc/ccextractor.next;
|
||||
cd -;
|
||||
|
||||
# get english lang trained data
|
||||
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata;
|
||||
59
linux/build_hardsubx
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DENABLE_HARDSUBX -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
|
||||
BLD_INCLUDE="-I../src -I /usr/local/include -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/freetype/include"
|
||||
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
||||
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
||||
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
||||
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
||||
SRC_UTF8="../src/utf8proc/utf8proc.c"
|
||||
SRC_FREETYPE="../src/freetype/autofit/autofit.c
|
||||
../src/freetype/base/ftbase.c
|
||||
../src/freetype/base/ftbbox.c
|
||||
../src/freetype/base/ftbdf.c
|
||||
../src/freetype/base/ftbitmap.c
|
||||
../src/freetype/base/ftcid.c
|
||||
../src/freetype/base/ftfntfmt.c
|
||||
../src/freetype/base/ftfstype.c
|
||||
../src/freetype/base/ftgasp.c
|
||||
../src/freetype/base/ftglyph.c
|
||||
../src/freetype/base/ftgxval.c
|
||||
../src/freetype/base/ftinit.c
|
||||
../src/freetype/base/ftlcdfil.c
|
||||
../src/freetype/base/ftmm.c
|
||||
../src/freetype/base/ftotval.c
|
||||
../src/freetype/base/ftpatent.c
|
||||
../src/freetype/base/ftpfr.c
|
||||
../src/freetype/base/ftstroke.c
|
||||
../src/freetype/base/ftsynth.c
|
||||
../src/freetype/base/ftsystem.c
|
||||
../src/freetype/base/fttype1.c
|
||||
../src/freetype/base/ftwinfnt.c
|
||||
../src/freetype/bdf/bdf.c
|
||||
../src/freetype/bzip2/ftbzip2.c
|
||||
../src/freetype/cache/ftcache.c
|
||||
../src/freetype/cff/cff.c
|
||||
../src/freetype/cid/type1cid.c
|
||||
../src/freetype/gzip/ftgzip.c
|
||||
../src/freetype/lzw/ftlzw.c
|
||||
../src/freetype/pcf/pcf.c
|
||||
../src/freetype/pfr/pfr.c
|
||||
../src/freetype/psaux/psaux.c
|
||||
../src/freetype/pshinter/pshinter.c
|
||||
../src/freetype/psnames/psnames.c
|
||||
../src/freetype/raster/raster.c
|
||||
../src/freetype/sfnt/sfnt.c
|
||||
../src/freetype/smooth/smooth.c
|
||||
../src/freetype/truetype/truetype.c
|
||||
../src/freetype/type1/type1.c
|
||||
../src/freetype/type42/type42.c
|
||||
../src/freetype/winfonts/winfnt.c"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
||||
protobuf-c
|
||||
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_UTF8 $SRC_PROTOBUF $API_WRAPPERS $SRC_FREETYPE"
|
||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept -L/usr/local/lib -lswscale -lavutil -pthread -lavformat -lavcodec -lxcb-shm -lxcb -lX11 -llzma -lz -lswresample"
|
||||
|
||||
./pre-build.sh
|
||||
gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|
||||
@@ -1,2 +1,63 @@
|
||||
#!/bin/bash
|
||||
gcc -g -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c') -lm -zmuldefs
|
||||
BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -Wno-unused-result -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
|
||||
BLD_INCLUDE="-I../src -I /usr/local/include/leptonica/ -I /usr/local/include/tesseract/ -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
|
||||
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
||||
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
||||
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
||||
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
||||
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
|
||||
SRC_FREETYPE="../src/freetype/autofit/autofit.c
|
||||
../src/freetype/base/ftbase.c
|
||||
../src/freetype/base/ftbbox.c
|
||||
../src/freetype/base/ftbdf.c
|
||||
../src/freetype/base/ftbitmap.c
|
||||
../src/freetype/base/ftcid.c
|
||||
../src/freetype/base/ftfntfmt.c
|
||||
../src/freetype/base/ftfstype.c
|
||||
../src/freetype/base/ftgasp.c
|
||||
../src/freetype/base/ftglyph.c
|
||||
../src/freetype/base/ftgxval.c
|
||||
../src/freetype/base/ftinit.c
|
||||
../src/freetype/base/ftlcdfil.c
|
||||
../src/freetype/base/ftmm.c
|
||||
../src/freetype/base/ftotval.c
|
||||
../src/freetype/base/ftpatent.c
|
||||
../src/freetype/base/ftpfr.c
|
||||
../src/freetype/base/ftstroke.c
|
||||
../src/freetype/base/ftsynth.c
|
||||
../src/freetype/base/ftsystem.c
|
||||
../src/freetype/base/fttype1.c
|
||||
../src/freetype/base/ftwinfnt.c
|
||||
../src/freetype/bdf/bdf.c
|
||||
../src/freetype/bzip2/ftbzip2.c
|
||||
../src/freetype/cache/ftcache.c
|
||||
../src/freetype/cff/cff.c
|
||||
../src/freetype/cid/type1cid.c
|
||||
../src/freetype/gzip/ftgzip.c
|
||||
../src/freetype/lzw/ftlzw.c
|
||||
../src/freetype/pcf/pcf.c
|
||||
../src/freetype/pfr/pfr.c
|
||||
../src/freetype/psaux/psaux.c
|
||||
../src/freetype/pshinter/pshinter.c
|
||||
../src/freetype/psnames/psnames.c
|
||||
../src/freetype/raster/raster.c
|
||||
../src/freetype/sfnt/sfnt.c
|
||||
../src/freetype/smooth/smooth.c
|
||||
../src/freetype/truetype/truetype.c
|
||||
../src/freetype/type1/type1.c
|
||||
../src/freetype/type42/type42.c
|
||||
../src/freetype/winfonts/winfnt.c"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $API_WRAPPERS $SRC_FREETYPE"
|
||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept"
|
||||
#BLD_DEBUG="-g -O1 -fsanitize=address -fno-omit-frame-pointer"
|
||||
BLD_DEBUG=""
|
||||
|
||||
echo "Running pre-build script..."
|
||||
./pre-build.sh
|
||||
echo "Trying to compile..."
|
||||
|
||||
gcc $BLD_DEBUG $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|
||||
|
||||
4
linux/cleanup
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
make distclean > /dev/null 2>&1 || true
|
||||
rm -rf Makefile configure *.in config.status config.log aclocal.m4 build-conf autom4te.cache
|
||||
120
linux/configure.ac
Normal file
@@ -0,0 +1,120 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([CCExtractor], [0.87], [carlos@ccextractor.org])
|
||||
AC_CONFIG_AUX_DIR([build-conf])
|
||||
AC_CONFIG_SRCDIR([../src/ccextractor.c])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
#Checks for "pkg-config" utility
|
||||
AC_MSG_CHECKING([pkg-config m4 macros])
|
||||
if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) == yes; then
|
||||
AC_MSG_RESULT([yes]);
|
||||
else
|
||||
AC_MSG_RESULT([no]);
|
||||
AC_MSG_ERROR([
|
||||
pkg-config is required.])
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([m], [sin], [], [AC_MSG_ERROR(Math library not installed. Install it before proceeding.)])
|
||||
AC_CHECK_LIB([lept], [getLeptonicaVersion], [HAS_LEPT=1 && PKG_CHECK_MODULES([lept], [lept])], [HAS_LEPT=0])
|
||||
AC_CHECK_LIB([tesseract], [TessVersion], [HAS_TESSERACT=1 && PKG_CHECK_MODULES([tesseract], [tesseract])], [HAS_TESSERACT=0])
|
||||
AC_CHECK_LIB([avcodec], [avcodec_version], [HAS_AVCODEC=1 && PKG_CHECK_MODULES([libavcodec], [libavcodec])], [HAS_AVCODEC=0])
|
||||
AC_CHECK_LIB([avformat], [avformat_version], [HAS_AVFORMAT=1 && PKG_CHECK_MODULES([libavformat], [libavformat])], [HAS_AVFORMAT=0])
|
||||
AC_CHECK_LIB([avutil], [avutil_version], [HAS_AVUTIL=1 && PKG_CHECK_MODULES([libavutil], [libavutil])], [HAS_AVUTIL=0])
|
||||
AC_CHECK_LIB([swscale], [swscale_version], [HAS_SWSCALE=1 && PKG_CHECK_MODULES([libswscale], [libswscale])], [HAS_SWSCALE=0])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h termios.h unistd.h wchar.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_CHECK_HEADER_STDBOOL
|
||||
AC_C_INLINE
|
||||
AC_TYPE_INT16_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_INT8_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_CHECK_TYPES([ptrdiff_t])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_FSEEKO
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MKTIME
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_STRERROR_R
|
||||
AC_CHECK_FUNCS([floor ftruncate gethostbyname gettimeofday inet_ntoa mblen memchr memmove memset mkdir modf pow realpath rmdir select setlocale socket sqrt strcasecmp strchr strdup strerror strndup strrchr strstr strtol])
|
||||
|
||||
# Checks for arguments with configure
|
||||
AC_ARG_ENABLE([hardsubx],
|
||||
AC_HELP_STRING([--enable-hardsubx], [Enables extraction of burnt subtitles (hard subtitles)]),
|
||||
[case "${enableval}" in
|
||||
yes) hardsubx=true ;;
|
||||
no) hardsubx=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-hardsubx]) ;;
|
||||
esac],[hardsubx=false])
|
||||
|
||||
AC_ARG_ENABLE([ocr],
|
||||
AC_HELP_STRING([--enable-ocr], [Enables Optical Character Recognition]),
|
||||
[case "${enableval}" in
|
||||
yes) ocr=true ;;
|
||||
no) ocr=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ocr]) ;;
|
||||
esac],[ocr=false])
|
||||
|
||||
AC_ARG_ENABLE([ffmpeg],
|
||||
AC_HELP_STRING([--enable-ffmpeg], [Enable FFmpeg integration]),
|
||||
[case "${enableval}" in
|
||||
yes) ffmpeg=true ;;
|
||||
no) ffmpeg=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ffmpeg]) ;;
|
||||
esac],[ffmpeg=false])
|
||||
|
||||
AC_ARG_WITH([gui],
|
||||
AC_HELP_STRING([--with-gui], [Builds CCExtractor with GUI (requires GLFW and GLEW)]),
|
||||
[PKG_CHECK_MODULES([glfw3], [glfw3]) && PKG_CHECK_MODULES([glew], [glew])],
|
||||
[with_gui=no])
|
||||
|
||||
|
||||
#Checks and prompts if libraries found/not found to avoild failure while building
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVCODEC -gt 0 ], [AC_MSG_NOTICE(avcodec library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVCODEC -gt 0 ], [AC_MSG_ERROR(avcodec library not found. Please install the avcodec library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVFORMAT -gt 0 ], [AC_MSG_NOTICE(avformat library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVFORMAT -gt 0 ], [AC_MSG_ERROR(avformat library not found. Please install the avformat library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVUTIL -gt 0 ], [AC_MSG_NOTICE(avutil library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVUTIL -gt 0 ], [AC_MSG_ERROR(avutil library not found. Please install the avutil library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_SWSCALE -gt 0 ], [AC_MSG_NOTICE(swscale library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_SWSCALE -gt 0 ], [AC_MSG_ERROR(swscale library not found. Please install the swscale library before proceeding)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=`tesseract --version 2>&1 | grep tesseract` && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_TESSERACT -gt 0 ], [AC_MSG_ERROR(tesserect library not found. Please install the tesseract library before proceeding)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=`tesseract --version 2>&1 | grep leptonica` && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_LEPT -gt 0 ], [AC_MSG_ERROR(leptonica library not found. Please install the leptonica library before proceeding)])
|
||||
|
||||
#AM_CONDITIONAL(s) for setting values to enable/disable flags in Makefile.am
|
||||
AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ])
|
||||
AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ])
|
||||
AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ])
|
||||
AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ])
|
||||
AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ])
|
||||
AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
|
||||
AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
|
||||
AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
1
linux/description-pak
Normal file
@@ -0,0 +1 @@
|
||||
Best open source tool for a subtitled world
|
||||
13
linux/module_generator
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
||||
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
||||
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
||||
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
||||
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
BLD_SOURCES="../src/ccextractor.c ../src/ccextractorapi_wrap.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $API_WRAPPERS"
|
||||
|
||||
python setup.py $BLD_SOURCES
|
||||
34
linux/pre-build.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
echo "Obtaining Git commit"
|
||||
commit=(`git rev-parse HEAD 2>/dev/null`)
|
||||
if [ -z "$commit" ]; then
|
||||
echo "Git command not present, trying folder approach"
|
||||
if [ -d "../.git" ]; then
|
||||
echo "Git folder found, using HEAD file"
|
||||
head="`cat ../.git/HEAD`"
|
||||
ref_pos=(`expr match "$head" 'ref: '`)
|
||||
if [ $ref_pos -eq 5 ]; then
|
||||
echo "HEAD file contains a ref, following"
|
||||
commit=(`cat "../.git/${head:5}"`)
|
||||
echo "Extracted commit: $commit"
|
||||
else
|
||||
echo "HEAD contains a commit, using it"
|
||||
commit="$head"
|
||||
echo "Extracted commit: $commit"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -z "$commit" ]; then
|
||||
commit="Unknown"
|
||||
fi
|
||||
builddate=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
|
||||
echo "Storing variables in file"
|
||||
echo "Commit: $commit"
|
||||
echo "Date: $builddate"
|
||||
echo "#ifndef CCX_CCEXTRACTOR_COMPILE_REAL_H" > ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define CCX_CCEXTRACTOR_COMPILE_REAL_H" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define GIT_COMMIT \"$commit\"" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define COMPILE_DATE \"$builddate\"" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#endif" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "Stored all in compile_info_real.h"
|
||||
echo "Done."
|
||||
427
mac/Makefile.am
Normal file
@@ -0,0 +1,427 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
|
||||
bin_PROGRAMS = ccextractor
|
||||
ccextractor_SOURCES = \
|
||||
../src/ccextractor.c \
|
||||
../src/ccextractor.h \
|
||||
../src/gpacmp4/avc_ext.c \
|
||||
../src/gpacmp4/avilib.c \
|
||||
../src/gpacmp4/av_parsers.c \
|
||||
../src/gpacmp4/base_encoding.c \
|
||||
../src/gpacmp4/bitstream.c \
|
||||
../src/gpacmp4/box_code_3gpp.c \
|
||||
../src/gpacmp4/box_code_adobe.c \
|
||||
../src/gpacmp4/box_code_apple.c \
|
||||
../src/gpacmp4/box_code_base.c \
|
||||
../src/gpacmp4/box_code_drm.c \
|
||||
../src/gpacmp4/box_dump.c \
|
||||
../src/gpacmp4/box_code_meta.c \
|
||||
../src/gpacmp4/box_funcs.c \
|
||||
../src/gpacmp4/color.c \
|
||||
../src/gpacmp4/configfile.c \
|
||||
../src/gpacmp4/data_map.c \
|
||||
../src/gpacmp4/desc_private.c \
|
||||
../src/gpacmp4/descriptors.c \
|
||||
../src/gpacmp4/drm_sample.c \
|
||||
../src/gpacmp4/error.c \
|
||||
../src/gpacmp4/gpac_ogg.c \
|
||||
../src/gpacmp4/hint_track.c \
|
||||
../src/gpacmp4/hinting.c \
|
||||
../src/gpacmp4/ipmpx_code.c \
|
||||
../src/gpacmp4/ipmpx_parse.c \
|
||||
../src/gpacmp4/isom_intern.c \
|
||||
../src/gpacmp4/isom_read.c \
|
||||
../src/gpacmp4/isom_store.c \
|
||||
../src/gpacmp4/isom_write.c \
|
||||
../src/gpacmp4/list.c \
|
||||
../src/gpacmp4/math.c \
|
||||
../src/gpacmp4/media.c \
|
||||
../src/gpacmp4/media_odf.c \
|
||||
../src/gpacmp4/meta.c \
|
||||
../src/gpacmp4/movie_fragments.c \
|
||||
../src/gpacmp4/mp4.c \
|
||||
../src/gpacmp4/odf_code.c \
|
||||
../src/gpacmp4/odf_codec.c \
|
||||
../src/gpacmp4/odf_command.c \
|
||||
../src/gpacmp4/os_config_init.c \
|
||||
../src/gpacmp4/os_divers.c \
|
||||
../src/gpacmp4/os_file.c \
|
||||
../src/gpacmp4/qos.c \
|
||||
../src/gpacmp4/sample_descs.c \
|
||||
../src/gpacmp4/slc.c \
|
||||
../src/gpacmp4/stbl_read.c \
|
||||
../src/gpacmp4/stbl_write.c \
|
||||
../src/gpacmp4/track.c \
|
||||
../src/gpacmp4/tx3g.c \
|
||||
../src/gpacmp4/url.c \
|
||||
../src/gpacmp4/utf.c \
|
||||
../src/gpacmp4/gpac/avparse.h \
|
||||
../src/gpacmp4/gpac/base_coding.h \
|
||||
../src/gpacmp4/gpac/bitstream.h \
|
||||
../src/gpacmp4/gpac/color.h \
|
||||
../src/gpacmp4/gpac/config_file.h \
|
||||
../src/gpacmp4/gpac/configuration.h \
|
||||
../src/gpacmp4/gpac/constants.h \
|
||||
../src/gpacmp4/gpac/events_constants.h \
|
||||
../src/gpacmp4/gpac/ietf.h \
|
||||
../src/gpacmp4/gpac/isomedia.h \
|
||||
../src/gpacmp4/gpac/list.h \
|
||||
../src/gpacmp4/gpac/maths.h \
|
||||
../src/gpacmp4/gpac/media_tools.h \
|
||||
../src/gpacmp4/gpac/mpeg4_odf.h \
|
||||
../src/gpacmp4/gpac/network.h \
|
||||
../src/gpacmp4/gpac/revision.h \
|
||||
../src/gpacmp4/gpac/setup.h \
|
||||
../src/gpacmp4/gpac/tools.h \
|
||||
../src/gpacmp4/gpac/utf.h \
|
||||
../src/gpacmp4/gpac/version.h \
|
||||
../src/gpacmp4/gpac/internal/avilib.h \
|
||||
../src/gpacmp4/gpac/internal/isomedia_dev.h \
|
||||
../src/gpacmp4/gpac/internal/media_dev.h \
|
||||
../src/gpacmp4/gpac/internal/odf_dev.h \
|
||||
../src/gpacmp4/gpac/internal/odf_parse_common.h \
|
||||
../src/gpacmp4/gpac/internal/ogg.h \
|
||||
../src/libpng/pngstruct.h \
|
||||
../src/libpng/pngpriv.h \
|
||||
../src/libpng/pnginfo.h \
|
||||
../src/libpng/pnglibconf.h \
|
||||
../src/libpng/pngconf.h \
|
||||
../src/libpng/pngdebug.h \
|
||||
../src/libpng/png.h \
|
||||
../src/libpng/png.c \
|
||||
../src/libpng/pngerror.c \
|
||||
../src/libpng/pngget.c \
|
||||
../src/libpng/pngmem.c \
|
||||
../src/libpng/pngpread.c \
|
||||
../src/libpng/pngread.c \
|
||||
../src/libpng/pngrio.c \
|
||||
../src/libpng/pngrtran.c \
|
||||
../src/libpng/pngrutil.c \
|
||||
../src/libpng/pngset.c \
|
||||
../src/libpng/pngtrans.c \
|
||||
../src/libpng/pngwio.c \
|
||||
../src/libpng/pngwrite.c \
|
||||
../src/libpng/pngwtran.c \
|
||||
../src/libpng/pngwutil.c \
|
||||
../src/lib_ccx/ccx_common_common.h \
|
||||
../src/lib_ccx/ccx_common_option.h \
|
||||
../src/lib_ccx/utility.h \
|
||||
../src/lib_ccx/activity.h \
|
||||
../src/lib_ccx/asf_constants.h \
|
||||
../src/lib_ccx/avc_functions.h \
|
||||
../src/lib_ccx/bitstream.h \
|
||||
../src/lib_ccx/ccx_common_option.c \
|
||||
../src/lib_ccx/ccx_common_common.c \
|
||||
../src/lib_ccx/utility.c \
|
||||
../src/lib_ccx/activity.c \
|
||||
../src/lib_ccx/asf_functions.c \
|
||||
../src/lib_ccx/avc_functions.c \
|
||||
../src/lib_ccx/cc_bitstream.c \
|
||||
../src/lib_ccx/ccx_common_char_encoding.c \
|
||||
../src/lib_ccx/ccx_common_char_encoding.h \
|
||||
../src/lib_ccx/ccx_common_constants.c \
|
||||
../src/lib_ccx/ccx_common_constants.h \
|
||||
../src/lib_ccx/ccx_common_platform.h \
|
||||
../src/lib_ccx/ccx_common_structs.h \
|
||||
../src/lib_ccx/ccx_common_timing.c \
|
||||
../src/lib_ccx/ccx_common_timing.h \
|
||||
../src/lib_ccx/ccx_decoders_608.c \
|
||||
../src/lib_ccx/ccx_decoders_608.h \
|
||||
../src/lib_ccx/ccx_decoders_708.c \
|
||||
../src/lib_ccx/ccx_decoders_708_encoding.c \
|
||||
../src/lib_ccx/ccx_decoders_708_encoding.h \
|
||||
../src/lib_ccx/ccx_decoders_708.h \
|
||||
../src/lib_ccx/ccx_decoders_708_output.c \
|
||||
../src/lib_ccx/ccx_decoders_708_output.h \
|
||||
../src/lib_ccx/ccx_decoders_common.c \
|
||||
../src/lib_ccx/ccx_decoders_common.h \
|
||||
../src/lib_ccx/ccx_decoders_isdb.c \
|
||||
../src/lib_ccx/ccx_decoders_isdb.h \
|
||||
../src/lib_ccx/ccx_decoders_structs.h \
|
||||
../src/lib_ccx/ccx_decoders_vbi.c \
|
||||
../src/lib_ccx/ccx_decoders_vbi.h \
|
||||
../src/lib_ccx/ccx_decoders_xds.c \
|
||||
../src/lib_ccx/ccx_decoders_xds.h \
|
||||
../src/lib_ccx/ccx_demuxer.c \
|
||||
../src/lib_ccx/ccx_demuxer.h \
|
||||
../src/lib_ccx/ccx_demuxer_mxf.c \
|
||||
../src/lib_ccx/ccx_demuxer_mxf.h \
|
||||
../src/lib_ccx/ccx_dtvcc.c \
|
||||
../src/lib_ccx/ccx_dtvcc.h \
|
||||
../src/lib_ccx/ccx_encoders_common.c \
|
||||
../src/lib_ccx/ccx_encoders_common.h \
|
||||
../src/lib_ccx/ccx_encoders_curl.c \
|
||||
../src/lib_ccx/ccx_encoders_g608.c \
|
||||
../src/lib_ccx/ccx_encoders_helpers.c \
|
||||
../src/lib_ccx/ccx_encoders_helpers.h \
|
||||
../src/lib_ccx/ccx_encoders_python.c \
|
||||
../src/lib_ccx/ccx_encoders_sami.c \
|
||||
../src/lib_ccx/ccx_encoders_smptett.c \
|
||||
../src/lib_ccx/ccx_encoders_splitbysentence.c \
|
||||
../src/lib_ccx/ccx_encoders_spupng.c \
|
||||
../src/lib_ccx/ccx_encoders_srt.c \
|
||||
../src/lib_ccx/ccx_encoders_ssa.c \
|
||||
../src/lib_ccx/ccx_encoders_structs.h \
|
||||
../src/lib_ccx/ccx_encoders_transcript.c \
|
||||
../src/lib_ccx/ccx_encoders_webvtt.c \
|
||||
../src/lib_ccx/ccx_encoders_xds.c \
|
||||
../src/lib_ccx/ccx_encoders_xds.h \
|
||||
../src/lib_ccx/ccx_gxf.c \
|
||||
../src/lib_ccx/ccx_gxf.h \
|
||||
../src/lib_ccx/ccx_mp4.h \
|
||||
../src/lib_ccx/ccx_share.c \
|
||||
../src/lib_ccx/ccx_share.h \
|
||||
../src/lib_ccx/ccx_sub_entry_message.pb-c.c \
|
||||
../src/lib_ccx/ccx_sub_entry_message.pb-c.h \
|
||||
../src/lib_ccx/compile_info.h \
|
||||
../src/lib_ccx/compile_info_real.h \
|
||||
../src/lib_ccx/configuration.c \
|
||||
../src/lib_ccx/configuration.h \
|
||||
../src/lib_ccx/disable_warnings.h \
|
||||
../src/lib_ccx/dvb_subtitle_decoder.c \
|
||||
../src/lib_ccx/dvb_subtitle_decoder.h \
|
||||
../src/lib_ccx/dvd_subtitle_decoder.c \
|
||||
../src/lib_ccx/dvd_subtitle_decoder.h \
|
||||
../src/lib_ccx/es_functions.c \
|
||||
../src/lib_ccx/es_userdata.c \
|
||||
../src/lib_ccx/ffmpeg_intgr.c \
|
||||
../src/lib_ccx/ffmpeg_intgr.h \
|
||||
../src/lib_ccx/file_buffer.h \
|
||||
../src/lib_ccx/file_functions.c \
|
||||
../src/lib_ccx/general_loop.c \
|
||||
../src/lib_ccx/hamming.h \
|
||||
../src/lib_ccx/hardsubx.c \
|
||||
../src/lib_ccx/hardsubx_classifier.c \
|
||||
../src/lib_ccx/hardsubx_decoder.c \
|
||||
../src/lib_ccx/hardsubx.h \
|
||||
../src/lib_ccx/hardsubx_imgops.c \
|
||||
../src/lib_ccx/hardsubx_utility.c \
|
||||
../src/lib_ccx/lib_ccx.c \
|
||||
../src/lib_ccx/lib_ccx.h \
|
||||
../src/lib_ccx/list.h \
|
||||
../src/lib_ccx/matroska.c \
|
||||
../src/lib_ccx/matroska.h \
|
||||
../src/lib_ccx/myth.c \
|
||||
../src/lib_ccx/networking.c \
|
||||
../src/lib_ccx/networking.h \
|
||||
../src/lib_ccx/ocr.c \
|
||||
../src/lib_ccx/ocr.h \
|
||||
../src/lib_ccx/output.c \
|
||||
../src/lib_ccx/params.c \
|
||||
../src/lib_ccx/params_dump.c \
|
||||
../src/lib_ccx/sequencing.c \
|
||||
../src/lib_ccx/stdintmsc.h \
|
||||
../src/lib_ccx/stream_functions.c \
|
||||
../src/lib_ccx/teletext.h \
|
||||
../src/lib_ccx/telxcc.c \
|
||||
../src/lib_ccx/ts_functions.c \
|
||||
../src/lib_ccx/ts_functions.h \
|
||||
../src/lib_ccx/ts_info.c \
|
||||
../src/lib_ccx/ts_tables.c \
|
||||
../src/lib_ccx/ts_tables_epg.c \
|
||||
../src/lib_ccx/wtv_constants.h \
|
||||
../src/lib_ccx/wtv_functions.c \
|
||||
../src/zlib/adler32.c \
|
||||
../src/zlib/compress.c \
|
||||
../src/zlib/crc32.c \
|
||||
../src/zlib/crc32.h \
|
||||
../src/zlib/deflate.c \
|
||||
../src/zlib/deflate.h \
|
||||
../src/zlib/gzclose.c \
|
||||
../src/zlib/gzguts.h \
|
||||
../src/zlib/gzlib.c \
|
||||
../src/zlib/gzread.c \
|
||||
../src/zlib/gzwrite.c \
|
||||
../src/zlib/infback.c \
|
||||
../src/zlib/inffast.c \
|
||||
../src/zlib/inffast.h \
|
||||
../src/zlib/inffixed.h \
|
||||
../src/zlib/inflate.c \
|
||||
../src/zlib/inflate.h \
|
||||
../src/zlib/inftrees.c \
|
||||
../src/zlib/inftrees.h \
|
||||
../src/zlib/trees.c \
|
||||
../src/zlib/trees.h \
|
||||
../src/zlib/uncompr.c \
|
||||
../src/zlib/zconf.h \
|
||||
../src/zlib/zlib.h \
|
||||
../src/zlib/zutil.c \
|
||||
../src/zlib/zutil.h \
|
||||
../src/utf8proc/utf8proc.c \
|
||||
../src/utf8proc/utf8proc.h \
|
||||
../src/lib_hash/sha2.c \
|
||||
../src/lib_hash/sha2.h \
|
||||
../src/protobuf-c/protobuf-c.c \
|
||||
../src/protobuf-c/protobuf-c.h \
|
||||
../src/zvbi/bcd.h \
|
||||
../src/zvbi/bit_slicer.c \
|
||||
../src/zvbi/bit_slicer.h \
|
||||
../src/zvbi/decoder.c \
|
||||
../src/zvbi/macros.h \
|
||||
../src/zvbi/misc.h \
|
||||
../src/zvbi/raw_decoder.c \
|
||||
../src/zvbi/raw_decoder.h \
|
||||
../src/zvbi/sampling_par.c \
|
||||
../src/zvbi/sampling_par.h \
|
||||
../src/zvbi/sliced.h \
|
||||
../src/zvbi/zvbi_decoder.h \
|
||||
../src/wrappers/wrapper.c \
|
||||
../src/wrappers/wrapper.h \
|
||||
../src/freetype/autofit/autofit.c \
|
||||
../src/freetype/base/ftbase.c \
|
||||
../src/freetype/base/ftbbox.c \
|
||||
../src/freetype/base/ftbdf.c \
|
||||
../src/freetype/base/ftbitmap.c \
|
||||
../src/freetype/base/ftcid.c \
|
||||
../src/freetype/base/ftfntfmt.c \
|
||||
../src/freetype/base/ftfstype.c \
|
||||
../src/freetype/base/ftgasp.c \
|
||||
../src/freetype/base/ftglyph.c \
|
||||
../src/freetype/base/ftgxval.c \
|
||||
../src/freetype/base/ftinit.c \
|
||||
../src/freetype/base/ftlcdfil.c \
|
||||
../src/freetype/base/ftmm.c \
|
||||
../src/freetype/base/ftotval.c \
|
||||
../src/freetype/base/ftpatent.c \
|
||||
../src/freetype/base/ftpfr.c \
|
||||
../src/freetype/base/ftstroke.c \
|
||||
../src/freetype/base/ftsynth.c \
|
||||
../src/freetype/base/ftsystem.c \
|
||||
../src/freetype/base/fttype1.c \
|
||||
../src/freetype/base/ftwinfnt.c \
|
||||
../src/freetype/bdf/bdf.c \
|
||||
../src/freetype/bzip2/ftbzip2.c \
|
||||
../src/freetype/cache/ftcache.c \
|
||||
../src/freetype/cff/cff.c \
|
||||
../src/freetype/cid/type1cid.c \
|
||||
../src/freetype/gzip/ftgzip.c \
|
||||
../src/freetype/lzw/ftlzw.c \
|
||||
../src/freetype/pcf/pcf.c \
|
||||
../src/freetype/pfr/pfr.c \
|
||||
../src/freetype/psaux/psaux.c \
|
||||
../src/freetype/pshinter/pshinter.c \
|
||||
../src/freetype/psnames/psnames.c \
|
||||
../src/freetype/raster/raster.c \
|
||||
../src/freetype/sfnt/sfnt.c \
|
||||
../src/freetype/smooth/smooth.c \
|
||||
../src/freetype/truetype/truetype.c \
|
||||
../src/freetype/type1/type1.c \
|
||||
../src/freetype/type42/type42.c \
|
||||
../src/freetype/winfonts/winfnt.c
|
||||
|
||||
|
||||
ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP
|
||||
|
||||
ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi/ -I../src/lib_hash/ -I../src/protobuf-c/ -I../src/utf8proc/ -I../src/ -I../src/freetype/include/
|
||||
|
||||
|
||||
ccextractor_LDADD=-lm
|
||||
|
||||
if SYS_IS_LINUX
|
||||
ccextractor_CFLAGS += -O3 -s -DGPAC_CONFIG_LINUX
|
||||
endif
|
||||
|
||||
if SYS_IS_MAC
|
||||
ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek
|
||||
ccextractor_LDADD += -liconv -lz
|
||||
endif
|
||||
|
||||
if HARDSUBX_IS_ENABLED
|
||||
ccextractor_CFLAGS += -DENABLE_HARDSUBX
|
||||
ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS}
|
||||
ccextractor_CPPFLAGS+= ${libavformat_CFLAGS}
|
||||
ccextractor_CPPFLAGS+= ${libavutil_CFALGS}
|
||||
ccextractor_CPPFLAGS+= ${libswscale_CFLAGS}
|
||||
AV_LIB = ${libavcodec_LIBS}
|
||||
AV_LIB += ${libavformat_LIBS}
|
||||
AV_LIB += ${libavutil_LIBS}
|
||||
AV_LIB += ${libswscale_LIBS}
|
||||
ccextractor_LDADD += $(AV_LIB)
|
||||
endif
|
||||
|
||||
if OCR_IS_ENABLED
|
||||
ccextractor_CFLAGS += -DENABLE_OCR -DPN3G_NO_CONFIG_H
|
||||
LEPT_LIB = ${lept_LIBS}
|
||||
LEPT_CPPFLAG = ${lept_CFLAGS}
|
||||
|
||||
if TESSERACT_PRESENT
|
||||
TESS_LIB = ${tesseract_LIBS}
|
||||
TESS_CPPFLAG = ${tesseract_CFLAGS}
|
||||
else
|
||||
|
||||
#fix for raspberry pi not having a pkgconfig file for tesseract
|
||||
|
||||
if TESSERACT_PRESENT_RPI
|
||||
TESS_LIB = -ltesseract
|
||||
TESS_CPPFLAG = -I/usr/include/tesseract
|
||||
endif
|
||||
endif
|
||||
|
||||
ccextractor_CPPFLAGS += $(TESS_CPPFLAG)
|
||||
ccextractor_CPPFLAGS += $(LEPT_CPPFLAG)
|
||||
ccextractor_LDADD += $(TESS_LIB)
|
||||
ccextractor_LDADD += $(LEPT_LIB)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c fonts/ icon/
|
||||
|
||||
#For GUI
|
||||
if BUILD_WITH_GUI
|
||||
bin_PROGRAMS += ccextractorGUI
|
||||
|
||||
ccextractorGUI_SOURCES = \
|
||||
../src/GUI/ccextractorGUI.c \
|
||||
../src/GUI/ccextractorGUI.h \
|
||||
../src/GUI/activity.c \
|
||||
../src/GUI/activity.h \
|
||||
../src/GUI/terminal.c \
|
||||
../src/GUI/preview.c \
|
||||
../src/GUI/preview.h \
|
||||
../src/GUI/ccx_cli_thread.c \
|
||||
../src/GUI/ccx_cli_thread.h \
|
||||
../src/GUI/command_builder.c \
|
||||
../src/GUI/command_builder.h \
|
||||
../src/GUI/save_load_data.c \
|
||||
../src/GUI/save_load_data.h \
|
||||
../src/GUI/file_browser.c \
|
||||
../src/GUI/file_browser.h \
|
||||
../src/GUI/popups.c \
|
||||
../src/GUI/popups.h \
|
||||
../src/GUI/tabs.c \
|
||||
../src/GUI/tabs.h \
|
||||
../src/GUI/stb_image.h \
|
||||
../src/GUI/nuklear_lib/nuklear.h \
|
||||
../src/GUI/nuklear_lib/nuklear_glfw_gl2.h
|
||||
|
||||
ccextractorGUI_CFLAGS = -std=gnu99
|
||||
|
||||
|
||||
ccextractorGUI_LDADD = ${glfw3_LIBS}
|
||||
|
||||
|
||||
if SYS_IS_LINUX
|
||||
ccextractorGUI_CFLAGS += -s -O3 -DUNIX
|
||||
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
|
||||
ccextractorGUI_LDADD += ${glew_LIBS}
|
||||
ccextractorGUI_LDADD += -lX11 -lXinerama -lXcursor -lXi -lXrandr -lXxf86vm -lm -ldl -lpthread
|
||||
endif
|
||||
|
||||
if SYS_IS_MAC
|
||||
ccextractorGUI_CFLAGS += -O3 -DUNIX
|
||||
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
|
||||
ccextractorGUI_LDADD += ${glew_LIBS}
|
||||
ccextractorGUI_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
|
||||
ccextractorGUI_LDADD += -lm -L/usr/local/lib -lpthread
|
||||
endif
|
||||
|
||||
if HARDSUBX_IS_ENABLED
|
||||
if OCR_IS_ENABLED
|
||||
ccextractorGUI_CFLAGS += -DENABLE_OCR
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_DIST += ../icon/ ../fonts/
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Note: I don't currently have a Mac to test Mac builds. An effort is done to ensure that CCExtractor is portable,
|
||||
which is why it compiles and works in Mac without any effort. But the build script (any of its 2 lines) is not
|
||||
maintained. If it doesn't compile for this version please fix and send me the new file so I can add it to the
|
||||
official version.
|
||||
|
||||
I know this sucks but I can't really do much more.
|
||||
|
||||
Carlos
|
||||
4
mac/autogen.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
./pre-build.sh
|
||||
autoreconf -i
|
||||
@@ -1 +1,62 @@
|
||||
gcc -std=gnu99 -Wno-write-strings -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -I ../src/gpacmp4 -I ../src/lib_ccx -I ../src/libpng -I ../src/zlib -o ccextractor $(find ../src/ -name '*.cpp' \! -name 'win_*') $(find ../src/ -name '*.c' \! -name 'win_*') -liconv
|
||||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_DARWIN -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
|
||||
[[ $1 = "OCR" ]] && BLD_FLAGS="$BLD_FLAGS -DENABLE_OCR"
|
||||
BLD_INCLUDE="-I../src/ -I../src/lib_ccx -I../src/gpacmp4 -I../src/lib_hash -I../src/libpng -I../src/utf8proc -I../src/protobuf-c -I../src/zlib -I../src/zvbi -I../src/freetype/include"
|
||||
[[ $1 = "OCR" ]] && BLD_INCLUDE="$BLD_INCLUDE `pkg-config --cflags --silence-errors tesseract`"
|
||||
SRC_CCX="$(find ../src/lib_ccx -name '*.c')"
|
||||
SRC_GPAC="$(find ../src/gpacmp4 -name '*.c')"
|
||||
SRC_LIB_HASH="$(find ../src/lib_hash -name '*.c')"
|
||||
SRC_LIBPNG="$(find ../src/libpng -name '*.c')"
|
||||
SRC_PROTOBUF="$(find ../src/protobuf-c -name '*.c')"
|
||||
SRC_UTF8="../src/utf8proc/utf8proc.c"
|
||||
SRC_ZLIB="$(find ../src/zlib -name '*.c')"
|
||||
SRC_ZVBI="$(find ../src/zvbi -name '*.c')"
|
||||
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
||||
SRC_FREETYPE="../src/freetype/autofit/autofit.c \
|
||||
../src/freetype/base/ftbase.c \
|
||||
../src/freetype/base/ftbbox.c \
|
||||
../src/freetype/base/ftbdf.c \
|
||||
../src/freetype/base/ftbitmap.c \
|
||||
../src/freetype/base/ftcid.c \
|
||||
../src/freetype/base/ftfntfmt.c \
|
||||
../src/freetype/base/ftfstype.c \
|
||||
../src/freetype/base/ftgasp.c \
|
||||
../src/freetype/base/ftglyph.c \
|
||||
../src/freetype/base/ftgxval.c \
|
||||
../src/freetype/base/ftinit.c \
|
||||
../src/freetype/base/ftlcdfil.c \
|
||||
../src/freetype/base/ftmm.c \
|
||||
../src/freetype/base/ftotval.c \
|
||||
../src/freetype/base/ftpatent.c \
|
||||
../src/freetype/base/ftpfr.c \
|
||||
../src/freetype/base/ftstroke.c \
|
||||
../src/freetype/base/ftsynth.c \
|
||||
../src/freetype/base/ftsystem.c \
|
||||
../src/freetype/base/fttype1.c \
|
||||
../src/freetype/base/ftwinfnt.c \
|
||||
../src/freetype/bdf/bdf.c \
|
||||
../src/freetype/bzip2/ftbzip2.c \
|
||||
../src/freetype/cache/ftcache.c \
|
||||
../src/freetype/cff/cff.c \
|
||||
../src/freetype/cid/type1cid.c \
|
||||
../src/freetype/gzip/ftgzip.c \
|
||||
../src/freetype/lzw/ftlzw.c \
|
||||
../src/freetype/pcf/pcf.c \
|
||||
../src/freetype/pfr/pfr.c \
|
||||
../src/freetype/psaux/psaux.c \
|
||||
../src/freetype/pshinter/pshinter.c \
|
||||
../src/freetype/psnames/psnames.c \
|
||||
../src/freetype/raster/raster.c \
|
||||
../src/freetype/sfnt/sfnt.c \
|
||||
../src/freetype/smooth/smooth.c \
|
||||
../src/freetype/truetype/truetype.c \
|
||||
../src/freetype/type1/type1.c \
|
||||
../src/freetype/type42/type42.c \
|
||||
../src/freetype/winfonts/winfnt.c"
|
||||
BLD_SOURCES="../src/ccextractor.c $SRC_API $SRC_CCX $SRC_GPAC $SRC_LIB_HASH $SRC_LIBPNG $SRC_PROTOBUF $SRC_UTF8 $SRC_ZLIB $SRC_ZVBI $SRC_FREETYPE $API_WRAPPERS"
|
||||
BLD_LINKER="-lm -liconv"
|
||||
[[ $1 = "OCR" ]] && BLD_LINKER="$BLD_LINKER `pkg-config --libs --silence-errors tesseract` `pkg-config --libs --silence-errors lept`"
|
||||
|
||||
./pre-build.sh
|
||||
gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|
||||
|
||||
4
mac/cleanup
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
make distclean > /dev/null 2>&1 || true
|
||||
rm -rf Makefile configure *.in config.status config.log aclocal.m4 build-conf autom4te.cache
|
||||
120
mac/configure.ac
Normal file
@@ -0,0 +1,120 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([CCExtractor], [0.87], [carlos@ccextractor.org])
|
||||
AC_CONFIG_AUX_DIR([build-conf])
|
||||
AC_CONFIG_SRCDIR([../src/ccextractor.c])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
#Checks for "pkg-config" utility
|
||||
AC_MSG_CHECKING([pkg-config m4 macros])
|
||||
if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) == yes; then
|
||||
AC_MSG_RESULT([yes]);
|
||||
else
|
||||
AC_MSG_RESULT([no]);
|
||||
AC_MSG_ERROR([
|
||||
pkg-config is required.])
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([m], [sin], [], [AC_MSG_ERROR(Math library not installed. Install it before proceeding.)])
|
||||
AC_CHECK_LIB([lept], [getLeptonicaVersion], [HAS_LEPT=1 && PKG_CHECK_MODULES([lept], [lept])], [HAS_LEPT=0])
|
||||
AC_CHECK_LIB([tesseract], [TessVersion], [HAS_TESSERACT=1 && PKG_CHECK_MODULES([tesseract], [tesseract])], [HAS_TESSERACT=0])
|
||||
AC_CHECK_LIB([avcodec], [avcodec_version], [HAS_AVCODEC=1 && PKG_CHECK_MODULES([libavcodec], [libavcodec])], [HAS_AVCODEC=0])
|
||||
AC_CHECK_LIB([avformat], [avformat_version], [HAS_AVFORMAT=1 && PKG_CHECK_MODULES([libavformat], [libavformat])], [HAS_AVFORMAT=0])
|
||||
AC_CHECK_LIB([avutil], [avutil_version], [HAS_AVUTIL=1 && PKG_CHECK_MODULES([libavutil], [libavutil])], [HAS_AVUTIL=0])
|
||||
AC_CHECK_LIB([swscale], [swscale_version], [HAS_SWSCALE=1 && PKG_CHECK_MODULES([libswscale], [libswscale])], [HAS_SWSCALE=0])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h termios.h unistd.h wchar.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_CHECK_HEADER_STDBOOL
|
||||
AC_C_INLINE
|
||||
AC_TYPE_INT16_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_INT8_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_CHECK_TYPES([ptrdiff_t])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_FSEEKO
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MKTIME
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_STRERROR_R
|
||||
AC_CHECK_FUNCS([floor ftruncate gethostbyname gettimeofday inet_ntoa mblen memchr memmove memset mkdir modf pow realpath rmdir select setlocale socket sqrt strcasecmp strchr strdup strerror strndup strrchr strstr strtol])
|
||||
|
||||
# Checks for arguments with configure
|
||||
AC_ARG_ENABLE([hardsubx],
|
||||
AC_HELP_STRING([--enable-hardsubx], [Enables extraction of burnt subtitles (hard subtitles)]),
|
||||
[case "${enableval}" in
|
||||
yes) hardsubx=true ;;
|
||||
no) hardsubx=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-hardsubx]) ;;
|
||||
esac],[hardsubx=false])
|
||||
|
||||
AC_ARG_ENABLE([ocr],
|
||||
AC_HELP_STRING([--enable-ocr], [Enables Optical Character Recognition]),
|
||||
[case "${enableval}" in
|
||||
yes) ocr=true ;;
|
||||
no) ocr=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ocr]) ;;
|
||||
esac],[ocr=false])
|
||||
|
||||
AC_ARG_ENABLE([ffmpeg],
|
||||
AC_HELP_STRING([--enable-ffmpeg], [Enable FFmpeg integration]),
|
||||
[case "${enableval}" in
|
||||
yes) ffmpeg=true ;;
|
||||
no) ffmpeg=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ffmpeg]) ;;
|
||||
esac],[ffmpeg=false])
|
||||
|
||||
AC_ARG_WITH([gui],
|
||||
AC_HELP_STRING([--with-gui], [Builds CCExtractor with GUI (requires GLFW and GLEW)]),
|
||||
[PKG_CHECK_MODULES([glfw3], [glfw3]) && PKG_CHECK_MODULES([glew], [glew])],
|
||||
[with_gui=no])
|
||||
|
||||
|
||||
#Checks and prompts if libraries found/not found to avoild failure while building
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVCODEC -gt 0 ], [AC_MSG_NOTICE(avcodec library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVCODEC -gt 0 ], [AC_MSG_ERROR(avcodec library not found. Please install the avcodec library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVFORMAT -gt 0 ], [AC_MSG_NOTICE(avformat library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVFORMAT -gt 0 ], [AC_MSG_ERROR(avformat library not found. Please install the avformat library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_AVUTIL -gt 0 ], [AC_MSG_NOTICE(avutil library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVUTIL -gt 0 ], [AC_MSG_ERROR(avutil library not found. Please install the avutil library before proceeding)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test $HAS_SWSCALE -gt 0 ], [AC_MSG_NOTICE(swscale library found)])
|
||||
AS_IF([ test x$hardsubx = xtrue && test ! $HAS_SWSCALE -gt 0 ], [AC_MSG_ERROR(swscale library not found. Please install the swscale library before proceeding)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=`tesseract --version 2>&1 | grep tesseract` && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_TESSERACT -gt 0 ], [AC_MSG_ERROR(tesserect library not found. Please install the tesseract library before proceeding)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=`tesseract --version 2>&1 | grep leptonica` && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)])
|
||||
AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_LEPT -gt 0 ], [AC_MSG_ERROR(leptonica library not found. Please install the leptonica library before proceeding)])
|
||||
|
||||
#AM_CONDITIONAL(s) for setting values to enable/disable flags in Makefile.am
|
||||
AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ])
|
||||
AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ])
|
||||
AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ])
|
||||
AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract`])
|
||||
AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ])
|
||||
AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
|
||||
AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
|
||||
AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
34
mac/pre-build.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
echo "Obtaining Git commit"
|
||||
commit=(`git rev-parse HEAD 2>/dev/null`)
|
||||
if [ -z "$commit" ]; then
|
||||
echo "Git command not present, trying folder approach"
|
||||
if [ -d "../.git" ]; then
|
||||
echo "Git folder found, using HEAD file"
|
||||
head="`cat ../.git/HEAD`"
|
||||
ref_pos=(`expr match "$head" 'ref: '`)
|
||||
if [ $ref_pos -eq 5 ]; then
|
||||
echo "HEAD file contains a ref, following"
|
||||
commit=(`cat "../.git/${head:5}"`)
|
||||
echo "Extracted commit: $commit"
|
||||
else
|
||||
echo "HEAD contains a commit, using it"
|
||||
commit="$head"
|
||||
echo "Extracted commit: $commit"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -z "$commit" ]; then
|
||||
commit="Unknown"
|
||||
fi
|
||||
builddate=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
|
||||
echo "Storing variables in file"
|
||||
echo "Commit: $commit"
|
||||
echo "Date: $builddate"
|
||||
echo "#ifndef CCX_CCEXTRACTOR_COMPILE_REAL_H" > ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define CCX_CCEXTRACTOR_COMPILE_REAL_H" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define GIT_COMMIT \"$commit\"" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#define COMPILE_DATE \"$builddate\"" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "#endif" >> ../src/lib_ccx/compile_info_real.h
|
||||
echo "Stored all in compile_info_real.h"
|
||||
echo "Done."
|
||||
22
package_creators/PKGBUILD
Normal file
@@ -0,0 +1,22 @@
|
||||
pkgname=ccextractor
|
||||
pkgver=0.85
|
||||
pkgrel=1
|
||||
pkgdesc="A closed captions and teletext subtitles extractor for video streams."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.ccextractor.org"
|
||||
license=('GPL')
|
||||
depends=('gcc-libs' 'tesseract')
|
||||
source=(
|
||||
$pkgname-$pkgver.tar.gz
|
||||
)
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
CC=gcc ./configure --enable-ocr --prefix="$pkgdir/usr/local"
|
||||
make -j4
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
make install
|
||||
}
|
||||
30
package_creators/arch.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
./tarball.sh
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Sorry, the package could not be created as the tarball building process failed with return code $retval"
|
||||
rm -f ./*.tar.gz
|
||||
exit $retval
|
||||
fi
|
||||
makepkg -g >> PKGBUILD
|
||||
makepkg -sc
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Sorry, the package could not be created as makepkg failed with return code $retval"
|
||||
rm -rf ./*.tar.gz src
|
||||
sed -i '$ d' PKGBUILD
|
||||
exit $retval
|
||||
fi
|
||||
rm -f ./*.tar.gz
|
||||
sed -i '$ d' PKGBUILD
|
||||
read -p "Do you wish to install ccextractor? [y/N] " yn
|
||||
case $yn in
|
||||
[Yy]* ) if [ -x "$(command -v sudo)" ]; then
|
||||
sudo pacman -U ./*.pkg.tar.xz;
|
||||
else
|
||||
su -c "pacman -U ./*.pkg.tar.xz";
|
||||
fi
|
||||
rm -f ./*.pkg.tar.xz;;
|
||||
* ) exit;;
|
||||
esac
|
||||
39
package_creators/ccextractor.spec
Normal file
@@ -0,0 +1,39 @@
|
||||
Name: ccextractor
|
||||
Version: 0.85
|
||||
Release: 1
|
||||
Summary: A closed captions and teletext subtitles extractor for video streams.
|
||||
Group: Applications/Internet
|
||||
License: GPL
|
||||
URL: http://ccextractor.org/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
%description
|
||||
CCExtractor is a software that extracts closed captions from videos of various formats, even live video streams. Available as a multi-platform desktop application.
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
./configure --enable-ocr --prefix="$pkgdir/usr"
|
||||
make
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
install ccextractor $RPM_BUILD_ROOT/usr/bin/ccextractor
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/ccextractor
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Thu Oct 5 2017 Jason Hancock <jason@jasonhancock.com>
|
||||
- Install to /usr/bin instead of /usr/local/bin
|
||||
|
||||
* Fri Apr 14 2017 Carlos Fernandez <carlos@ccextractor.org>
|
||||
- Initial build
|
||||
44
package_creators/debian.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
TYPE="debian" # can be one of 'slackware', 'debian', 'rpm'
|
||||
PROGRAM_NAME="ccextractor"
|
||||
VERSION="0.85"
|
||||
RELEASE="1"
|
||||
LICENSE="GPL-2.0"
|
||||
MAINTAINER="carlos@ccextractor.org"
|
||||
REQUIRES="gcc,libcurl4-gnutls-dev,tesseract-ocr,tesseract-ocr-dev,libleptonica-dev"
|
||||
|
||||
../linux/pre-build.sh
|
||||
|
||||
out=$((LC_ALL=C dpkg -s checkinstall) 2>&1)
|
||||
|
||||
if [[ $out == *"is not installed"* ]]
|
||||
then
|
||||
read -r -p "You have not installed the package 'checkinstall'. Would you like to install it? [Y/N] " response
|
||||
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
|
||||
then
|
||||
apt-get install -y checkinstall
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
(cd ../linux; ./autogen.sh; ./configure; make; sudo checkinstall \
|
||||
-y \
|
||||
--pkgrelease=$RELEASE \
|
||||
--pkggroup="CCExtractor" \
|
||||
--backup=no \
|
||||
--install=no \
|
||||
--type $TYPE \
|
||||
--pkgname=$PROGRAM_NAME \
|
||||
--pkgversion=$VERSION \
|
||||
--pkglicense=$LICENSE \
|
||||
--pakdir="../package_creators/build" \
|
||||
--maintainer=$MAINTAINER \
|
||||
--nodoc \
|
||||
--requires=$REQUIRES;)
|
||||
|
||||
cd ../linux
|
||||
make distclean
|
||||
./cleanup
|
||||
cd ../package_creators
|
||||
31
package_creators/rpm.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(rpmbuild 2>&1) == *"not found"* ]]
|
||||
then
|
||||
echo "ERROR: 'rpmbuild' package not found. Please install it and try again."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
workdir=`pwd`
|
||||
echo "%_topdir $workdir/RPMBUILD" >> $HOME/.rpmmacros
|
||||
./tarball.sh
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Sorry, the package could not be created as the tarball building process failed with return code $retval"
|
||||
rm -f ./*.tar.gz
|
||||
exit $retval
|
||||
fi
|
||||
mkdir -p RPMBUILD/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
||||
mv *.tar.gz RPMBUILD/SOURCES/
|
||||
cp ccextractor.spec RPMBUILD/SPECS
|
||||
cd RPMBUILD/SPECS
|
||||
rpmbuild -ba ccextractor.spec
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Sorry, the package could not be created as rpmbuild failed with return code $retval"
|
||||
exit $retval
|
||||
fi
|
||||
cd ../..
|
||||
cp RPMBUILD/RPMS/x86_64/*.rpm .
|
||||
cp RPMBUILD/SRPMS/*.rpm .
|
||||
rm -rf RPMBUILD
|
||||
30
package_creators/tarball.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
cd ..
|
||||
cp linux/autogen.sh .
|
||||
cp linux/pre-build.sh .
|
||||
cp linux/configure.ac .
|
||||
cp linux/Makefile.am .
|
||||
sed -i -e 's:../src:src:g' Makefile.am
|
||||
sed -i -e 's:../src:src:g' configure.ac
|
||||
sed -i -e 's:../.git:.git:g' pre-build.sh
|
||||
sed -i -e 's:../src:src:g' pre-build.sh
|
||||
./autogen.sh
|
||||
./configure
|
||||
make dist
|
||||
mv *.gz package_creators
|
||||
rm -rf Makefile
|
||||
rm -rf Makefile.am
|
||||
rm -rf configure.ac
|
||||
rm -rf autogen.sh
|
||||
rm -rf pre-build.sh
|
||||
rm -rf configure
|
||||
rm -rf Makefile.in
|
||||
rm -rf config.status
|
||||
rm -rf config.log
|
||||
rm -rf aclocal.m4
|
||||
rm -rf build-conf
|
||||
rm -rf autom4te.cache
|
||||
cd package_creators
|
||||
@@ -1,6 +1,12 @@
|
||||
/**
|
||||
/*
|
||||
* the configured options and settings for CCExtractor
|
||||
*/
|
||||
|
||||
#define CCExtractor_VERSION_MAJOR @CCEXTRACTOR_VERSION_MAJOR@
|
||||
#define CCExtractor_VERSION_MINOR @CCEXTRACTOR_VERSION_MINOR@
|
||||
#ifndef CCX_CCEXTRACTOR_COMPILE_REAL_H
|
||||
#define CCX_CCEXTRACTOR_COMPILE_REAL_H
|
||||
#define GIT_COMMIT "@GIT_COMMIT_HASH@"
|
||||
#define COMPILE_DATE "@COMPILATION_DATE@"
|
||||
#endif
|
||||
|
||||
#define CCExtractor_VERSION_MAJOR "@CCEXTRACTOR_VERSION_MAJOR@"
|
||||
#define CCExtractor_VERSION_MINOR "@CCEXTRACTOR_VERSION_MINOR@"
|
||||
|
||||
@@ -2,53 +2,230 @@ cmake_minimum_required (VERSION 3.0.2)
|
||||
|
||||
project (CCExtractor)
|
||||
|
||||
option(WITH_FFMPEG "Build using FFmpeg demuxer and decoder" OFF)
|
||||
#Version number
|
||||
option (WITH_FFMPEG "Build using FFmpeg demuxer and decoder" OFF)
|
||||
option (WITH_OCR "Build with OCR (Optical Character Recognition) feature" OFF)
|
||||
option (WITH_SHARING "Build with sharing and translation support" OFF)
|
||||
option (WITH_HARDSUBX "Build with support for burned-in subtitles" OFF)
|
||||
|
||||
# Version number
|
||||
set (CCEXTRACTOR_VERSION_MAJOR 0)
|
||||
set (CCEXTRACTOR_VERSION_MINOR 75)
|
||||
set (CCEXTRACTOR_VERSION_MINOR 85b)
|
||||
|
||||
# Get project directory
|
||||
get_filename_component(BASE_PROJ_DIR ../ ABSOLUTE)
|
||||
|
||||
# Get the latest commit hash of the working branch
|
||||
IF(EXISTS "${BASE_PROJ_DIR}/.git")
|
||||
execute_process(
|
||||
COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
ELSE(EXISTS "${BASE_PROJ_DIR}/.git")
|
||||
set(GIT_BRANCH "Unknown")
|
||||
set(GIT_COMMIT_HASH "Unknown")
|
||||
ENDIF(EXISTS "${BASE_PROJ_DIR}/.git")
|
||||
|
||||
#Get the date
|
||||
string(TIMESTAMP COMPILATION_DATE %Y-%m-%d)
|
||||
|
||||
message(STATUS "Commit : ${GIT_COMMIT_HASH}")
|
||||
message(STATUS "Compilation Date: ${COMPILATION_DATE}")
|
||||
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/CCExtractorConfig.h.in"
|
||||
"${PROJECT_BINARY_DIR}/CCExtractorConfig.h"
|
||||
"${PROJECT_SOURCE_DIR}/lib_ccx/compile_info_real.h"
|
||||
)
|
||||
|
||||
add_definitions(-DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP)
|
||||
|
||||
include_directories ("${PROJECT_SOURCE_DIR}")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/utf8proc/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/gpacmp4/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/libccx_common/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/protobuf-c/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/zvbi/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib_hash/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/wrappers/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/libpng/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/zlib/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/freetype/include/")
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/protobuf-c/" SOURCEFILE)
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/zvbi/" SOURCEFILE)
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/lib_hash/" SOURCEFILE)
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/wrappers/" SOURCEFILE)
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/libpng/" SOURCEFILE)
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/zlib/" SOURCEFILE)
|
||||
|
||||
#Adding some platform specific library path
|
||||
LINK_DIRECTORIES(/opt/local/lib)
|
||||
LINK_DIRECTORIES(/usr/local/lib)
|
||||
set(UTF8PROC_SOURCE
|
||||
${PROJECT_SOURCE_DIR}/utf8proc/utf8proc.c
|
||||
)
|
||||
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Wall -g -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64")
|
||||
set(FREETYPE_SOURCE
|
||||
${PROJECT_SOURCE_DIR}/freetype/autofit/autofit.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftbase.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftbbox.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftbdf.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftbitmap.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftcid.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftfntfmt.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftfstype.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftgasp.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftglyph.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftgxval.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftinit.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftlcdfil.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftmm.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftotval.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftpatent.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftpfr.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftstroke.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftsynth.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftsystem.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/fttype1.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/base/ftwinfnt.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/bdf/bdf.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/bzip2/ftbzip2.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/cache/ftcache.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/cff/cff.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/cid/type1cid.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/gzip/ftgzip.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/lzw/ftlzw.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/pcf/pcf.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/pfr/pfr.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/psaux/psaux.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/pshinter/pshinter.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/psnames/psnames.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/raster/raster.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/sfnt/sfnt.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/smooth/smooth.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/truetype/truetype.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/type1/type1.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/type42/type42.c
|
||||
${PROJECT_SOURCE_DIR}/freetype/winfonts/winfnt.c
|
||||
)
|
||||
#Windows specific libraries and linker flags
|
||||
if(WIN32)
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/win_spec_incld/")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/win_iconv/")
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/win_iconv/" SOURCEFILE)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ws2_32 winmm)
|
||||
else (WIN32)
|
||||
# Adding some platform specific library path
|
||||
link_directories (/opt/local/lib)
|
||||
link_directories (/usr/local/lib)
|
||||
endif(WIN32)
|
||||
|
||||
if(MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W3 /wd4005 /wd4996")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-write-strings -g -std=gnu99")
|
||||
endif(MSVC)
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
|
||||
add_subdirectory (lib_ccx)
|
||||
|
||||
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR} SOURCEFILE)
|
||||
aux_source_directory (${PROJECT_SOURCE_DIR} SOURCEFILE)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ccx)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} png)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} m)
|
||||
# set (EXTRA_LIBS ${EXTRA_LIBS} m)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} iconv)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} -lz -lm -lpthread)
|
||||
|
||||
find_package (PkgConfig)
|
||||
|
||||
########################################################
|
||||
# Build using FFmpeg libraries
|
||||
#
|
||||
if (WITH_FFMPEG)
|
||||
########################################################
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(AVFORMAT REQUIRED libavformat)
|
||||
pkg_check_modules(AVUTIL REQUIRED libavutil)
|
||||
pkg_check_modules(AVCODEC REQUIRED libavcodec)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFORMAT_STATIC_LIBRARIES} )
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVUTIL_STATIC_LIBRARIES} )
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVCODEC_STATIC_LIBRARIES} )
|
||||
if (PKG_CONFIG_FOUND AND WITH_FFMPEG)
|
||||
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG")
|
||||
endif (WITH_FFMPEG)
|
||||
pkg_check_modules (AVFORMAT REQUIRED libavformat)
|
||||
pkg_check_modules (AVUTIL REQUIRED libavutil)
|
||||
pkg_check_modules (AVCODEC REQUIRED libavcodec)
|
||||
pkg_check_modules (AVFILTER REQUIRED libavfilter)
|
||||
pkg_check_modules (SWSCALE REQUIRED libswscale)
|
||||
|
||||
add_executable(ccextractor ${SOURCEFILE})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFORMAT_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVUTIL_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVCODEC_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFILTER_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWSCALE_LIBRARIES})
|
||||
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFORMAT_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVUTIL_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVCODEC_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFILTER_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS})
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
|
||||
endif (PKG_CONFIG_FOUND AND WITH_FFMPEG)
|
||||
|
||||
########################################################
|
||||
# Build with OCR using leptonica and tesseract libraries
|
||||
########################################################
|
||||
|
||||
if (PKG_CONFIG_FOUND AND WITH_OCR)
|
||||
|
||||
pkg_check_modules (TESSERACT REQUIRED tesseract)
|
||||
pkg_check_modules (LEPTONICA REQUIRED lept)
|
||||
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${TESSERACT_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${LEPTONICA_LIBRARIES})
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_OCR")
|
||||
endif (PKG_CONFIG_FOUND AND WITH_OCR)
|
||||
|
||||
########################################################
|
||||
# Build with CC sharing and translation support
|
||||
########################################################
|
||||
|
||||
if (PKG_CONFIG_FOUND AND WITH_SHARING)
|
||||
|
||||
pkg_check_modules (NANOMSG REQUIRED libnanomsg)
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${NANOMSG_STATIC_LIBRARIES})
|
||||
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/protobuf-c/")
|
||||
aux_source_directory ("${PROJECT_SOURCE_DIR}/protobuf-c/" SOURCEFILE)
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_SHARING")
|
||||
endif (PKG_CONFIG_FOUND AND WITH_SHARING)
|
||||
|
||||
########################################################
|
||||
# Build for hardsubx using avformat, avutil, avcodec and
|
||||
# swscale
|
||||
########################################################
|
||||
|
||||
if (PKG_CONFIG_FOUND AND WITH_HARDSUBX)
|
||||
|
||||
pkg_check_modules (AVFORMAT REQUIRED libavformat)
|
||||
pkg_check_modules (AVUTIL REQUIRED libavutil)
|
||||
pkg_check_modules (AVCODEC REQUIRED libavcodec)
|
||||
pkg_check_modules (SWSCALE REQUIRED libswscale)
|
||||
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFORMAT_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVUTIL_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVCODEC_LIBRARIES})
|
||||
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWSCALE_LIBRARIES})
|
||||
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFORMAT_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVUTIL_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVCODEC_INCLUDE_DIRS})
|
||||
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS})
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
|
||||
endif (PKG_CONFIG_FOUND AND WITH_HARDSUBX)
|
||||
|
||||
add_executable (ccextractor ${SOURCEFILE} ${FREETYPE_SOURCE} ${UTF8PROC_SOURCE})
|
||||
target_link_libraries (ccextractor ${EXTRA_LIBS})
|
||||
target_include_directories (ccextractor PUBLIC ${EXTRA_INCLUDES})
|
||||
|
||||
install (TARGETS ccextractor DESTINATION bin)
|
||||
|
||||
18
src/GUI/activity.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef NK_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#endif // !NK_IMPLEMENTATION
|
||||
|
||||
#include "activity.h"
|
||||
|
||||
int activity(struct nk_context *ctx, int x, int y, int width, int height, struct main_tab *main_settings)
|
||||
{
|
||||
static int i;
|
||||
if (nk_begin(ctx, "Activity", nk_rect(x, y, width, height), NK_WINDOW_TITLE|NK_WINDOW_BACKGROUND))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 40, 1);
|
||||
for(i = 0; i < main_settings->activity_string_count; i++)
|
||||
nk_label_wrap(ctx, main_settings->activity_string[i]);
|
||||
}
|
||||
nk_end(ctx);
|
||||
return !nk_window_is_closed(ctx, "Activity");
|
||||
}
|
||||
8
src/GUI/activity.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef ACTIVITY_H
|
||||
#define ACTIVITY_H
|
||||
|
||||
#include "ccextractorGUI.h"
|
||||
|
||||
int activity(struct nk_context *ctx, int x, int y, int width, int height, struct main_tab *main_settings);
|
||||
|
||||
#endif
|
||||
929
src/GUI/ccextractorGUI.c
Normal file
@@ -0,0 +1,929 @@
|
||||
/* nuklear - v1.32.0 - public domain */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
|
||||
|
||||
#define PATH_LENGTH 66
|
||||
#define NAME_LENGTH 56
|
||||
#define PREFIX_LENGTH_TRUNCATED 10
|
||||
|
||||
#define NK_INCLUDE_FIXED_TYPES
|
||||
#define NK_INCLUDE_STANDARD_IO
|
||||
#define NK_INCLUDE_STANDARD_VARARGS
|
||||
#define NK_INCLUDE_DEFAULT_ALLOCATOR
|
||||
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
|
||||
#define NK_INCLUDE_FONT_BAKING
|
||||
#define NK_INCLUDE_DEFAULT_FONT
|
||||
#define NK_IMPLEMENTATION
|
||||
#define NK_GLFW_GL2_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#include "nuklear_lib/nuklear_glfw_gl2.h"
|
||||
|
||||
|
||||
//#define WINDOW_WIDTH 1200
|
||||
//#define WINDOW_HEIGHT 800
|
||||
//#define true 1
|
||||
//#define false 0
|
||||
//#define UNUSED(a) (void)a
|
||||
//#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
//#define MAX(a,b) ((a) < (b) ? (b) : (a))
|
||||
//#define LEN(a) (sizeof(a)/sizeof(a)[0])
|
||||
#include "ccextractorGUI.h"
|
||||
#include "tabs.h"
|
||||
#include "activity.h"
|
||||
#include "terminal.c"
|
||||
#include "preview.h"
|
||||
#include "popups.h"
|
||||
#include "command_builder.h"
|
||||
#include "ccx_cli_thread.h"
|
||||
#include "file_browser.h"
|
||||
#include "save_load_data.h"
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
|
||||
|
||||
static struct main_tab main_settings;
|
||||
|
||||
/*Trigger command for CLI*/
|
||||
char command[20];
|
||||
|
||||
/*Global Variables for Drag and Drop files*/
|
||||
|
||||
|
||||
/* Width and Height of all frames*/
|
||||
const GLint WIDTH_mainPanelAndWindow = 530, HEIGHT_mainPanelandWindow = 550;
|
||||
const GLint WIDTH_termORPreviewPanel = 530, HEIGHT_termORPreviewPanel = 100;
|
||||
const GLint WIDTH_termANDPreviewPanel = 400, HEIGHT_termANDPreviewPanel = 650;
|
||||
const GLint WIDTH_activityPanel = 400, HEIGHT_activityPanelSolo = 550, HEIGHT_activityPanelDuo = 650;
|
||||
const GLint WIDTH_mainTermORPreviewWindow = 530, HEIGHT_mainORPreviewTermWindow = 650;
|
||||
const GLint WIDTH_mainTermANDPreviewWindow = 930, HEIGHT_mainTermAndPreviewWindow = 650;
|
||||
const GLint WIDTH_mainActivityWindow = 930, HEIGHT_mainActivityWindowSolo = 550, HEIGHT_mainActivityWindowDuo = 650;
|
||||
|
||||
/*Tab constants*/
|
||||
static int tab_screen_height;
|
||||
|
||||
/*Parameter Constants*/
|
||||
static int modifiedParams = 0;
|
||||
|
||||
|
||||
static void error_callback(int e, const char *d)
|
||||
{
|
||||
printf("Error %d: %s\n", e, d);
|
||||
}
|
||||
|
||||
void drop_callback(GLFWwindow* window, int count, const char **paths)
|
||||
{
|
||||
int i,j,k,z,copycount, prefix_length, slash_length, fileNameTruncated_index;
|
||||
|
||||
printf("Number of selected paths:%d\n", count);
|
||||
|
||||
if(main_settings.filename_count == 0 && main_settings.filenames == NULL)
|
||||
main_settings.filenames = (char**)calloc(count + 1, sizeof(char*));
|
||||
else
|
||||
main_settings.filenames = (char**)realloc(main_settings.filenames, (main_settings.filename_count + count + 1) * sizeof(char*));
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
printf("\n%d", main_settings.filename_count);
|
||||
|
||||
main_settings.filenames[main_settings.filename_count] = (char*)calloc((strlen(paths[i])+5), sizeof(char));
|
||||
main_settings.filenames[main_settings.filename_count][0] = '\"';
|
||||
strcat(main_settings.filenames[main_settings.filename_count], paths[i]);
|
||||
strcat(main_settings.filenames[main_settings.filename_count], "\"");
|
||||
puts(main_settings.filenames[main_settings.filename_count]);
|
||||
main_settings.filename_count++;
|
||||
}
|
||||
main_settings.filenames[main_settings.filename_count] = NULL;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*Rectangle to hold file names*/
|
||||
//void draw_file_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
|
||||
//{
|
||||
// struct nk_command_buffer *canvas;
|
||||
// struct nk_input *input = &ctx->input;
|
||||
// canvas = nk_window_get_canvas(ctx);
|
||||
//
|
||||
// struct nk_rect space;
|
||||
// enum nk_widget_layout_states state;
|
||||
// state = nk_widget(&space, ctx);
|
||||
// if (!state) return;
|
||||
//
|
||||
// /*if (state != NK_WIDGET_ROM)
|
||||
// update_your_widget_by_user_input(...);*/
|
||||
// nk_fill_rect(canvas, space, 5, nk_rgb(88, 81, 96));
|
||||
// if (!strcmp(filePath[0], "\0")) {
|
||||
// space.y = space.y + (space.h / 2) -10;
|
||||
// space.x = space.x + 90;
|
||||
// nk_draw_text(canvas, space, "Drag and Drop files here for Extraction.", 40, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
// }
|
||||
// else {
|
||||
// for (int i = 0; i < fileCount; i++)
|
||||
// {
|
||||
// nk_draw_text(canvas, space, filePath[i], strlen(filePath[i]), &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
// space.y = space.y + 20;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
/*Rectangle to hold extraction info*/
|
||||
//void draw_info_rectangle_widget(struct nk_context *ctx, struct nk_font *font)
|
||||
//{
|
||||
// struct nk_command_buffer *canvas;
|
||||
// struct nk_input *input = &ctx->input;
|
||||
// canvas = nk_window_get_canvas(ctx);
|
||||
//
|
||||
// struct nk_rect space;
|
||||
// enum nk_widget_layout_states state;
|
||||
// state = nk_widget(&space, ctx);
|
||||
// if (!state) return;
|
||||
//
|
||||
// /*if (state != NK_WIDGET_ROM)
|
||||
// update_your_widget_by_user_input(...);*/
|
||||
// nk_fill_rect(canvas, space, 5, nk_rgb(88, 81, 96));
|
||||
// space.x = space.x + 3;
|
||||
// nk_draw_text(canvas, space, "Input Type: Auto", 16, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
// space.y = space.y + 20;
|
||||
// nk_draw_text(canvas, space, "Output Type: Default(.srt)", 26, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
// space.y = space.y + 20;
|
||||
// nk_draw_text(canvas, space, "Output Path: Default", 20, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
// space.y = space.y + 20;
|
||||
// nk_draw_text(canvas, space, "Hardsubs Extraction: Yes", 24, &font->handle, nk_rgb(88, 81, 96), nk_rgb(0, 0, 0));
|
||||
//}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
//Platform
|
||||
static GLFWwindow *win;
|
||||
struct nk_context *ctx;
|
||||
int screenWidth, screenHeight;
|
||||
//int winWidth, winHeight;
|
||||
|
||||
//GLFW
|
||||
glfwSetErrorCallback(error_callback);
|
||||
if (!glfwInit())
|
||||
{
|
||||
fprintf(stdout, "GLFW failed to initialise.\n");
|
||||
}
|
||||
win = glfwCreateWindow(WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow, "CCExtractor", NULL, NULL);
|
||||
if (win == NULL)
|
||||
printf("Window Could not be created!\n");
|
||||
glfwMakeContextCurrent(win);
|
||||
glfwSetWindowSizeLimits(win, WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow, WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow);
|
||||
glfwSetWindowUserPointer(win, &ctx);
|
||||
glfwSetDropCallback(win, drop_callback);
|
||||
|
||||
if (glewInit() != GLEW_OK) {
|
||||
fprintf(stderr, "Failed to setup GLEW\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//GUI
|
||||
|
||||
struct file_browser browser;
|
||||
static const struct file_browser reset_browser;
|
||||
struct media media;
|
||||
|
||||
ctx = nk_glfw3_init(win, NK_GLFW3_INSTALL_CALLBACKS);
|
||||
struct nk_font_atlas *font_atlas;
|
||||
nk_glfw3_font_stash_begin(&font_atlas);
|
||||
#ifdef _WIN32
|
||||
struct nk_font *droid = nk_font_atlas_add_from_file(font_atlas, "../../fonts/Roboto-Regular.ttf", 16, 0);
|
||||
struct nk_font *droid_big = nk_font_atlas_add_from_file(font_atlas, "../../fonts/Roboto-Regular.ttf", 25, 0);
|
||||
struct nk_font *droid_head = nk_font_atlas_add_from_file(font_atlas, "../../fonts/Roboto-Regular.ttf", 20, 0);
|
||||
#else
|
||||
struct nk_font *droid = nk_font_atlas_add_from_file(font_atlas, "../fonts/Roboto-Regular.ttf", 16, 0);
|
||||
struct nk_font *droid_big = nk_font_atlas_add_from_file(font_atlas, "../fonts/Roboto-Regular.ttf", 25, 0);
|
||||
struct nk_font *droid_head = nk_font_atlas_add_from_file(font_atlas, "../fonts/Roboto-Regular.ttf", 20, 0);
|
||||
#endif
|
||||
nk_glfw3_font_stash_end();
|
||||
nk_style_set_font(ctx, &droid->handle);
|
||||
|
||||
|
||||
|
||||
//CHECKBOX VALUES
|
||||
static int show_terminal_check = nk_false;
|
||||
static int show_preview_check = nk_false;
|
||||
static int show_activity_check = nk_false;
|
||||
static int advanced_mode_check = nk_false;
|
||||
static int file_extension_check = nk_true;
|
||||
|
||||
/*Settigs and tab options*/
|
||||
setup_main_settings(&main_settings);
|
||||
static struct network_popup network_settings;
|
||||
setup_network_settings(&network_settings);
|
||||
static struct output_tab output;
|
||||
setup_output_tab(&output);
|
||||
static struct decoders_tab decoders;
|
||||
setup_decoders_tab(&decoders);
|
||||
static struct credits_tab credits;
|
||||
setup_credits_tab(&credits);
|
||||
static struct input_tab input;
|
||||
setup_input_tab(&input);
|
||||
static struct advanced_input_tab advanced_input;
|
||||
setup_advanced_input_tab(&advanced_input);
|
||||
static struct debug_tab debug;
|
||||
setup_debug_tab(&debug);
|
||||
static struct hd_homerun_tab hd_homerun;
|
||||
setup_hd_homerun_tab(&hd_homerun);
|
||||
static struct burned_subs_tab burned_subs;
|
||||
setup_burned_subs_tab(&burned_subs);
|
||||
static struct built_string command;
|
||||
|
||||
/* icons */
|
||||
|
||||
#ifdef _WIN32
|
||||
media.icons.home = icon_load("../../icon/home.png");
|
||||
media.icons.directory = icon_load("../../icon/directory.png");
|
||||
media.icons.computer = icon_load("../../icon/computer.png");
|
||||
media.icons.drives = icon_load("../../icon/drive.png");
|
||||
media.icons.desktop = icon_load("../../icon/desktop.png");
|
||||
media.icons.default_file = icon_load("../../icon/default.png");
|
||||
media.icons.text_file = icon_load("../../icon/text.png");
|
||||
media.icons.music_file = icon_load("../../icon/music.png");
|
||||
media.icons.font_file = icon_load("../../icon/font.png");
|
||||
media.icons.img_file = icon_load("../../icon/img.png");
|
||||
media.icons.movie_file = icon_load("../../icon/movie.png");
|
||||
#else
|
||||
media.icons.home = icon_load("../icon/home.png");
|
||||
media.icons.directory = icon_load("../icon/directory.png");
|
||||
media.icons.computer = icon_load("../icon/computer.png");
|
||||
media.icons.desktop = icon_load("../icon/desktop.png");
|
||||
media.icons.default_file = icon_load("../icon/default.png");
|
||||
media.icons.text_file = icon_load("../icon/text.png");
|
||||
media.icons.music_file = icon_load("../icon/music.png");
|
||||
media.icons.font_file = icon_load("../icon/font.png");
|
||||
media.icons.img_file = icon_load("../icon/img.png");
|
||||
media.icons.movie_file = icon_load("../icon/movie.png");
|
||||
#endif
|
||||
|
||||
media_init(&media);
|
||||
|
||||
file_browser_init(&browser, &media);
|
||||
|
||||
/*Read Last run state*/
|
||||
FILE *loadFile;
|
||||
loadFile = fopen("ccxGUI.ini", "r");
|
||||
if(loadFile != NULL)
|
||||
{
|
||||
printf("File found and reading it!\n");
|
||||
load_data(loadFile, &main_settings, &input, &advanced_input, &output, &decoders, &credits, &debug, &hd_homerun, &burned_subs, &network_settings);
|
||||
fclose(loadFile);
|
||||
}
|
||||
|
||||
/*Main GUI loop*/
|
||||
while (nk_true)
|
||||
{
|
||||
if(glfwWindowShouldClose(win))
|
||||
{
|
||||
FILE *saveFile;
|
||||
saveFile = fopen("ccxGUI.ini", "w");
|
||||
save_data(saveFile, &main_settings, &input, &advanced_input, &output, &decoders, &credits, &debug, &hd_homerun, &burned_subs, &network_settings);
|
||||
fclose(saveFile);
|
||||
break;
|
||||
}
|
||||
//Input
|
||||
glfwPollEvents();
|
||||
nk_glfw3_new_frame();
|
||||
|
||||
|
||||
//Popups
|
||||
static int show_progress_details = nk_false;
|
||||
static int show_about_ccx = nk_false;
|
||||
static int show_getting_started = nk_false;
|
||||
|
||||
|
||||
|
||||
//GUI
|
||||
if (nk_begin(ctx, "CCExtractor", nk_rect(0, 0, WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow),
|
||||
NK_WINDOW_NO_SCROLLBAR | NK_WINDOW_BACKGROUND))
|
||||
{
|
||||
|
||||
|
||||
//MENUBAR
|
||||
nk_menubar_begin(ctx);
|
||||
nk_layout_row_begin(ctx, NK_STATIC, 30, 3);
|
||||
nk_layout_row_push(ctx, 80);
|
||||
if (nk_menu_begin_label(ctx, "Preferences", NK_TEXT_LEFT, nk_vec2(120, 200))) {
|
||||
nk_layout_row_dynamic(ctx, 30, 1);
|
||||
if(nk_menu_item_label(ctx, "Reset Defaults", NK_TEXT_LEFT))
|
||||
{
|
||||
remove("ccxGUI.ini");
|
||||
setup_main_settings(&main_settings);
|
||||
setup_network_settings(&network_settings);
|
||||
setup_output_tab(&output);
|
||||
setup_decoders_tab(&decoders);
|
||||
setup_credits_tab(&credits);
|
||||
setup_input_tab(&input);
|
||||
setup_advanced_input_tab(&advanced_input);
|
||||
setup_debug_tab(&debug);
|
||||
setup_hd_homerun_tab(&hd_homerun);
|
||||
setup_burned_subs_tab(&burned_subs);
|
||||
|
||||
}
|
||||
if (nk_menu_item_label(ctx, "Network Settings", NK_TEXT_LEFT))
|
||||
network_settings.show_network_settings = nk_true;
|
||||
nk_menu_end(ctx);
|
||||
}
|
||||
nk_layout_row_push(ctx, 70);
|
||||
if (nk_menu_begin_label(ctx, "Windows", NK_TEXT_LEFT, nk_vec2(120, 200))) {
|
||||
nk_layout_row_dynamic(ctx, 30, 1);
|
||||
nk_checkbox_label(ctx, "Activity", &show_activity_check);
|
||||
nk_checkbox_label(ctx, "Terminal", &show_terminal_check);
|
||||
nk_checkbox_label(ctx, "Preview", &show_preview_check);
|
||||
nk_menu_end(ctx);
|
||||
}
|
||||
nk_layout_row_push(ctx, 45);
|
||||
if (nk_menu_begin_label(ctx, "Help", NK_TEXT_LEFT, nk_vec2(120, 200)))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 30, 1);
|
||||
if (nk_menu_item_label(ctx, "Getting Started", NK_TEXT_LEFT))
|
||||
show_getting_started = nk_true;
|
||||
if (nk_menu_item_label(ctx, "About CCExtractor", NK_TEXT_LEFT))
|
||||
show_about_ccx = nk_true;
|
||||
nk_menu_end(ctx);
|
||||
}
|
||||
|
||||
//Network Settings
|
||||
if (network_settings.show_network_settings)
|
||||
draw_network_popup(ctx, &network_settings);
|
||||
|
||||
//About CCExtractor Popup
|
||||
if (show_about_ccx)
|
||||
draw_about_ccx_popup(ctx, &show_about_ccx, &droid_big->handle, &droid_head->handle);
|
||||
|
||||
//Getting Started
|
||||
if (show_getting_started)
|
||||
draw_getting_started_popup(ctx, &show_getting_started);
|
||||
|
||||
//Color Popup
|
||||
if (output.color_popup)
|
||||
draw_color_popup(ctx, &output);
|
||||
|
||||
//File Browser as Popup
|
||||
if(main_settings.scaleWindowForFileBrowser){
|
||||
int width = 0, height = 0;
|
||||
glfwGetWindowSize(win, &width, &height);
|
||||
glfwSetWindowSize(win, 930, 650);
|
||||
glfwSetWindowSizeLimits(win,930, 650, 930, 650 );
|
||||
file_browser_run(&browser, ctx, &main_settings, &output, &debug, &hd_homerun);
|
||||
}
|
||||
|
||||
//Thread popop when file can't be read
|
||||
if(main_settings.threadPopup)
|
||||
draw_thread_popup(ctx, &main_settings.threadPopup);
|
||||
|
||||
//Thread popup for hd_homerun thread
|
||||
if(hd_homerun.threadPopup)
|
||||
draw_thread_popup(ctx, &hd_homerun.threadPopup);
|
||||
|
||||
nk_layout_row_end(ctx);
|
||||
nk_menubar_end(ctx);
|
||||
nk_layout_space_begin(ctx, NK_STATIC, 15, 1);
|
||||
nk_layout_space_end(ctx);
|
||||
|
||||
|
||||
|
||||
/*TABS TRIGGERED IN ADVANCED MODE FLAG*/
|
||||
if (advanced_mode_check)
|
||||
{
|
||||
static int current_tab = 0;
|
||||
enum tab_name { MAIN, INPUT, ADV_INPUT, OUTPUT, DECODERS, CREDITS, DEBUG, HDHOMERUN, BURNEDSUBS };
|
||||
const char *names[] = { "Main", "Input", "Advanced Input", "Output", "Decoders", "Credits", "Debug", "HDHomeRun", "BurnedSubs" };
|
||||
float id = 0;
|
||||
int i;
|
||||
|
||||
nk_style_push_vec2(ctx, &ctx->style.window.spacing, nk_vec2(0, 0));
|
||||
nk_style_push_float(ctx, &ctx->style.button.rounding, 0);
|
||||
nk_layout_row_begin(ctx, NK_STATIC, 20, 9);
|
||||
for (i = 0; i < 9; ++i) {
|
||||
/*Make sure button perfectly fits text*/
|
||||
const struct nk_user_font *f = ctx->style.font;
|
||||
float text_width = f->width(f->userdata, f->height, names[i], nk_strlen(names[i]));
|
||||
float widget_width = text_width + 3 * ctx->style.button.padding.x;
|
||||
nk_layout_row_push(ctx, widget_width);
|
||||
if (current_tab == i) {
|
||||
/*Active tab gets highlighted*/
|
||||
struct nk_style_item button_color = ctx->style.button.normal;
|
||||
ctx->style.button.normal = ctx->style.button.active;
|
||||
current_tab = nk_button_label(ctx, names[i]) ? i : current_tab;
|
||||
ctx->style.button.normal = button_color;
|
||||
}
|
||||
else
|
||||
current_tab = nk_button_label(ctx, names[i]) ? i : current_tab;
|
||||
}
|
||||
nk_style_pop_float(ctx);
|
||||
/*Body*/
|
||||
|
||||
nk_layout_row_dynamic(ctx, tab_screen_height, 1);
|
||||
if (nk_group_begin(ctx, "Advanced Tabs", NK_WINDOW_NO_SCROLLBAR))
|
||||
{
|
||||
nk_style_pop_vec2(ctx);
|
||||
switch (current_tab) {
|
||||
case MAIN:
|
||||
tab_screen_height = 0;
|
||||
break;
|
||||
|
||||
case INPUT:
|
||||
draw_input_tab(ctx, &tab_screen_height, &input, &decoders);
|
||||
break;
|
||||
|
||||
case ADV_INPUT:
|
||||
draw_advanced_input_tab(ctx, &tab_screen_height, &advanced_input);
|
||||
break;
|
||||
|
||||
case OUTPUT:
|
||||
draw_output_tab(ctx, &tab_screen_height, &output, &main_settings);
|
||||
break;
|
||||
|
||||
case DECODERS:
|
||||
draw_decoders_tab(ctx, &tab_screen_height, &decoders);
|
||||
break;
|
||||
|
||||
case CREDITS:
|
||||
draw_credits_tab(ctx, &tab_screen_height, &credits);
|
||||
break;
|
||||
|
||||
case DEBUG:
|
||||
draw_debug_tab(ctx, &tab_screen_height, &main_settings, &output, &debug);
|
||||
break;
|
||||
|
||||
case HDHOMERUN:
|
||||
draw_hd_homerun_tab(ctx, &tab_screen_height, &hd_homerun, &main_settings);
|
||||
break;
|
||||
|
||||
case BURNEDSUBS:
|
||||
draw_burned_subs_tab(ctx, &tab_screen_height, &burned_subs);
|
||||
break;
|
||||
}
|
||||
nk_group_end(ctx);
|
||||
}
|
||||
else nk_style_pop_vec2(ctx);
|
||||
}
|
||||
|
||||
//ADVANCED MODE FLAG
|
||||
static const float ratio_adv_mode[] = { 0.75f, 0.22f, .03f };
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 20, 3, ratio_adv_mode);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_checkbox_label(ctx, "Advanced Mode", &advanced_mode_check);
|
||||
|
||||
//RADIO BUTTON 1
|
||||
static const float ratio_button[] = { .10f, .90f };
|
||||
static const float check_extension_ratio[] = { .10f, .53f, .12f, .15f, .10f };
|
||||
//static int op = FILES;
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 20, 2, ratio_button);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_option_label(ctx, "Extract from files below:", main_settings.port_or_files == FILES)) {
|
||||
//op = FILES;
|
||||
main_settings.port_or_files = FILES;
|
||||
}
|
||||
|
||||
//CHECKBOX FOR FILE TYPES
|
||||
static int add_remove_button = nk_false;
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 20, 5, check_extension_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_checkbox_label(ctx, "Check for common video file extensions", &file_extension_check);
|
||||
if (main_settings.filename_count > 0)
|
||||
{
|
||||
if(nk_button_label(ctx, "Add"))
|
||||
{
|
||||
main_settings.is_file_browser_active = nk_true;
|
||||
main_settings.scaleWindowForFileBrowser = nk_true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < main_settings.filename_count; i++)
|
||||
{
|
||||
if (main_settings.is_file_selected[i]) {
|
||||
add_remove_button = nk_true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
add_remove_button = nk_false;
|
||||
}
|
||||
if (add_remove_button)
|
||||
{
|
||||
|
||||
if (nk_button_label(ctx, "Remove")) {
|
||||
for (int i = main_settings.filename_count-1; i != -1; i--)
|
||||
if (main_settings.is_file_selected[i]) {
|
||||
remove_path_entry(&main_settings, i );
|
||||
main_settings.is_file_selected[i] = nk_false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
if (nk_button_label(ctx, "Clear"))
|
||||
{
|
||||
free(main_settings.filenames);
|
||||
main_settings.filename_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//RECTANGLE-FILES
|
||||
static const float ratio_rect_files[] = { 0.10f,0.80f };
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 180, 2, ratio_rect_files);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_group_begin(ctx, "Files in extraction queue:", NK_WINDOW_BORDER | NK_WINDOW_TITLE ))
|
||||
{
|
||||
if (main_settings.filename_count != 0)
|
||||
{
|
||||
int i = 0;
|
||||
nk_layout_row_static(ctx, 18, 380, 1);
|
||||
for (i = 0; i < main_settings.filename_count; ++i)
|
||||
nk_selectable_label(ctx, truncate_path_string(main_settings.filenames[i]), NK_TEXT_LEFT, &main_settings.is_file_selected[i]);
|
||||
}
|
||||
|
||||
else {
|
||||
nk_layout_row_dynamic(ctx, 1, 1);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_layout_row_dynamic(ctx, 25, 1);
|
||||
nk_label(ctx, "Drag and Drop files for extraction.", NK_TEXT_CENTERED);
|
||||
nk_layout_row_dynamic(ctx, 25, 1);
|
||||
nk_label(ctx, "OR", NK_TEXT_CENTERED);
|
||||
nk_layout_row_dynamic(ctx, 25, 3);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_button_label(ctx, "Browse Files"))
|
||||
{
|
||||
main_settings.is_file_browser_active = nk_true;
|
||||
main_settings.scaleWindowForFileBrowser = nk_true;
|
||||
}
|
||||
nk_spacing(ctx, 1);
|
||||
|
||||
}
|
||||
nk_group_end(ctx);
|
||||
|
||||
}
|
||||
|
||||
//RadioButton 2 along with combobox
|
||||
static const float ratio_port[] = { 0.10f,0.20f,0.20f,0.20f,0.20f,0.10f };
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 20, 6, ratio_port);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_option_label(ctx, "Extract from", main_settings.port_or_files == PORT)) {
|
||||
//op = PORT;
|
||||
main_settings.port_or_files = PORT;
|
||||
}
|
||||
main_settings.port_select = nk_combo(ctx, main_settings.port_type, 2, main_settings.port_select, 20, nk_vec2(85,100));
|
||||
nk_label(ctx, " stream, on port:", NK_TEXT_LEFT);
|
||||
|
||||
//RADDIO BUTTON 2, TEXTEDIT FOR ENTERING PORT NUMBER
|
||||
|
||||
static int len;
|
||||
static char buffer[10];
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, main_settings.port_num, &main_settings.port_num_len, 8, nk_filter_decimal);
|
||||
nk_layout_space_begin(ctx, NK_STATIC, 10, 1);
|
||||
nk_layout_space_end(ctx);
|
||||
|
||||
//Extraction Info`rmation
|
||||
nk_layout_row_dynamic(ctx, 10, 1);
|
||||
nk_text(ctx, "Extraction Info:", 16, NK_TEXT_CENTERED);
|
||||
|
||||
//RECTANGLE-INFO
|
||||
static const float ratio_rect_info[] = { 0.10f,0.80f,0.10f };
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 75, 2, ratio_rect_info);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_group_begin(ctx, "Extraction Info:", NK_WINDOW_BORDER))
|
||||
{
|
||||
if (main_settings.filename_count != 0)
|
||||
{
|
||||
nk_layout_row_static(ctx, 18, 380, 1);
|
||||
nk_label(ctx, concat("Input type: ", input.type[input.type_select]), NK_TEXT_LEFT);
|
||||
nk_label(ctx, concat("Output type: ", output.type[output.type_select]), NK_TEXT_LEFT);
|
||||
if(output.is_filename)
|
||||
nk_label(ctx, concat("Output path: ", output.filename), NK_TEXT_LEFT);
|
||||
else
|
||||
nk_label(ctx, "Output path: Default", NK_TEXT_LEFT);
|
||||
if(burned_subs.is_burned_subs)
|
||||
nk_label(ctx, "Hardsubtitles extraction: Yes", NK_TEXT_LEFT);
|
||||
else
|
||||
nk_label(ctx, "Hardsubtitles extraction: No", NK_TEXT_LEFT);
|
||||
|
||||
|
||||
}
|
||||
nk_group_end(ctx);
|
||||
|
||||
}
|
||||
|
||||
|
||||
nk_layout_space_begin(ctx, NK_STATIC, 10, 1);
|
||||
nk_layout_space_end(ctx);
|
||||
//PROGRESSBAR
|
||||
static const float ratio_progress[] = { 0.10f,0.03f,0.57f,0.03f,0.17f,0.10f };
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 20, 6, ratio_progress);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_progress(ctx, &main_settings.progress_cursor, 101, nk_false);
|
||||
|
||||
|
||||
|
||||
//Extract Button
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_button_label(ctx, "Extract"))
|
||||
{
|
||||
|
||||
setup_and_create_thread(&main_settings, &command);
|
||||
|
||||
}
|
||||
|
||||
|
||||
nk_layout_space_begin(ctx, NK_STATIC, 10, 1);
|
||||
nk_layout_space_end(ctx);
|
||||
|
||||
//PROGRESS_DETAILS_BUTTON
|
||||
if(!show_activity_check)
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 20, 3);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_button_label(ctx, "Progress Details"))
|
||||
{
|
||||
show_progress_details = nk_true;
|
||||
}
|
||||
nk_spacing(ctx, 1);
|
||||
}
|
||||
|
||||
//PROGRESS_DETAILS_POPUP
|
||||
if (show_progress_details)
|
||||
draw_progress_details_popup(ctx, &show_progress_details, &main_settings);
|
||||
|
||||
//build command string
|
||||
command_builder(&command, &main_settings, &network_settings, &input, &advanced_input, &output, &decoders, &credits, &debug, &burned_subs);
|
||||
|
||||
|
||||
|
||||
}
|
||||
nk_end(ctx);
|
||||
|
||||
glfwGetWindowSize(win, &screenWidth, &screenHeight);
|
||||
|
||||
if (!main_settings.scaleWindowForFileBrowser)
|
||||
{
|
||||
if (show_activity_check && show_preview_check && show_terminal_check)
|
||||
{
|
||||
if (screenWidth != 930 || screenHeight != 650)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 550);
|
||||
glfwSetWindowSizeLimits(win, 930, 650, 930, 650);
|
||||
}
|
||||
preview(ctx, 530, 0, 400, 550, &main_settings);
|
||||
terminal(ctx, 0, 550, 530, 100, &command.term_string);
|
||||
activity(ctx, 530, 550, 400, 100, &main_settings);
|
||||
}
|
||||
if (show_activity_check && show_preview_check && !show_terminal_check)
|
||||
{
|
||||
if (screenWidth != 930 || screenHeight != 650)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 650);
|
||||
glfwSetWindowSizeLimits(win, 930, 650, 930, 650);
|
||||
}
|
||||
preview(ctx, 530, 0, 400, 650, &main_settings);
|
||||
activity(ctx, 0, 550, 530, 100, &main_settings);
|
||||
}
|
||||
if (show_activity_check && !show_preview_check && show_terminal_check)
|
||||
{
|
||||
if (screenWidth != 930 || screenHeight != 650)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 650);
|
||||
glfwSetWindowSizeLimits(win, 930, 650, 930, 650);
|
||||
}
|
||||
activity(ctx, 530, 0, 400, 650, &main_settings);
|
||||
terminal(ctx, 0, 550, 530, 100, &command.term_string);
|
||||
}
|
||||
if (show_terminal_check && show_preview_check && !show_activity_check)
|
||||
{
|
||||
if (screenWidth != 930 || screenHeight != 650)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 650);
|
||||
glfwSetWindowSizeLimits(win, 930, 650, 930, 650);
|
||||
}
|
||||
terminal(ctx, 0, 550, 530, 100, &command.term_string);
|
||||
preview(ctx, 530, 0, 400, 650, &main_settings);
|
||||
}
|
||||
if (show_activity_check && !show_preview_check && !show_terminal_check)
|
||||
{
|
||||
if (screenWidth != 930 || screenHeight == 650)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 550);
|
||||
glfwSetWindowSizeLimits(win, 930, 550, 930, 550);
|
||||
}
|
||||
activity(ctx, 530, 0, 400, 550, &main_settings);
|
||||
}
|
||||
if (show_terminal_check && !show_activity_check && !show_preview_check)
|
||||
{
|
||||
if (screenHeight != 650 || screenWidth == 930)
|
||||
{
|
||||
glfwSetWindowSize(win, 530, 650);
|
||||
glfwSetWindowSizeLimits(win, 530, 650, 530, 650);
|
||||
}
|
||||
terminal(ctx, 0, 550, 530, 100, &command.term_string);
|
||||
}
|
||||
if (show_preview_check && !show_terminal_check && !show_activity_check)
|
||||
{
|
||||
if (screenHeight != 650 || screenWidth == 930)
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 550);
|
||||
glfwSetWindowSizeLimits(win, 930, 550, 930, 550);
|
||||
}
|
||||
preview(ctx, 530, 0, 400, 550, &main_settings);
|
||||
}
|
||||
if (!show_preview_check && !show_terminal_check && !show_activity_check)
|
||||
{
|
||||
glfwSetWindowSize(win, WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow);
|
||||
glfwSetWindowSizeLimits(win, WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow,
|
||||
WIDTH_mainPanelAndWindow, HEIGHT_mainPanelandWindow);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glfwSetWindowSize(win, 930, 650);
|
||||
glfwSetWindowSizeLimits(win, 930, 650, 930, 650);
|
||||
}
|
||||
|
||||
|
||||
glViewport(0, 0, screenWidth, screenHeight);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
/* IMPORTANT: `nk_glfw_render` modifies some global OpenGL state
|
||||
* with blending, scissor, face culling and depth test and defaults everything
|
||||
* back into a default state. Make sure to either save and restore or
|
||||
* reset your own state after drawing rendering the UI. */
|
||||
nk_glfw3_render(NK_ANTI_ALIASING_ON);
|
||||
glfwSwapBuffers(win);
|
||||
}
|
||||
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.home.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.directory.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.computer.handle.id);
|
||||
#ifdef _WIN32
|
||||
glDeleteTextures(1, (const GLuint*)&media.icons.drives.handle.id);
|
||||
#endif
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.desktop.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.default_file.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.text_file.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.music_file.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.font_file.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.img_file.handle.id);
|
||||
glDeleteTextures(1,(const GLuint*)&media.icons.movie_file.handle.id);
|
||||
|
||||
file_browser_free(&browser);
|
||||
//free(main_settings.filenames);
|
||||
|
||||
nk_glfw3_shutdown();
|
||||
glfwTerminate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void setup_main_settings(struct main_tab *main_settings)
|
||||
{
|
||||
|
||||
main_settings->is_check_common_extension = nk_false;
|
||||
main_settings->port_num_len = 0;
|
||||
main_settings->port_or_files = FILES;
|
||||
main_settings->port_type = (char**)malloc(2 * sizeof(char*));
|
||||
main_settings->port_type[0] = "UDP";
|
||||
main_settings->port_type[1] = "TCP";
|
||||
main_settings->port_select = 0;
|
||||
main_settings->is_file_browser_active = nk_false;
|
||||
main_settings->scaleWindowForFileBrowser = nk_false;
|
||||
main_settings->preview_string_count = 0;
|
||||
main_settings->activity_string_count = 0;
|
||||
main_settings->threadPopup = nk_false;
|
||||
}
|
||||
|
||||
char* truncate_path_string(char *filePath)
|
||||
{
|
||||
char* file_path = strdup(filePath);
|
||||
int i,j,z,slash_length, fileNameTruncated_index,copycount, prefix_length;
|
||||
char file_name[PATH_LENGTH], *ptr_slash, fileNameTruncated[NAME_LENGTH];
|
||||
//strcpy(filePath[i], paths[i]);
|
||||
if (strlen(filePath) >= PATH_LENGTH - 1)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
ptr_slash = strrchr(file_path, '\\');
|
||||
#else
|
||||
ptr_slash = strrchr(file_path, '/');
|
||||
#endif
|
||||
slash_length = strlen(ptr_slash);
|
||||
if (slash_length >= NAME_LENGTH)
|
||||
{
|
||||
fileNameTruncated_index = NAME_LENGTH - 1;
|
||||
for (z = 0; z < 6; z++)
|
||||
{
|
||||
fileNameTruncated[fileNameTruncated_index] = ptr_slash[slash_length];
|
||||
fileNameTruncated_index--;
|
||||
slash_length--;
|
||||
}
|
||||
for (z = 0; z < 4; z++)
|
||||
{
|
||||
fileNameTruncated[fileNameTruncated_index] = '.';
|
||||
fileNameTruncated_index--;
|
||||
}
|
||||
strncpy(fileNameTruncated, ptr_slash, 47);
|
||||
|
||||
strncpy(file_name, file_path , 7);
|
||||
file_name[7] = '.';
|
||||
file_name[8] = '.';
|
||||
file_name[9] = '.';
|
||||
file_name[10] = '\0';
|
||||
file_name[11] = '\0';
|
||||
file_name[12] = '\0';
|
||||
strcat(file_name, fileNameTruncated);
|
||||
strcpy(file_path, file_name);
|
||||
}
|
||||
|
||||
else {
|
||||
copycount = PATH_LENGTH - 1;
|
||||
prefix_length = copycount - slash_length - 3;
|
||||
strncpy(file_name, file_path, prefix_length);
|
||||
while (slash_length >= 0)
|
||||
{
|
||||
file_name[copycount] = ptr_slash[slash_length];
|
||||
copycount--;
|
||||
slash_length--;
|
||||
}
|
||||
for (j = 0; j < 3; j++, copycount--)
|
||||
file_name[copycount] = '.';
|
||||
|
||||
file_name[65] = '\0';
|
||||
strcpy(file_path, file_name);
|
||||
}
|
||||
return file_path;
|
||||
}
|
||||
else
|
||||
return filePath;
|
||||
}
|
||||
|
||||
void remove_path_entry(struct main_tab *main_settings, int indexToRemove)
|
||||
{
|
||||
//printf("Beginning processing. Array is currently: ");
|
||||
//for (int i = 0; i < arraySize; ++i)
|
||||
// printf("%d ", (*array)[i]);
|
||||
//printf("\n");
|
||||
|
||||
char** temp = (char**)calloc(main_settings->filename_count, sizeof(char *)); // allocate an array with a size 1 less than the current one
|
||||
|
||||
memmove(
|
||||
temp,
|
||||
main_settings->filenames,
|
||||
(indexToRemove + 1) * sizeof(char *)); // copy everything BEFORE the index
|
||||
|
||||
memmove(
|
||||
temp + indexToRemove,
|
||||
(main_settings->filenames) + (indexToRemove + 1),
|
||||
(main_settings->filename_count - indexToRemove) * sizeof(char *)); // copy everything AFTER the index
|
||||
|
||||
free(main_settings->filenames);
|
||||
main_settings->filenames = temp;
|
||||
main_settings->filename_count--;
|
||||
main_settings->filenames[main_settings->filename_count] = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
struct nk_image
|
||||
icon_load(const char *filename)
|
||||
{
|
||||
int x,y,n;
|
||||
GLuint tex;
|
||||
unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
|
||||
if (!data) die("[SDL]: failed to load image: %s", filename);
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST);
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
stbi_image_free(data);
|
||||
return nk_image_id((int)tex);
|
||||
}
|
||||
|
||||
|
||||
char* concat(char* string1, char *string2)
|
||||
{
|
||||
static char prefix[300], suffix[300];
|
||||
strcpy(prefix, string1);
|
||||
strcpy(suffix, string2);
|
||||
return strcat(prefix, suffix);
|
||||
}
|
||||
35
src/GUI/ccextractorGUI.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef CCEXTRACTORGUI_H
|
||||
#define CCEXTRACTORGUI_H
|
||||
|
||||
#ifndef NK_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#endif // !NK_IMPLEMENTATION
|
||||
|
||||
|
||||
struct main_tab
|
||||
{
|
||||
enum {PORT, FILES} port_or_files;
|
||||
char port_num[8];
|
||||
int port_num_len;
|
||||
int is_check_common_extension;
|
||||
char **port_type;
|
||||
int port_select;
|
||||
char **filenames;
|
||||
int filename_count;
|
||||
int is_file_selected[1000];
|
||||
int is_file_browser_active;
|
||||
int scaleWindowForFileBrowser;
|
||||
nk_size progress_cursor;
|
||||
char** activity_string;
|
||||
int activity_string_count;
|
||||
char** preview_string;
|
||||
int preview_string_count;
|
||||
int threadPopup;
|
||||
};
|
||||
|
||||
void setup_main_settings(struct main_tab *main_settings);
|
||||
char* truncate_path_string(char *filePath);
|
||||
void remove_path_entry(struct main_tab *main_settings, int indexToRemove);
|
||||
char* concat(char* string1, char *string2);
|
||||
|
||||
#endif //!CCEXTRACTORGUI_H
|
||||
376
src/GUI/ccx_cli_thread.c
Normal file
@@ -0,0 +1,376 @@
|
||||
#include "ccx_cli_thread.h"
|
||||
#include "ccextractorGUI.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#define MAX_WAIT 10
|
||||
#define PROGRESS_COMPLETE 100
|
||||
|
||||
void* extract_thread(void* extract_args)
|
||||
{
|
||||
struct args_extract *params = (struct args_extract*)extract_args;
|
||||
static char term_string[500];
|
||||
strcpy(term_string, params->command_string);
|
||||
strcat(term_string, " ");
|
||||
strcat(term_string, params->file_string);
|
||||
strcat(term_string, " 1>>ccx.log 2>>gui_report.log");
|
||||
printf("%s", term_string);
|
||||
system(term_string);
|
||||
pthread_exit(0);
|
||||
}
|
||||
|
||||
void* read_activity_data(void *read_args)
|
||||
{
|
||||
puts("Inside activity thread!");
|
||||
char line[500];
|
||||
char buffer[500];
|
||||
#if UNIX
|
||||
struct timespec time;
|
||||
time.tv_sec = 0;
|
||||
time.tv_nsec = 10000000L;
|
||||
#endif
|
||||
int wait = 0;
|
||||
struct args_extract *read_params = (struct args_extract*)read_args;
|
||||
FILE *file;
|
||||
char current_input[500];
|
||||
int concat_index = 0;
|
||||
file = fopen("ccx.log", "r");
|
||||
|
||||
while(file == NULL)
|
||||
{
|
||||
printf("Cannot open ccx.log, trying again.\n");
|
||||
file = fopen("ccx.log", "r");
|
||||
#if UNIX
|
||||
nanosleep(&time, NULL);
|
||||
#else
|
||||
_sleep(10);
|
||||
#endif
|
||||
wait++;
|
||||
if(wait == MAX_WAIT)
|
||||
{
|
||||
read_params->main_threadsettings->threadPopup = nk_true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
while(!feof(file))
|
||||
{
|
||||
if (fgets(current_input, sizeof(current_input), file) == NULL)
|
||||
continue;
|
||||
if (concat_index == 0) {
|
||||
strcpy(line, current_input);
|
||||
} else {
|
||||
strcat(line, current_input);
|
||||
}
|
||||
concat_index++;
|
||||
if (current_input[strlen(current_input) - 1] != '\n')
|
||||
continue;
|
||||
|
||||
sscanf(line, "%[^\n]", buffer);
|
||||
if(read_params->main_threadsettings->activity_string_count == 0)
|
||||
read_params->main_threadsettings->activity_string =
|
||||
malloc(sizeof(*read_params->main_threadsettings->activity_string));
|
||||
else
|
||||
read_params->main_threadsettings->activity_string =
|
||||
realloc(read_params->main_threadsettings->activity_string,
|
||||
(read_params->main_threadsettings->activity_string_count + 1)*sizeof(char*));
|
||||
|
||||
read_params->main_threadsettings->activity_string[read_params->main_threadsettings->activity_string_count] = strdup(buffer);
|
||||
read_params->main_threadsettings->activity_string_count++;
|
||||
|
||||
|
||||
|
||||
memset(line, 0, sizeof(line));
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
concat_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void* read_data_from_thread(void* read_args)
|
||||
{
|
||||
pthread_t tid_activity;
|
||||
pthread_attr_t attr_activity;
|
||||
static char buffer[500];
|
||||
char t_start[6], t_end[6], subtitle1[100], subtitle2[100];
|
||||
#if UNIX
|
||||
struct timespec time;
|
||||
time.tv_sec = 0;
|
||||
time.tv_nsec = 10000000L;
|
||||
#endif
|
||||
|
||||
|
||||
int wait = 0;
|
||||
struct args_extract *read_params = (struct args_extract*)read_args;
|
||||
int unknown1 = 0, unknown2 = 0,progress_count = 0;
|
||||
FILE *file;
|
||||
char prev_line[500];
|
||||
char line[500];
|
||||
char current_input[500];
|
||||
int concat_index = 0;
|
||||
char sub_line[500];
|
||||
char prog_line[500];
|
||||
int subs_success1, subs_success2, progress_success;
|
||||
|
||||
/*Setup activity thread*/
|
||||
pthread_attr_init(&attr_activity);
|
||||
int err = pthread_create(&tid_activity, &attr_activity, read_activity_data, read_params);
|
||||
if(!err)
|
||||
puts("Activity Thread created");
|
||||
|
||||
file = fopen("gui_report.log", "r");
|
||||
|
||||
while (file == NULL) {
|
||||
printf("Cannot open gui_report.log, trying again.\n");
|
||||
file = fopen("gui_report.log", "r");
|
||||
#if UNIX
|
||||
nanosleep(&time, NULL);
|
||||
#else
|
||||
_sleep(10);
|
||||
#endif
|
||||
wait++;
|
||||
if (wait >= MAX_WAIT) {
|
||||
read_params->main_threadsettings->threadPopup = nk_true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
if (fgets(current_input, sizeof(current_input), file) == NULL)
|
||||
continue;
|
||||
if (concat_index == 0) {
|
||||
strcpy(line, current_input);
|
||||
} else {
|
||||
strcat(line, current_input);
|
||||
}
|
||||
concat_index++;
|
||||
if (current_input[strlen(current_input) - 1] != '\n')
|
||||
continue;
|
||||
|
||||
progress_success = sscanf(line, "###PROGRESS#%d#%d#%d", &progress_count, &unknown1, &unknown2);
|
||||
if(progress_success == 3)
|
||||
read_params->main_threadsettings->progress_cursor = progress_count;
|
||||
subs_success1 = sscanf(line, "###SUBTITLE#%[^#]#%[^#]#%[^\n]", t_start, t_end, subtitle1);
|
||||
subs_success2 = sscanf(line, "###SUBTITLE###%[^\n]", subtitle2);
|
||||
if(subs_success1 == 3)
|
||||
{
|
||||
sprintf(buffer, "%s-%s: %s", t_start, t_end, subtitle1);
|
||||
if(read_params->main_threadsettings->preview_string_count == 0)
|
||||
read_params->main_threadsettings->preview_string =
|
||||
malloc(sizeof(*read_params->main_threadsettings->preview_string));
|
||||
else
|
||||
read_params->main_threadsettings->preview_string =
|
||||
realloc(read_params->main_threadsettings->preview_string,
|
||||
(read_params->main_threadsettings->preview_string_count + 1)*sizeof(char*));
|
||||
|
||||
read_params->main_threadsettings->preview_string[read_params->main_threadsettings->preview_string_count] = strdup(buffer);
|
||||
read_params->main_threadsettings->preview_string_count++;
|
||||
}
|
||||
|
||||
if(subs_success2 == 1)
|
||||
{
|
||||
sprintf(buffer, " %s", subtitle2);
|
||||
if(read_params->main_threadsettings->preview_string_count == 0)
|
||||
read_params->main_threadsettings->preview_string =
|
||||
malloc(sizeof(*read_params->main_threadsettings->preview_string));
|
||||
else
|
||||
read_params->main_threadsettings->preview_string =
|
||||
realloc(read_params->main_threadsettings->preview_string,
|
||||
(read_params->main_threadsettings->preview_string_count + 1)*sizeof(char*));
|
||||
|
||||
read_params->main_threadsettings->preview_string[read_params->main_threadsettings->preview_string_count] = strdup(buffer);
|
||||
read_params->main_threadsettings->preview_string_count++;
|
||||
}
|
||||
|
||||
if(progress_count == PROGRESS_COMPLETE)
|
||||
break;
|
||||
memset(line, 0, sizeof(line));
|
||||
concat_index = 0;
|
||||
}
|
||||
|
||||
printf("progress count:%d\n", progress_count);
|
||||
fclose(file);
|
||||
printf("File closed\n");
|
||||
for(int i = 0; i<read_params->main_threadsettings->preview_string_count; i++)
|
||||
printf("%s\n",read_params->main_threadsettings->preview_string[i]);
|
||||
pthread_exit(0);
|
||||
}
|
||||
|
||||
void* feed_files_for_extraction(void* file_args)
|
||||
{
|
||||
printf("Inside feeder\n");
|
||||
|
||||
struct args_extract *extract_params = (struct args_extract *)file_args;
|
||||
printf("count:%d\n", extract_params->main_threadsettings->filename_count);
|
||||
extract_params->command_string = extract_params->threadcommand->term_string;
|
||||
int count = extract_params->main_threadsettings->filename_count;
|
||||
pthread_t tid_extract, tid_read;
|
||||
pthread_attr_t attr_extract, attr_read;
|
||||
|
||||
|
||||
for(int i = 0; count != 0; i++, count--)
|
||||
{
|
||||
pthread_t tid_extract, tid_read;
|
||||
pthread_attr_t attr_extract, attr_read;
|
||||
|
||||
pthread_attr_init(&attr_extract);
|
||||
pthread_attr_init(&attr_read);
|
||||
|
||||
extract_params->main_threadsettings->is_file_selected[i] = nk_true;
|
||||
extract_args.file_string = extract_params->main_threadsettings->filenames[i];
|
||||
int err1 = pthread_create(&tid_extract, &attr_extract, extract_thread, extract_params);
|
||||
int err2 = pthread_create(&tid_read, &attr_read, read_data_from_thread, extract_params);
|
||||
if (!err1)
|
||||
printf("Extraction Thread Complete:%d\n", i);
|
||||
if (!err2)
|
||||
printf("Read Thread Complete:%d\n", i);
|
||||
|
||||
pthread_join(tid_extract, NULL);
|
||||
printf("Extract thread joined\n");
|
||||
pthread_join(tid_read, NULL);
|
||||
printf("Read thread joined\n");
|
||||
|
||||
extract_params->main_threadsettings->is_file_selected[i] = nk_false;
|
||||
|
||||
remove("gui_report.log");
|
||||
remove("ccx.log");
|
||||
|
||||
}
|
||||
printf("File feeding over\n");
|
||||
}
|
||||
|
||||
|
||||
void setup_and_create_thread(struct main_tab *main_settings, struct built_string *command)
|
||||
{
|
||||
extract_args.main_threadsettings = (struct main_tab*)main_settings;
|
||||
extract_args.threadcommand = (struct built_string*)command;
|
||||
|
||||
pthread_attr_init(&attr_launch);
|
||||
int err = pthread_create(&tid_launch, &attr_launch, feed_files_for_extraction, &extract_args);
|
||||
if (!err)
|
||||
printf("Feeder created!\n");
|
||||
}
|
||||
|
||||
|
||||
/*THREAD FUNCTIONS FOR HD_HOMERUN*/
|
||||
void* find_hd_homerun_devices(void *args)
|
||||
{
|
||||
char command[300];
|
||||
extract_args.homerun_thread = (struct hd_homerun_tab*)args;
|
||||
int wait = 0;
|
||||
FILE *file;
|
||||
char line[200];
|
||||
int device_success;
|
||||
char device[200];
|
||||
|
||||
#if UNIX
|
||||
struct timespec time;
|
||||
time.tv_sec = 0;
|
||||
time.tv_nsec = 10000000L;
|
||||
#endif
|
||||
|
||||
|
||||
#if HD_HOMERUN
|
||||
strcpy(command, "hdhomerun_config");
|
||||
#else
|
||||
strncpy(command, extract_args.homerun_thread->location, extract_args.homerun_thread->location_len);
|
||||
#endif
|
||||
strcpy(command, " discover >> homerun.log");
|
||||
system(command);
|
||||
|
||||
|
||||
file = fopen("homerun.log", "r");
|
||||
|
||||
while (file == NULL) {
|
||||
printf("Cannot open file! Trying again.\n");
|
||||
file = fopen("homerun.log", "r");
|
||||
#if UNIX
|
||||
nanosleep(&time, NULL);
|
||||
#else
|
||||
_sleep(10);
|
||||
#endif
|
||||
wait++;
|
||||
if (wait >= MAX_WAIT) {
|
||||
extract_args.homerun_thread->threadPopup = nk_true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
fgets(line, sizeof(line), file);
|
||||
device_success = sscanf(line, "hdhomerun device %[^\n]", device);
|
||||
if(feof(file))
|
||||
break;
|
||||
if(device_success == 1)
|
||||
{
|
||||
if(extract_args.homerun_thread->device_num == 0)
|
||||
{
|
||||
extract_args.homerun_thread->devices = malloc(sizeof(char*));
|
||||
extract_args.homerun_thread->devices[extract_args.homerun_thread->device_num] = strdup(device);
|
||||
extract_args.homerun_thread->device_num++;
|
||||
}
|
||||
else
|
||||
{
|
||||
extract_args.homerun_thread->devices = realloc(extract_args.homerun_thread->devices,
|
||||
(extract_args.homerun_thread->device_num + 1)*sizeof(char*));
|
||||
extract_args.homerun_thread->devices[extract_args.homerun_thread->device_num] = strdup(device);
|
||||
extract_args.homerun_thread->device_num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("Find device thread finished\n");
|
||||
|
||||
}
|
||||
|
||||
void* setup_hd_homerun_device(void *args)
|
||||
{
|
||||
char device[20];
|
||||
extract_args.homerun_thread = (struct hd_homerun_tab*)args;
|
||||
char channel_command[300];
|
||||
char program_command[300];
|
||||
char target_command[300];
|
||||
|
||||
sscanf(extract_args.homerun_thread->devices[extract_args.homerun_thread->selected], "%s", device);
|
||||
#if HD_HOMERUN
|
||||
strcpy(channel_command, "hdhomerun_config");
|
||||
strcpy(program_command, "hdhomerun_config");
|
||||
strcpy(target_command, "hdhomerun_config");
|
||||
#else
|
||||
strncpy(channel_command, extract_args.homerun_thread->location, extract_args.homerun_thread->location_len);
|
||||
strncpy(program_command, extract_args.homerun_thread->location, extract_args.homerun_thread->location_len);
|
||||
strncpy(target_command, extract_args.homerun_thread->location, extract_args.homerun_thread->location_len);
|
||||
#endif
|
||||
strcat(channel_command, " ");
|
||||
strcat(program_command, " ");
|
||||
strcat(target_command, " ");
|
||||
|
||||
strcat(channel_command, device);
|
||||
strcat(program_command, device);
|
||||
strcat(target_command, device);
|
||||
|
||||
strcat(channel_command, " set /tuner");
|
||||
strcat(program_command, " set /tuner");
|
||||
strcat(target_command, " set /tuner");
|
||||
|
||||
strncat(channel_command, extract_args.homerun_thread->tuner, extract_args.homerun_thread->tuner_len);
|
||||
strncat(program_command, extract_args.homerun_thread->tuner, extract_args.homerun_thread->tuner_len);
|
||||
strncat(target_command, extract_args.homerun_thread->tuner, extract_args.homerun_thread->tuner_len);
|
||||
|
||||
strcat(channel_command, "/channel ");
|
||||
strcat(program_command, "/program ");
|
||||
strcat(target_command, "/target ");
|
||||
|
||||
strncat(channel_command, extract_args.homerun_thread->channel, extract_args.homerun_thread->channel_len);
|
||||
strncat(program_command, extract_args.homerun_thread->program, extract_args.homerun_thread->program_len);
|
||||
strncat(target_command, extract_args.homerun_thread->ipv4_address, extract_args.homerun_thread->ipv4_address_len);
|
||||
|
||||
system(channel_command);
|
||||
system(program_command);
|
||||
system(target_command);
|
||||
|
||||
pthread_exit(0);
|
||||
}
|
||||
40
src/GUI/ccx_cli_thread.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef CCX_CLI_THREAD_H
|
||||
#define CCX_CLI_THREAD_H
|
||||
#define HAVE_STRUCT_TIMESPEC
|
||||
#include "ccextractorGUI.h"
|
||||
#include "popups.h"
|
||||
#include "tabs.h"
|
||||
#include "command_builder.h"
|
||||
#include "pthread.h"
|
||||
struct args_extract {
|
||||
struct main_tab *main_threadsettings;
|
||||
struct built_string *threadcommand;
|
||||
struct hd_homerun_tab *homerun_thread;
|
||||
char *file_string;
|
||||
char *command_string;
|
||||
};
|
||||
|
||||
|
||||
static struct args_extract extract_args;
|
||||
|
||||
//FOR EXTRACT BUTTON TRIGGER ---- MAIN_TAB
|
||||
pthread_t tid_launch;
|
||||
pthread_attr_t attr_launch;
|
||||
|
||||
//FOR FIND DEVICES BUTTON TRIGGER ----- HD_HOMERUN_TAB
|
||||
pthread_t tid_find;
|
||||
pthread_attr_t attr_find;
|
||||
|
||||
//FOR SETUP DEVICE BUTTON TRIGGER ------ HD_HOMERUN_TAB
|
||||
pthread_t tid_setup;
|
||||
pthread_attr_t attr_setup;
|
||||
|
||||
void* read_activity_data(void *read_args);
|
||||
void* read_data_from_thread(void* read_args);
|
||||
void* extract_thread(void* extract_args);
|
||||
void* feed_files_for_extraction(void* file_args);
|
||||
void setup_and_create_thread(struct main_tab *main_settings, struct built_string *command);
|
||||
void* find_hd_homerun_devices(void *args);
|
||||
void* setup_hd_homerun_device(void *args);
|
||||
|
||||
#endif //!CCX_CLI_THREAD_H
|
||||
482
src/GUI/command_builder.c
Normal file
@@ -0,0 +1,482 @@
|
||||
#ifndef NK_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#endif //!NK_IMPLEMENTATION
|
||||
|
||||
#include "ccextractorGUI.h"
|
||||
#include "tabs.h"
|
||||
#include "command_builder.h"
|
||||
|
||||
void command_builder(struct built_string *command,
|
||||
struct main_tab *main_settings,
|
||||
struct network_popup *network_settings,struct input_tab *input,
|
||||
struct advanced_input_tab *advanced_input,
|
||||
struct output_tab *output,
|
||||
struct decoders_tab *decoders,
|
||||
struct credits_tab *credits,
|
||||
struct debug_tab *debug,
|
||||
struct burned_subs_tab *burned_subs)
|
||||
{
|
||||
static char buffer[1000];
|
||||
#ifdef _WIN32
|
||||
strcpy(buffer, "ccextractorwin --gui_mode_reports");
|
||||
#else
|
||||
strcpy(buffer, "./ccextractor --gui_mode_reports");
|
||||
#endif
|
||||
|
||||
/*INPUT COMMANDS*/
|
||||
if (main_settings->port_or_files == FILES)
|
||||
{
|
||||
if (input->type_select != 0)
|
||||
{
|
||||
strcat(buffer, " -in=");
|
||||
strcat(buffer, input->type[input->type_select]);
|
||||
}
|
||||
|
||||
if (input->is_split)
|
||||
strcat(buffer, " --videoedited");
|
||||
|
||||
if (input->is_process_from) {
|
||||
strcat(buffer, " -startat ");
|
||||
strcat(buffer, input->from_time_buffer);
|
||||
}
|
||||
|
||||
if (input->is_process_until) {
|
||||
strcat(buffer, " -endat ");
|
||||
strcat(buffer, input->until_time_buffer);
|
||||
}
|
||||
|
||||
switch (input->elementary_stream) {
|
||||
case AUTO_DETECT:
|
||||
break;
|
||||
case STREAM_TYPE:
|
||||
strcat(buffer, " -datastreamtype ");
|
||||
strncat(buffer, input->stream_type, input->stream_type_len);
|
||||
break;
|
||||
case STREAM_PID:
|
||||
strcat(buffer, " -datapid ");
|
||||
strncat(buffer, input->stream_pid, input->stream_pid_len);
|
||||
}
|
||||
|
||||
if (input->is_assume_mpeg) {
|
||||
strcat(buffer, " -streamtype ");
|
||||
strncat(buffer, input->mpeg_type, input->mpeg_type_len);
|
||||
}
|
||||
|
||||
if(decoders->teletext_dvb == TELETEXT)
|
||||
{
|
||||
switch (input->teletext_decoder) {
|
||||
case AUTO_DECODE:
|
||||
break;
|
||||
case FORCE:
|
||||
strcat(buffer, " -teletext");
|
||||
break;
|
||||
case DISABLE:
|
||||
strcat(buffer, " -noteletext");
|
||||
}
|
||||
|
||||
if (input->is_process_teletext_page) {
|
||||
strcat(buffer, " -tpage ");
|
||||
strncat(buffer, input->teletext_page_number, input->teletext_page_numer_len);
|
||||
}
|
||||
}
|
||||
|
||||
switch (input->is_limit) {
|
||||
case NO_LIMIT:
|
||||
break;
|
||||
case LIMITED:
|
||||
strcat(buffer, " --screenfuls ");
|
||||
strcat(buffer, input->screenful_limit_buffer);
|
||||
}
|
||||
|
||||
switch (input->clock_input) {
|
||||
case AUTO:
|
||||
break;
|
||||
case GOP:
|
||||
strcat(buffer, " --goptime");
|
||||
break;
|
||||
case PTS:
|
||||
strcat(buffer, " --nogoptime");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*Main tab and network settings*/
|
||||
if (main_settings->port_or_files == PORT)
|
||||
{
|
||||
switch (main_settings->port_select)
|
||||
{
|
||||
case 0:
|
||||
strcat(buffer, " -udp ");
|
||||
if (!strstr(network_settings->udp_ipv4, "None")) {
|
||||
strncat(buffer, network_settings->udp_ipv4, network_settings->udp_ipv4_len);
|
||||
strcat(buffer, ":");
|
||||
}
|
||||
strncat(buffer, main_settings->port_num, main_settings->port_num_len);
|
||||
break;
|
||||
case 1:
|
||||
strcat(buffer, " -tcp ");
|
||||
strncat(buffer, main_settings->port_num, main_settings->port_num_len);
|
||||
if (!strstr(network_settings->tcp_pass, "None")) {
|
||||
strcat(buffer, " -tcppassword ");
|
||||
strncat(buffer, network_settings->tcp_pass, network_settings->tcp_pass_len);
|
||||
}
|
||||
if (!strstr(network_settings->tcp_desc, "None")) {
|
||||
strcat(buffer, " -tcpdesc ");
|
||||
strncat(buffer, network_settings->tcp_desc, network_settings->tcp_desc_len);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (input->is_live_stream) {
|
||||
strcat(buffer, " -s ");
|
||||
strncat(buffer, input->wait_data_sec, input->wait_data_sec_len);
|
||||
}
|
||||
|
||||
if (input->is_process_from) {
|
||||
strcat(buffer, " -startat ");
|
||||
strcat(buffer, input->from_time_buffer);
|
||||
}
|
||||
|
||||
if (input->is_process_until) {
|
||||
strcat(buffer, " -endat ");
|
||||
strcat(buffer, input->until_time_buffer);
|
||||
}
|
||||
|
||||
switch (input->elementary_stream) {
|
||||
case AUTO_DETECT:
|
||||
break;
|
||||
case STREAM_TYPE:
|
||||
strcat(buffer, " -datastreamtype ");
|
||||
strncat(buffer, input->stream_type, input->stream_type_len);
|
||||
break;
|
||||
case STREAM_PID:
|
||||
strcat(buffer, " -datapid ");
|
||||
strncat(buffer, input->stream_pid, input->stream_pid_len);
|
||||
}
|
||||
|
||||
if (input->is_assume_mpeg) {
|
||||
strcat(buffer, " -streamtype ");
|
||||
strncat(buffer, input->mpeg_type, input->mpeg_type_len);
|
||||
}
|
||||
|
||||
switch (input->teletext_decoder) {
|
||||
case AUTO_DECODE:
|
||||
break;
|
||||
case FORCE:
|
||||
strcat(buffer, " -teletext");
|
||||
break;
|
||||
case DISABLE:
|
||||
strcat(buffer, " -noteletext");
|
||||
}
|
||||
|
||||
if (input->is_process_teletext_page) {
|
||||
strcat(buffer, " -tpage ");
|
||||
strncat(buffer, input->teletext_page_number, input->teletext_page_numer_len);
|
||||
}
|
||||
|
||||
switch (input->is_limit) {
|
||||
case NO_LIMIT:
|
||||
break;
|
||||
case LIMITED:
|
||||
strcat(buffer, " --screenfuls ");
|
||||
strcat(buffer, input->screenful_limit_buffer);
|
||||
}
|
||||
|
||||
switch (input->clock_input) {
|
||||
case AUTO:
|
||||
break;
|
||||
case GOP:
|
||||
strcat(buffer, " --goptime");
|
||||
break;
|
||||
case PTS:
|
||||
strcat(buffer, " --nogoptime");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*ADVANCED INPUT SETTINGS*/
|
||||
if(advanced_input->is_multiple_program)
|
||||
{
|
||||
switch(advanced_input->multiple_program)
|
||||
{
|
||||
case FIRST_PROG:
|
||||
strcat(buffer, " -autoprogram");
|
||||
break;
|
||||
case PROG_NUM:
|
||||
strcat(buffer, " -pn ");
|
||||
strcat(buffer, advanced_input->prog_number);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(advanced_input->set_myth)
|
||||
{
|
||||
case AUTO_MYTH:
|
||||
break;
|
||||
case FORCE_MYTH:
|
||||
strcat(buffer, " -myth");
|
||||
break;
|
||||
case DISABLE_MYTH:
|
||||
strcat(buffer, " -nomyth");
|
||||
break;
|
||||
}
|
||||
|
||||
if(advanced_input->is_mpeg_90090)
|
||||
strcat(buffer, " -90090");
|
||||
if(advanced_input->is_padding_0000)
|
||||
strcat(buffer, " -fp");
|
||||
if(advanced_input->is_order_ccinfo)
|
||||
strcat(buffer, " -poc");
|
||||
if(advanced_input->is_win_bug)
|
||||
strcat(buffer, " -wtvconvertfix");
|
||||
if(advanced_input->is_hauppage_file)
|
||||
strcat(buffer, " -haup");
|
||||
if(advanced_input->is_process_mp4)
|
||||
strcat(buffer, " -mp4vidtrack");
|
||||
if(advanced_input->is_ignore_broadcast)
|
||||
strcat(buffer, " -noautotimeref");
|
||||
|
||||
/*DECODERS TAB*/
|
||||
if(decoders->is_field2)
|
||||
strcat(buffer, " -12");
|
||||
|
||||
switch(decoders->channel)
|
||||
{
|
||||
case CHANNEL_1:
|
||||
break;
|
||||
case CHANNEL_2:
|
||||
strcat(buffer, " -cc2");
|
||||
break;
|
||||
}
|
||||
|
||||
if(decoders->is_708)
|
||||
{
|
||||
strcat(buffer, " -svc ");
|
||||
strncat(buffer, decoders->services, decoders->services_len);
|
||||
}
|
||||
|
||||
switch(decoders->teletext_dvb)
|
||||
{
|
||||
case TELETEXT:
|
||||
if(strcmp(decoders->min_distance, "2"))
|
||||
{
|
||||
strcat(buffer, " -levdistmincnt ");
|
||||
strncat(buffer, decoders->min_distance, decoders->min_distance_len);
|
||||
}
|
||||
if(strcmp(decoders->max_distance, "10"))
|
||||
{
|
||||
strcat(buffer, " -levdistmaxpct ");
|
||||
strncat(buffer, decoders->max_distance, decoders->max_distance_len);
|
||||
}
|
||||
break;
|
||||
|
||||
case DVB:
|
||||
strcat(buffer, " -codec dvdsub");
|
||||
break;
|
||||
}
|
||||
|
||||
/*CREDITS TAB*/
|
||||
if(credits->is_start_text)
|
||||
{
|
||||
strcat(buffer, " --startcreditstext \"");
|
||||
strncat(buffer, credits->start_text, credits->start_text_len);
|
||||
strcat(buffer,"\" --startcreditsforatleast ");
|
||||
strncat(buffer, credits->start_atleast_sec, credits->start_atleast_sec_len);
|
||||
strcat(buffer, " --startcreditsforatmost ");
|
||||
strncat(buffer, credits->start_atmost_sec, credits->start_atmost_sec_len);
|
||||
if(credits->is_before)
|
||||
{
|
||||
strcat(buffer, " --startcreditsnotbefore ");
|
||||
strcat(buffer, credits->before_time_buffer);
|
||||
}
|
||||
if(credits->is_after)
|
||||
{
|
||||
strcat(buffer, " --startcreditsnotafter ");
|
||||
strcat(buffer, credits->after_time_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if(credits->is_end_text)
|
||||
{
|
||||
strcat(buffer, " --endcreditstext \"");
|
||||
strncat(buffer, credits->end_text, credits->end_text_len);
|
||||
strcat(buffer, "\" --endcreditsforatleast ");
|
||||
strncat(buffer, credits->end_atleast_sec, credits->end_atleast_sec_len);
|
||||
strcat(buffer, " --endcreditsforatmost ");
|
||||
strncat(buffer, credits->end_atmost_sec, credits->end_atmost_sec_len);
|
||||
}
|
||||
|
||||
/*DEBUG TAB*/
|
||||
if(debug->is_elementary_stream)
|
||||
{
|
||||
strcat(buffer, " -cf ");
|
||||
strncat(buffer, debug->elementary_stream, debug->elementary_stream_len);
|
||||
}
|
||||
if(debug->is_dump_packets)
|
||||
strcat(buffer, " -debug");
|
||||
if(debug->is_debug_608)
|
||||
strcat(buffer, " -608");
|
||||
if(debug->is_debug_708)
|
||||
strcat(buffer, " -708");
|
||||
if(debug->is_stamp_output)
|
||||
strcat(buffer, " -goppts");
|
||||
if(debug->is_debug_analysed_vid)
|
||||
strcat(buffer, " -vides");
|
||||
if(debug->is_raw_608_708)
|
||||
strcat(buffer, " -cbraw");
|
||||
if(debug->is_debug_parsed)
|
||||
strcat(buffer, " -parsedebug");
|
||||
if(!strcmp(output->type[output->type_select], "bin"))
|
||||
{
|
||||
if(debug->is_disable_sync)
|
||||
strcat(buffer, " -nosync");
|
||||
if(debug->is_no_padding)
|
||||
strcat(buffer, " -fullbin");
|
||||
}
|
||||
if(debug->is_debug_xds)
|
||||
strcat(buffer, " -xdsdebug");
|
||||
if(debug->is_output_pat)
|
||||
strcat(buffer, " -parsePAT");
|
||||
if(debug->is_output_pmt)
|
||||
strcat(buffer, " -parsePMT");
|
||||
if(debug->is_scan_ccdata)
|
||||
strcat(buffer, " -investigate_packets");
|
||||
if(debug->is_output_levenshtein)
|
||||
strcat(buffer, " -deblev");
|
||||
|
||||
/*HARD_BURNED SUBS SETTINGS*/
|
||||
if(burned_subs->is_burned_subs)
|
||||
{
|
||||
strcat(buffer, " -hardsubx -ocr_mode");
|
||||
switch(burned_subs->ocr_mode)
|
||||
{
|
||||
case FRAME_WISE:
|
||||
strcat(buffer, " frame");
|
||||
break;
|
||||
case WORD_WISE:
|
||||
strcat(buffer, " word");
|
||||
break;
|
||||
case LETTER_WISE:
|
||||
strcat(buffer, " letter");
|
||||
break;
|
||||
}
|
||||
|
||||
strcat(buffer, " -min_sub_duration ");
|
||||
strcat(buffer, burned_subs->min_duration);
|
||||
|
||||
if(!burned_subs->subs_color_select && burned_subs->color_type == PRESET)
|
||||
sprintf(buffer, "%s -whiteness_thresh %d", buffer, burned_subs->luminance_threshold);
|
||||
|
||||
sprintf(buffer, "%s -conf_thresh %d", buffer, burned_subs->confidence_threshold);
|
||||
|
||||
if(burned_subs->is_italic)
|
||||
strcat(buffer, " -detect_italics");
|
||||
}
|
||||
|
||||
//Output
|
||||
{
|
||||
strcat(buffer, " -out=");
|
||||
strcat(buffer, output->type[output->type_select]);
|
||||
if (output->is_filename) {
|
||||
strcat(buffer, " -o \"");
|
||||
strncat(buffer, output->filename, output->filename_len);
|
||||
strcat(buffer, "\"");
|
||||
}
|
||||
|
||||
if (output->is_delay) {
|
||||
strcat(buffer, " -delay ");
|
||||
strcat(buffer, output->delay_sec_buffer);
|
||||
}
|
||||
|
||||
if (output->is_export_xds)
|
||||
strcat(buffer, " -xds");
|
||||
|
||||
switch (output->encoding) {
|
||||
case LATIN:
|
||||
strcat(buffer, " -latin1");
|
||||
break;
|
||||
case UNIC:
|
||||
strcat(buffer, " -unicode");
|
||||
break;
|
||||
case UTF:
|
||||
strcat(buffer, " -utf8");
|
||||
break;
|
||||
}
|
||||
|
||||
if (output->is_bom)
|
||||
strcat(buffer, " -bom");
|
||||
else
|
||||
strcat(buffer, " -nobom");
|
||||
|
||||
if (output->is_cap_standard)
|
||||
strcat(buffer, " --sentencecap");
|
||||
|
||||
if (output->is_cap_file) {
|
||||
strcat(buffer, " --capfile \"");
|
||||
strncat(buffer, output->cap_dictionary, output->cap_dictionary_len);
|
||||
strcat(buffer, "\"");
|
||||
}
|
||||
|
||||
switch (output->line_ending)
|
||||
{
|
||||
case CRLF:
|
||||
break;
|
||||
case LF:
|
||||
strcat(buffer, " -lf");
|
||||
break;
|
||||
}
|
||||
|
||||
if (output->is_center)
|
||||
strcat(buffer, " -trim");
|
||||
|
||||
if (output->is_dash)
|
||||
strcat(buffer, " -autodash");
|
||||
|
||||
if (output->no_typesetting)
|
||||
strcat(buffer, " --notypesetting");
|
||||
|
||||
switch (output->font_color) {
|
||||
case NO_COLOR:
|
||||
strcat(buffer, " --nofontcolor");
|
||||
break;
|
||||
case DEFAULT_COLOR:
|
||||
strcat(buffer, " --defaultcolor #");
|
||||
strcat(buffer, output->color_hex);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output->onetime_or_realtime)
|
||||
{
|
||||
case ONETIME:
|
||||
strcat(buffer, " --norollup");
|
||||
break;
|
||||
case REALTIME:
|
||||
strcat(buffer, " -dru");
|
||||
switch (output->roll_limit_select)
|
||||
{
|
||||
case 1:
|
||||
strcat(buffer, " -ru1");
|
||||
break;
|
||||
case 2:
|
||||
strcat(buffer, " -ru2");
|
||||
break;
|
||||
case 3:
|
||||
strcat(buffer, " -ru3");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
memset(command->term_string, 0, sizeof(command->term_string));
|
||||
strncpy(command->term_string, buffer, strlen(buffer));
|
||||
}
|
||||
|
||||
24
src/GUI/command_builder.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef COMMAND_BUILDER_H
|
||||
#define COMMAND_BUILDER_H
|
||||
|
||||
#include "ccextractorGUI.h"
|
||||
#include "tabs.h"
|
||||
#include "popups.h"
|
||||
|
||||
struct built_string
|
||||
{
|
||||
char term_string[1000];
|
||||
};
|
||||
|
||||
void command_builder(struct built_string *command,
|
||||
struct main_tab *main_settings,
|
||||
struct network_popup *network_settings,
|
||||
struct input_tab *input,
|
||||
struct advanced_input_tab *advanced_input,
|
||||
struct output_tab *output,
|
||||
struct decoders_tab *decoders,
|
||||
struct credits_tab *credits,
|
||||
struct debug_tab *debug,
|
||||
struct burned_subs_tab *burned_subs);
|
||||
|
||||
#endif //!COMMAND_BUILDER_H
|
||||
575
src/GUI/file_browser.c
Normal file
@@ -0,0 +1,575 @@
|
||||
#include "file_browser.h"
|
||||
#ifdef _WIN32
|
||||
#include "win_dirent.h"
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
#endif
|
||||
#if UNIX
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <GL/glew.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef NK_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#endif
|
||||
|
||||
#include "ccextractorGUI.h"
|
||||
#include "tabs.h"
|
||||
|
||||
void
|
||||
die(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
fputs("\n", stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
char*
|
||||
file_load(const char* path, size_t* siz)
|
||||
{
|
||||
char *buf;
|
||||
FILE *fd = fopen(path, "rb");
|
||||
if (!fd) die("Failed to open file: %s\n", path);
|
||||
fseek(fd, 0, SEEK_END);
|
||||
*siz = (size_t)ftell(fd);
|
||||
fseek(fd, 0, SEEK_SET);
|
||||
buf = (char*)calloc(*siz, 1);
|
||||
fread(buf, *siz, 1, fd);
|
||||
fclose(fd);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char*
|
||||
str_duplicate(const char *src)
|
||||
{
|
||||
char *ret;
|
||||
size_t len = strlen(src);
|
||||
if (!len) return 0;
|
||||
ret = (char*)malloc(len + 1);
|
||||
if (!ret) return 0;
|
||||
memcpy(ret, src, len);
|
||||
ret[len] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
dir_free_list(char **list, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < size; ++i)
|
||||
free(list[i]);
|
||||
free(list);
|
||||
}
|
||||
|
||||
char**
|
||||
dir_list(const char *dir, int return_subdirs, size_t *count)
|
||||
{
|
||||
size_t n = 0;
|
||||
char buffer[MAX_PATH_LEN];
|
||||
char **results = NULL;
|
||||
const DIR *none = NULL;
|
||||
size_t capacity = 32;
|
||||
size_t size;
|
||||
DIR *z;
|
||||
|
||||
assert(dir);
|
||||
assert(count);
|
||||
strncpy(buffer, dir, MAX_PATH_LEN);
|
||||
n = strlen(buffer);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (n > 0 && (buffer[n - 1] != '\\'))
|
||||
buffer[n++] = '\\';
|
||||
#else
|
||||
if (n > 0 && (buffer[n - 1] != '/'))
|
||||
buffer[n++] = '/';
|
||||
#endif
|
||||
|
||||
size = 0;
|
||||
|
||||
z = opendir(dir);
|
||||
if (z != none) {
|
||||
int nonempty = 1;
|
||||
struct dirent *data = readdir(z);
|
||||
nonempty = (data != NULL);
|
||||
if (!nonempty) return NULL;
|
||||
|
||||
do {
|
||||
DIR *y;
|
||||
char *p;
|
||||
int is_subdir;
|
||||
if (data->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
strncpy(buffer + n, data->d_name, MAX_PATH_LEN - n);
|
||||
y = opendir(buffer);
|
||||
is_subdir = (y != NULL);
|
||||
if (y != NULL) closedir(y);
|
||||
|
||||
if ((return_subdirs && is_subdir) || (!is_subdir && !return_subdirs)) {
|
||||
if (!size) {
|
||||
results = (char**)calloc(sizeof(char*), capacity);
|
||||
}
|
||||
else if (size >= capacity) {
|
||||
void *old = results;
|
||||
capacity = capacity * 2;
|
||||
results = (char**)realloc(results, capacity * sizeof(char*));
|
||||
assert(results);
|
||||
if (!results) free(old);
|
||||
}
|
||||
p = str_duplicate(data->d_name);
|
||||
results[size++] = p;
|
||||
}
|
||||
} while ((data = readdir(z)) != NULL);
|
||||
}
|
||||
|
||||
if (z) closedir(z);
|
||||
*count = size;
|
||||
return results;
|
||||
}
|
||||
|
||||
struct file_group
|
||||
FILE_GROUP(enum file_groups group, const char *name, struct nk_image *icon)
|
||||
{
|
||||
struct file_group fg;
|
||||
fg.group = group;
|
||||
fg.name = name;
|
||||
fg.icon = icon;
|
||||
return fg;
|
||||
}
|
||||
|
||||
struct file
|
||||
FILE_DEF(enum file_types type, const char *suffix, enum file_groups group)
|
||||
{
|
||||
struct file fd;
|
||||
fd.type = type;
|
||||
fd.suffix = suffix;
|
||||
fd.group = group;
|
||||
return fd;
|
||||
}
|
||||
|
||||
struct nk_image*
|
||||
media_icon_for_file(struct media *media, const char *file)
|
||||
{
|
||||
int i = 0;
|
||||
const char *s = file;
|
||||
char suffix[4];
|
||||
int found = 0;
|
||||
memset(suffix, 0, sizeof(suffix));
|
||||
|
||||
/* extract suffix .xxx from file */
|
||||
while (*s++ != '\0') {
|
||||
if (found && i < 3)
|
||||
suffix[i++] = *s;
|
||||
|
||||
if (*s == '.') {
|
||||
if (found) {
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* check for all file definition of all groups for fitting suffix*/
|
||||
for (i = 0; i < FILE_MAX && found; ++i) {
|
||||
struct file *d = &media->files[i];
|
||||
{
|
||||
const char *f = d->suffix;
|
||||
s = suffix;
|
||||
while (f && *f && *s && *s == *f) {
|
||||
s++; f++;
|
||||
}
|
||||
|
||||
/* found correct file definition so */
|
||||
|
||||
if (f && *s == '\0' && *f == '\0')
|
||||
return media->group[d->group].icon;
|
||||
}
|
||||
}
|
||||
return &media->icons.default_file;
|
||||
}
|
||||
|
||||
void
|
||||
media_init(struct media *media)
|
||||
{
|
||||
/* file groups */
|
||||
struct icons *icons = &media->icons;
|
||||
media->group[FILE_GROUP_DEFAULT] = FILE_GROUP(FILE_GROUP_DEFAULT, "default", &icons->default_file);
|
||||
media->group[FILE_GROUP_TEXT] = FILE_GROUP(FILE_GROUP_TEXT, "textual", &icons->text_file);
|
||||
media->group[FILE_GROUP_MUSIC] = FILE_GROUP(FILE_GROUP_MUSIC, "music", &icons->music_file);
|
||||
media->group[FILE_GROUP_FONT] = FILE_GROUP(FILE_GROUP_FONT, "font", &icons->font_file);
|
||||
media->group[FILE_GROUP_IMAGE] = FILE_GROUP(FILE_GROUP_IMAGE, "image", &icons->img_file);
|
||||
media->group[FILE_GROUP_MOVIE] = FILE_GROUP(FILE_GROUP_MOVIE, "movie", &icons->movie_file);
|
||||
|
||||
/* files */
|
||||
media->files[FILE_DEFAULT] = FILE_DEF(FILE_DEFAULT, NULL, FILE_GROUP_DEFAULT);
|
||||
media->files[FILE_TEXT] = FILE_DEF(FILE_TEXT, "txt", FILE_GROUP_TEXT);
|
||||
media->files[FILE_C_SOURCE] = FILE_DEF(FILE_C_SOURCE, "c", FILE_GROUP_TEXT);
|
||||
media->files[FILE_CPP_SOURCE] = FILE_DEF(FILE_CPP_SOURCE, "cpp", FILE_GROUP_TEXT);
|
||||
media->files[FILE_HEADER] = FILE_DEF(FILE_HEADER, "h", FILE_GROUP_TEXT);
|
||||
media->files[FILE_CPP_HEADER] = FILE_DEF(FILE_HEADER, "hpp", FILE_GROUP_TEXT);
|
||||
media->files[FILE_MP3] = FILE_DEF(FILE_MP3, "mp3", FILE_GROUP_MUSIC);
|
||||
media->files[FILE_WAV] = FILE_DEF(FILE_WAV, "wav", FILE_GROUP_MUSIC);
|
||||
media->files[FILE_OGG] = FILE_DEF(FILE_OGG, "ogg", FILE_GROUP_MUSIC);
|
||||
media->files[FILE_TTF] = FILE_DEF(FILE_TTF, "ttf", FILE_GROUP_FONT);
|
||||
media->files[FILE_BMP] = FILE_DEF(FILE_BMP, "bmp", FILE_GROUP_IMAGE);
|
||||
media->files[FILE_PNG] = FILE_DEF(FILE_PNG, "png", FILE_GROUP_IMAGE);
|
||||
media->files[FILE_JPEG] = FILE_DEF(FILE_JPEG, "jpg", FILE_GROUP_IMAGE);
|
||||
media->files[FILE_PCX] = FILE_DEF(FILE_PCX, "pcx", FILE_GROUP_IMAGE);
|
||||
media->files[FILE_TGA] = FILE_DEF(FILE_TGA, "tga", FILE_GROUP_IMAGE);
|
||||
media->files[FILE_GIF] = FILE_DEF(FILE_GIF, "gif", FILE_GROUP_IMAGE);
|
||||
}
|
||||
|
||||
void
|
||||
file_browser_reload_directory_content(struct file_browser *browser, const char *path)
|
||||
{
|
||||
strncpy(browser->directory, path, MAX_PATH_LEN);
|
||||
dir_free_list(browser->files, browser->file_count);
|
||||
dir_free_list(browser->directories, browser->dir_count);
|
||||
browser->files = dir_list(path, 0, &browser->file_count);
|
||||
browser->directories = dir_list(path, 1, &browser->dir_count);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void
|
||||
get_drives(struct file_browser *browser)
|
||||
{
|
||||
static int drive_num;
|
||||
static char drive_list[50][4];
|
||||
int c, prev_char;
|
||||
|
||||
system("wmic logicaldisk get name 1> drive.txt");
|
||||
|
||||
FILE *file;
|
||||
file = fopen("drive.txt", "r");
|
||||
if (file == NULL)
|
||||
{
|
||||
printf("cannot find any drives! try again with different settings/permissions");
|
||||
}
|
||||
else {
|
||||
puts("File opened");
|
||||
while ((c = getc(file)) != EOF)
|
||||
{
|
||||
if (c == ':')
|
||||
{
|
||||
sprintf(drive_list[drive_num], "%c", prev_char);
|
||||
drive_num++;
|
||||
continue;
|
||||
}
|
||||
if (c < 65 || c > 90)
|
||||
continue;
|
||||
|
||||
prev_char = c;
|
||||
|
||||
}
|
||||
}
|
||||
printf("drive nums:%d\n", drive_num);
|
||||
|
||||
for (int i = 0; i < drive_num; i++)
|
||||
strcat(drive_list[i], ":\\");
|
||||
|
||||
|
||||
browser->drives_num = drive_num;
|
||||
browser->drives = (char**)calloc(drive_num + 1, sizeof(char*));
|
||||
for (int i = 0; i < drive_num; i++)
|
||||
{
|
||||
browser->drives[i] = (char*)calloc(strlen(drive_list[i]), sizeof(char));
|
||||
browser->drives[i] = strdup(drive_list[i]);
|
||||
}
|
||||
browser->drives[browser->drives_num] = NULL;
|
||||
|
||||
for (int i = 0; i< drive_num; i++)
|
||||
puts(browser->drives[i]);
|
||||
|
||||
fclose(file);
|
||||
remove("drive.txt");
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
file_browser_init(struct file_browser *browser, struct media *media)
|
||||
{
|
||||
memset(browser, 0, sizeof(*browser));
|
||||
browser->media = media;
|
||||
|
||||
#ifdef _WIN32
|
||||
get_drives(browser);
|
||||
#endif
|
||||
{
|
||||
/* load files and sub-directory list */
|
||||
const char *home = getenv("HOME");
|
||||
#ifdef _WIN32
|
||||
if (!home) home = getenv("USERPROFILE");
|
||||
#else
|
||||
if (!home) home = getpwuid(getuid());
|
||||
#endif
|
||||
{
|
||||
size_t l;
|
||||
strncpy(browser->home, home, MAX_PATH_LEN);
|
||||
l = strlen(browser->home);
|
||||
#ifdef _WIN32
|
||||
strcpy(browser->home + l, "\\");
|
||||
#else
|
||||
strcpy(browser->home + l, "/");
|
||||
#endif
|
||||
strcpy(browser->directory, browser->home);
|
||||
}
|
||||
{
|
||||
size_t l;
|
||||
strcpy(browser->desktop, browser->home);
|
||||
l = strlen(browser->desktop);
|
||||
#ifdef _WIN32
|
||||
strcpy(browser->desktop + l, "Desktop\\");
|
||||
#else
|
||||
strcpy(browser->desktop + l, "Desktop/");
|
||||
#endif
|
||||
}
|
||||
browser->files = dir_list(browser->directory, 0, &browser->file_count);
|
||||
browser->directories = dir_list(browser->directory, 1, &browser->dir_count);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
file_browser_free(struct file_browser *browser)
|
||||
{
|
||||
if (browser->files)
|
||||
dir_free_list(browser->files, browser->file_count);
|
||||
if (browser->directories)
|
||||
dir_free_list(browser->directories, browser->dir_count);
|
||||
browser->files = NULL;
|
||||
browser->directories = NULL;
|
||||
memset(browser, 0, sizeof(*browser));
|
||||
}
|
||||
|
||||
int
|
||||
file_browser_run(struct file_browser *browser,
|
||||
struct nk_context *ctx,
|
||||
struct main_tab *main_settings,
|
||||
struct output_tab *output,
|
||||
struct debug_tab *debug,
|
||||
struct hd_homerun_tab *hd_homerun)
|
||||
{
|
||||
static int isFileAdded = nk_false;
|
||||
int ret = 0;
|
||||
struct media *media = browser->media;
|
||||
struct nk_rect total_space;
|
||||
|
||||
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "File Browser", NK_WINDOW_CLOSABLE | NK_WINDOW_BORDER | NK_WINDOW_NO_SCROLLBAR | NK_WINDOW_MOVABLE,
|
||||
nk_rect(0, 0, 930, 650)))
|
||||
{
|
||||
static float ratio[] = { 0.25f, NK_UNDEFINED };
|
||||
float spacing_x = ctx->style.window.spacing.x;
|
||||
|
||||
/* output path directory selector in the menubar */
|
||||
ctx->style.window.spacing.x = 0;
|
||||
nk_menubar_begin(ctx);
|
||||
{
|
||||
char *d = browser->directory;
|
||||
char *begin = d + 1;
|
||||
nk_layout_row_dynamic(ctx, 25, 6);
|
||||
while (*d++) {
|
||||
#ifdef _WIN32
|
||||
if (*d == '\\')
|
||||
#else
|
||||
if (*d == '/')
|
||||
#endif
|
||||
{
|
||||
*d = '\0';
|
||||
if (nk_button_label(ctx, begin)) {
|
||||
#ifdef _WIN32
|
||||
*d++ = '\\';
|
||||
#else
|
||||
*d++ = '/';
|
||||
#endif
|
||||
*d = '\0';
|
||||
file_browser_reload_directory_content(browser, browser->directory);
|
||||
|
||||
break;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
*d = '\\';
|
||||
#else
|
||||
*d = '/';
|
||||
#endif
|
||||
begin = d + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
nk_menubar_end(ctx);
|
||||
ctx->style.window.spacing.x = spacing_x;
|
||||
|
||||
/* window layout */
|
||||
total_space = nk_window_get_content_region(ctx);
|
||||
nk_layout_row(ctx, NK_DYNAMIC, total_space.h, 2, ratio);
|
||||
nk_group_begin(ctx, "Special", NK_WINDOW_NO_SCROLLBAR);
|
||||
{
|
||||
struct nk_image home = media->icons.home;
|
||||
struct nk_image desktop = media->icons.desktop;
|
||||
struct nk_image computer = media->icons.computer;
|
||||
#ifdef _WIN32
|
||||
struct nk_image drive = media->icons.drives;
|
||||
#endif
|
||||
|
||||
nk_layout_row_dynamic(ctx, 40, 1);
|
||||
if (nk_button_image_label(ctx, home, "Home", NK_TEXT_CENTERED))
|
||||
file_browser_reload_directory_content(browser, browser->home);
|
||||
if (nk_button_image_label(ctx, desktop, "Desktop", NK_TEXT_CENTERED))
|
||||
file_browser_reload_directory_content(browser, browser->desktop);
|
||||
#ifdef _WIN32
|
||||
for (int drive_counter = 0; drive_counter < browser->drives_num; drive_counter++)
|
||||
{
|
||||
if (nk_button_image_label(ctx, drive, browser->drives[drive_counter], NK_TEXT_CENTERED))
|
||||
file_browser_reload_directory_content(browser, browser->drives[drive_counter]);
|
||||
}
|
||||
#else
|
||||
if (nk_button_image_label(ctx, computer, "Computer", NK_TEXT_CENTERED))
|
||||
file_browser_reload_directory_content(browser, "/");
|
||||
#endif
|
||||
nk_group_end(ctx);
|
||||
}
|
||||
|
||||
/* output directory content window */
|
||||
nk_group_begin(ctx, "Content", 0);
|
||||
{
|
||||
int index = -1;
|
||||
size_t i = 0, j = 0, k = 0;
|
||||
size_t rows = 0, cols = 0;
|
||||
size_t count = browser->dir_count + browser->file_count;
|
||||
|
||||
cols = 4;
|
||||
rows = count / cols;
|
||||
for (i = 0; i <= rows; i += 1) {
|
||||
{size_t n = j + cols;
|
||||
nk_layout_row_dynamic(ctx, 135, (int)cols);
|
||||
for (; j < count && j < n; ++j) {
|
||||
/* draw one row of icons */
|
||||
if (j < browser->dir_count) {
|
||||
/* draw and execute directory buttons */
|
||||
if (nk_button_image(ctx, media->icons.directory))
|
||||
index = (int)j;
|
||||
}
|
||||
else {
|
||||
/* draw and execute files buttons */
|
||||
struct nk_image *icon;
|
||||
size_t fileIndex = ((size_t)j - browser->dir_count);
|
||||
icon = media_icon_for_file(media, browser->files[fileIndex]);
|
||||
if (nk_button_image(ctx, *icon)) {
|
||||
strncpy(browser->file, browser->directory, MAX_PATH_LEN);
|
||||
n = strlen(browser->file);
|
||||
strncpy(browser->file + n, browser->files[fileIndex], MAX_PATH_LEN - n);
|
||||
ret = 1;
|
||||
|
||||
|
||||
if (hd_homerun->is_homerun_browser_active)
|
||||
{
|
||||
hd_homerun->location_len = strlen(browser->file);
|
||||
strncpy(hd_homerun->location, browser->file, hd_homerun->location_len);
|
||||
isFileAdded = nk_true;
|
||||
hd_homerun->is_homerun_browser_active = nk_false;
|
||||
break;
|
||||
}
|
||||
if (debug->is_debug_browser_active)
|
||||
{
|
||||
debug->elementary_stream_len = strlen(browser->file);
|
||||
strcpy(debug->elementary_stream, browser->file);
|
||||
isFileAdded = nk_true;
|
||||
debug->is_debug_browser_active = nk_false;
|
||||
break;
|
||||
}
|
||||
if (output->is_output_browser_active)
|
||||
{
|
||||
output->filename_len = strlen(browser->file);
|
||||
strcpy(output->filename, browser->file);
|
||||
isFileAdded = nk_true;
|
||||
output->is_output_browser_active = nk_false;
|
||||
break;
|
||||
}
|
||||
if (output->is_cap_browser_active)
|
||||
{
|
||||
output->cap_dictionary_len = strlen(browser->file);
|
||||
strcpy(output->cap_dictionary, browser->file);
|
||||
isFileAdded = nk_true;
|
||||
output->is_cap_browser_active = nk_false;
|
||||
break;
|
||||
}
|
||||
if (main_settings->is_file_browser_active)
|
||||
{
|
||||
if (main_settings->filename_count == 0)
|
||||
main_settings->filenames = (char**)calloc(2, sizeof(char*));
|
||||
else
|
||||
main_settings->filenames = (char**)realloc(main_settings->filenames, (main_settings->filename_count + 2) * sizeof(char*));
|
||||
|
||||
main_settings->filenames[main_settings->filename_count] = (char*)calloc((strlen(browser->file) + 5), sizeof(char));
|
||||
main_settings->filenames[main_settings->filename_count][0] = '\"';
|
||||
strcat(main_settings->filenames[main_settings->filename_count], browser->file);
|
||||
strcat(main_settings->filenames[main_settings->filename_count], "\"");
|
||||
main_settings->filename_count++;
|
||||
main_settings->filenames[main_settings->filename_count] = NULL;
|
||||
isFileAdded = nk_true;
|
||||
main_settings->is_file_browser_active = nk_false;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}}
|
||||
{size_t n = k + cols;
|
||||
nk_layout_row_dynamic(ctx, 20, (int)cols);
|
||||
for (; k < count && k < n; k++) {
|
||||
/* draw one row of labels */
|
||||
if (k < browser->dir_count) {
|
||||
nk_label(ctx, browser->directories[k], NK_TEXT_CENTERED);
|
||||
}
|
||||
else {
|
||||
size_t t = k - browser->dir_count;
|
||||
nk_label(ctx, browser->files[t], NK_TEXT_CENTERED);
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
if (index != -1) {
|
||||
size_t n = strlen(browser->directory);
|
||||
strncpy(browser->directory + n, browser->directories[index], MAX_PATH_LEN - n);
|
||||
n = strlen(browser->directory);
|
||||
if (n < MAX_PATH_LEN - 1) {
|
||||
#ifdef _WIN32
|
||||
browser->directory[n] = '\\';
|
||||
#else
|
||||
browser->directory[n] = '/';
|
||||
#endif
|
||||
browser->directory[n + 1] = '\0';
|
||||
}
|
||||
file_browser_reload_directory_content(browser, browser->directory);
|
||||
}
|
||||
nk_group_end(ctx);
|
||||
|
||||
|
||||
}
|
||||
if (isFileAdded) {
|
||||
isFileAdded = nk_false;
|
||||
main_settings->scaleWindowForFileBrowser = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
|
||||
nk_popup_end(ctx);
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
main_settings->scaleWindowForFileBrowser = nk_false;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
159
src/GUI/file_browser.h
Normal file
@@ -0,0 +1,159 @@
|
||||
#ifndef FILE_BROWSER_H
|
||||
#define FILE_BROWSER_H
|
||||
|
||||
#include "ccextractorGUI.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#ifndef STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
#endif
|
||||
#include "tabs.h"
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
*
|
||||
* GUI
|
||||
*
|
||||
* ===============================================================*/
|
||||
struct icons {
|
||||
struct nk_image desktop;
|
||||
#ifdef _WIN32
|
||||
struct nk_image drives;
|
||||
#endif
|
||||
struct nk_image home;
|
||||
struct nk_image computer;
|
||||
struct nk_image directory;
|
||||
|
||||
struct nk_image default_file;
|
||||
struct nk_image text_file;
|
||||
struct nk_image music_file;
|
||||
struct nk_image font_file;
|
||||
struct nk_image img_file;
|
||||
struct nk_image movie_file;
|
||||
};
|
||||
|
||||
enum file_groups {
|
||||
FILE_GROUP_DEFAULT,
|
||||
FILE_GROUP_TEXT,
|
||||
FILE_GROUP_MUSIC,
|
||||
FILE_GROUP_FONT,
|
||||
FILE_GROUP_IMAGE,
|
||||
FILE_GROUP_MOVIE,
|
||||
FILE_GROUP_MAX
|
||||
};
|
||||
|
||||
enum file_types {
|
||||
FILE_DEFAULT,
|
||||
FILE_TEXT,
|
||||
FILE_C_SOURCE,
|
||||
FILE_CPP_SOURCE,
|
||||
FILE_HEADER,
|
||||
FILE_CPP_HEADER,
|
||||
FILE_MP3,
|
||||
FILE_WAV,
|
||||
FILE_OGG,
|
||||
FILE_TTF,
|
||||
FILE_BMP,
|
||||
FILE_PNG,
|
||||
FILE_JPEG,
|
||||
FILE_PCX,
|
||||
FILE_TGA,
|
||||
FILE_GIF,
|
||||
FILE_MAX
|
||||
};
|
||||
|
||||
struct file_group {
|
||||
enum file_groups group;
|
||||
const char *name;
|
||||
struct nk_image *icon;
|
||||
};
|
||||
|
||||
struct file {
|
||||
enum file_types type;
|
||||
const char *suffix;
|
||||
enum file_groups group;
|
||||
};
|
||||
|
||||
struct media {
|
||||
int font;
|
||||
int icon_sheet;
|
||||
struct icons icons;
|
||||
struct file_group group[FILE_GROUP_MAX];
|
||||
struct file files[FILE_MAX];
|
||||
};
|
||||
|
||||
#define MAX_PATH_LEN 512
|
||||
struct file_browser {
|
||||
/* path */
|
||||
char file[MAX_PATH_LEN];
|
||||
char home[MAX_PATH_LEN];
|
||||
char desktop[MAX_PATH_LEN];
|
||||
char directory[MAX_PATH_LEN];
|
||||
#ifdef _WIN32
|
||||
char **drives;
|
||||
int drives_num;
|
||||
#endif
|
||||
|
||||
/* directory content */
|
||||
char **files;
|
||||
char **directories;
|
||||
size_t file_count;
|
||||
size_t dir_count;
|
||||
struct media *media;
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
die(const char *fmt, ...);
|
||||
|
||||
char*
|
||||
file_load(const char* path, size_t* siz);
|
||||
|
||||
char*
|
||||
str_duplicate(const char *src);
|
||||
|
||||
void
|
||||
dir_free_list(char **list, size_t size);
|
||||
|
||||
char**
|
||||
dir_list(const char *dir, int return_subdirs, size_t *count);
|
||||
|
||||
struct file_group
|
||||
FILE_GROUP(enum file_groups group, const char *name, struct nk_image *icon);
|
||||
|
||||
struct file
|
||||
FILE_DEF(enum file_types type, const char *suffix, enum file_groups group);
|
||||
|
||||
struct nk_image*
|
||||
media_icon_for_file(struct media *media, const char *file);
|
||||
|
||||
void
|
||||
media_init(struct media *media);
|
||||
|
||||
void
|
||||
file_browser_reload_directory_content(struct file_browser *browser, const char *path);
|
||||
|
||||
#if _WIN32
|
||||
void
|
||||
get_drives(struct file_browser *browser);
|
||||
#endif
|
||||
|
||||
void
|
||||
file_browser_init(struct file_browser *browser, struct media *media);
|
||||
|
||||
void
|
||||
file_browser_free(struct file_browser *browser);
|
||||
|
||||
int
|
||||
file_browser_run(struct file_browser *browser,
|
||||
struct nk_context *ctx,
|
||||
struct main_tab *main_settings,
|
||||
struct output_tab *output,
|
||||
struct debug_tab *debug,
|
||||
struct hd_homerun_tab *hd_homerun);
|
||||
|
||||
struct nk_image
|
||||
icon_load(const char *filename);
|
||||
|
||||
#endif
|
||||
22285
src/GUI/nuklear_lib/nuklear.h
Normal file
352
src/GUI/nuklear_lib/nuklear_glfw_gl2.h
Normal file
@@ -0,0 +1,352 @@
|
||||
/*
|
||||
* Nuklear - v1.32.0 - public domain
|
||||
* no warrenty implied; use at your own risk.
|
||||
* authored from 2015-2017 by Micha Mettke
|
||||
*/
|
||||
/*
|
||||
* ==============================================================
|
||||
*
|
||||
* API
|
||||
*
|
||||
* ===============================================================
|
||||
*/
|
||||
#ifndef NK_GLFW_GL2_H_
|
||||
#define NK_GLFW_GL2_H_
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
enum nk_glfw_init_state{
|
||||
NK_GLFW3_DEFAULT = 0,
|
||||
NK_GLFW3_INSTALL_CALLBACKS
|
||||
};
|
||||
NK_API struct nk_context* nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state);
|
||||
NK_API void nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas);
|
||||
NK_API void nk_glfw3_font_stash_end(void);
|
||||
|
||||
NK_API void nk_glfw3_new_frame(void);
|
||||
NK_API void nk_glfw3_render(enum nk_anti_aliasing);
|
||||
NK_API void nk_glfw3_shutdown(void);
|
||||
|
||||
NK_API void nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint);
|
||||
NK_API void nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ==============================================================
|
||||
*
|
||||
* IMPLEMENTATION
|
||||
*
|
||||
* ===============================================================
|
||||
*/
|
||||
#ifdef NK_GLFW_GL2_IMPLEMENTATION
|
||||
|
||||
#ifndef NK_GLFW_TEXT_MAX
|
||||
#define NK_GLFW_TEXT_MAX 256
|
||||
#endif
|
||||
|
||||
struct nk_glfw_device {
|
||||
struct nk_buffer cmds;
|
||||
struct nk_draw_null_texture null;
|
||||
GLuint font_tex;
|
||||
GLint uniform_tex;
|
||||
GLint uniform_proj;
|
||||
};
|
||||
|
||||
struct nk_glfw_vertex {
|
||||
float position[2];
|
||||
float uv[2];
|
||||
nk_byte col[4];
|
||||
};
|
||||
|
||||
static struct nk_glfw {
|
||||
GLFWwindow *win;
|
||||
int width, height;
|
||||
int display_width, display_height;
|
||||
struct nk_glfw_device ogl;
|
||||
struct nk_context ctx;
|
||||
struct nk_font_atlas atlas;
|
||||
struct nk_vec2 fb_scale;
|
||||
unsigned int text[NK_GLFW_TEXT_MAX];
|
||||
int text_len;
|
||||
float scroll;
|
||||
} glfw;
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_device_upload_atlas(const void *image, int width, int height)
|
||||
{
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
glGenTextures(1, &dev->font_tex);
|
||||
glBindTexture(GL_TEXTURE_2D, dev->font_tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, image);
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_render(enum nk_anti_aliasing AA)
|
||||
{
|
||||
/* setup global state */
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
glPushAttrib(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_TRANSFORM_BIT);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
/* setup viewport/project */
|
||||
glViewport(0,0,(GLsizei)glfw.display_width,(GLsizei)glfw.display_height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(0.0f, glfw.width, glfw.height, 0.0f, -1.0f, 1.0f);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
{
|
||||
GLsizei vs = sizeof(struct nk_glfw_vertex);
|
||||
size_t vp = offsetof(struct nk_glfw_vertex, position);
|
||||
size_t vt = offsetof(struct nk_glfw_vertex, uv);
|
||||
size_t vc = offsetof(struct nk_glfw_vertex, col);
|
||||
|
||||
/* convert from command queue into draw list and draw to screen */
|
||||
const struct nk_draw_command *cmd;
|
||||
const nk_draw_index *offset = NULL;
|
||||
struct nk_buffer vbuf, ebuf;
|
||||
|
||||
/* fill convert configuration */
|
||||
struct nk_convert_config config;
|
||||
static const struct nk_draw_vertex_layout_element vertex_layout[] = {
|
||||
{NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, position)},
|
||||
{NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, uv)},
|
||||
{NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_glfw_vertex, col)},
|
||||
{NK_VERTEX_LAYOUT_END}
|
||||
};
|
||||
NK_MEMSET(&config, 0, sizeof(config));
|
||||
config.vertex_layout = vertex_layout;
|
||||
config.vertex_size = sizeof(struct nk_glfw_vertex);
|
||||
config.vertex_alignment = NK_ALIGNOF(struct nk_glfw_vertex);
|
||||
config.null = dev->null;
|
||||
config.circle_segment_count = 22;
|
||||
config.curve_segment_count = 22;
|
||||
config.arc_segment_count = 22;
|
||||
config.global_alpha = 1.0f;
|
||||
config.shape_AA = AA;
|
||||
config.line_AA = AA;
|
||||
|
||||
/* convert shapes into vertexes */
|
||||
nk_buffer_init_default(&vbuf);
|
||||
nk_buffer_init_default(&ebuf);
|
||||
nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);
|
||||
|
||||
/* setup vertex buffer pointer */
|
||||
{const void *vertices = nk_buffer_memory_const(&vbuf);
|
||||
glVertexPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vp));
|
||||
glTexCoordPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vt));
|
||||
glColorPointer(4, GL_UNSIGNED_BYTE, vs, (const void*)((const nk_byte*)vertices + vc));}
|
||||
|
||||
/* iterate over and execute each draw command */
|
||||
offset = (const nk_draw_index*)nk_buffer_memory_const(&ebuf);
|
||||
nk_draw_foreach(cmd, &glfw.ctx, &dev->cmds)
|
||||
{
|
||||
if (!cmd->elem_count) continue;
|
||||
glBindTexture(GL_TEXTURE_2D, (GLuint)cmd->texture.id);
|
||||
glScissor(
|
||||
(GLint)(cmd->clip_rect.x * glfw.fb_scale.x),
|
||||
(GLint)((glfw.height - (GLint)(cmd->clip_rect.y + cmd->clip_rect.h)) * glfw.fb_scale.y),
|
||||
(GLint)(cmd->clip_rect.w * glfw.fb_scale.x),
|
||||
(GLint)(cmd->clip_rect.h * glfw.fb_scale.y));
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei)cmd->elem_count, GL_UNSIGNED_SHORT, offset);
|
||||
offset += cmd->elem_count;
|
||||
}
|
||||
nk_clear(&glfw.ctx);
|
||||
nk_buffer_free(&vbuf);
|
||||
nk_buffer_free(&ebuf);
|
||||
}
|
||||
|
||||
/* default OpenGL state */
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
|
||||
{
|
||||
(void)win;
|
||||
if (glfw.text_len < NK_GLFW_TEXT_MAX)
|
||||
glfw.text[glfw.text_len++] = codepoint;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
|
||||
{
|
||||
(void)win; (void)xoff;
|
||||
glfw.scroll += (float)yoff;
|
||||
}
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
|
||||
{
|
||||
const char *text = glfwGetClipboardString(glfw.win);
|
||||
if (text) nk_textedit_paste(edit, text, nk_strlen(text));
|
||||
(void)usr;
|
||||
}
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)
|
||||
{
|
||||
char *str = 0;
|
||||
(void)usr;
|
||||
if (!len) return;
|
||||
str = (char*)malloc((size_t)len+1);
|
||||
if (!str) return;
|
||||
memcpy(str, text, (size_t)len);
|
||||
str[len] = '\0';
|
||||
glfwSetClipboardString(glfw.win, str);
|
||||
free(str);
|
||||
}
|
||||
|
||||
NK_API struct nk_context*
|
||||
nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)
|
||||
{
|
||||
glfw.win = win;
|
||||
if (init_state == NK_GLFW3_INSTALL_CALLBACKS) {
|
||||
glfwSetScrollCallback(win, nk_gflw3_scroll_callback);
|
||||
glfwSetCharCallback(win, nk_glfw3_char_callback);
|
||||
}
|
||||
|
||||
nk_init_default(&glfw.ctx, 0);
|
||||
glfw.ctx.clip.copy = nk_glfw3_clipbard_copy;
|
||||
glfw.ctx.clip.paste = nk_glfw3_clipbard_paste;
|
||||
glfw.ctx.clip.userdata = nk_handle_ptr(0);
|
||||
nk_buffer_init_default(&glfw.ogl.cmds);
|
||||
return &glfw.ctx;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)
|
||||
{
|
||||
nk_font_atlas_init_default(&glfw.atlas);
|
||||
nk_font_atlas_begin(&glfw.atlas);
|
||||
*atlas = &glfw.atlas;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_font_stash_end(void)
|
||||
{
|
||||
const void *image; int w, h;
|
||||
image = nk_font_atlas_bake(&glfw.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);
|
||||
nk_glfw3_device_upload_atlas(image, w, h);
|
||||
nk_font_atlas_end(&glfw.atlas, nk_handle_id((int)glfw.ogl.font_tex), &glfw.ogl.null);
|
||||
if (glfw.atlas.default_font)
|
||||
nk_style_set_font(&glfw.ctx, &glfw.atlas.default_font->handle);
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_new_frame(void)
|
||||
{
|
||||
int i;
|
||||
double x, y;
|
||||
struct nk_context *ctx = &glfw.ctx;
|
||||
struct GLFWwindow *win = glfw.win;
|
||||
|
||||
glfwGetWindowSize(win, &glfw.width, &glfw.height);
|
||||
glfwGetFramebufferSize(win, &glfw.display_width, &glfw.display_height);
|
||||
glfw.fb_scale.x = (float)glfw.display_width/(float)glfw.width;
|
||||
glfw.fb_scale.y = (float)glfw.display_height/(float)glfw.height;
|
||||
|
||||
nk_input_begin(ctx);
|
||||
for (i = 0; i < glfw.text_len; ++i)
|
||||
nk_input_unicode(ctx, glfw.text[i]);
|
||||
|
||||
/* optional grabbing behavior */
|
||||
if (ctx->input.mouse.grab)
|
||||
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
else if (ctx->input.mouse.ungrab)
|
||||
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
|
||||
nk_input_key(ctx, NK_KEY_DEL, glfwGetKey(win, GLFW_KEY_DELETE) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_ENTER, glfwGetKey(win, GLFW_KEY_ENTER) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TAB, glfwGetKey(win, GLFW_KEY_TAB) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_BACKSPACE, glfwGetKey(win, GLFW_KEY_BACKSPACE) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_UP, glfwGetKey(win, GLFW_KEY_UP) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_DOWN, glfwGetKey(win, GLFW_KEY_DOWN) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_DOWN, glfwGetKey(win, GLFW_KEY_PAGE_DOWN) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_UP, glfwGetKey(win, GLFW_KEY_PAGE_UP) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SHIFT, glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS||
|
||||
glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
|
||||
|
||||
if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
|
||||
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {
|
||||
nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_V) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_UNDO, glfwGetKey(win, GLFW_KEY_Z) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_REDO, glfwGetKey(win, GLFW_KEY_R) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_LINE_START, glfwGetKey(win, GLFW_KEY_B) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, glfwGetKey(win, GLFW_KEY_E) == GLFW_PRESS);
|
||||
} else {
|
||||
nk_input_key(ctx, NK_KEY_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_COPY, 0);
|
||||
nk_input_key(ctx, NK_KEY_PASTE, 0);
|
||||
nk_input_key(ctx, NK_KEY_CUT, 0);
|
||||
nk_input_key(ctx, NK_KEY_SHIFT, 0);
|
||||
}
|
||||
|
||||
glfwGetCursorPos(win, &x, &y);
|
||||
nk_input_motion(ctx, (int)x, (int)y);
|
||||
if (ctx->input.mouse.grabbed) {
|
||||
glfwSetCursorPos(glfw.win, ctx->input.mouse.prev.x, ctx->input.mouse.prev.y);
|
||||
ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;
|
||||
ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;
|
||||
}
|
||||
|
||||
nk_input_button(ctx, NK_BUTTON_LEFT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS);
|
||||
nk_input_button(ctx, NK_BUTTON_MIDDLE, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS);
|
||||
nk_input_button(ctx, NK_BUTTON_RIGHT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS);
|
||||
nk_input_scroll(ctx, glfw.scroll);
|
||||
nk_input_end(&glfw.ctx);
|
||||
glfw.text_len = 0;
|
||||
glfw.scroll = 0;
|
||||
}
|
||||
|
||||
NK_API
|
||||
void nk_glfw3_shutdown(void)
|
||||
{
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
nk_font_atlas_clear(&glfw.atlas);
|
||||
nk_free(&glfw.ctx);
|
||||
glDeleteTextures(1, &dev->font_tex);
|
||||
nk_buffer_free(&dev->cmds);
|
||||
memset(&glfw, 0, sizeof(glfw));
|
||||
}
|
||||
|
||||
#endif
|
||||
312
src/GUI/popups.c
Normal file
@@ -0,0 +1,312 @@
|
||||
#ifndef NK_IMPLEMENTATION
|
||||
#include "nuklear_lib/nuklear.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif // !NK_IMPLEMENTATION
|
||||
#include "tabs.h"
|
||||
#include "popups.h"
|
||||
|
||||
void setup_network_settings(struct network_popup *network_settings)
|
||||
{
|
||||
network_settings->show_network_settings = nk_false;
|
||||
network_settings->save_network_settings = nk_false;
|
||||
strcpy(network_settings->udp_ipv4, "None");
|
||||
network_settings->udp_ipv4_len = strlen(network_settings->udp_ipv4);
|
||||
strcpy(network_settings->tcp_pass, "None");
|
||||
network_settings->tcp_pass_len = strlen(network_settings->tcp_pass);
|
||||
strcpy(network_settings->tcp_desc, "None");
|
||||
network_settings->tcp_desc_len = strlen(network_settings->tcp_desc);
|
||||
strcpy(network_settings->send_port, "None");
|
||||
network_settings->send_port_len = strlen(network_settings->send_port);
|
||||
strcpy(network_settings->send_host, "None");
|
||||
network_settings->send_host_len = strlen(network_settings->send_host);
|
||||
}
|
||||
|
||||
void draw_network_popup(struct nk_context *ctx, struct network_popup *network_settings)
|
||||
{
|
||||
const float save_ok_ratio[] = { 0.8f,0.1f,0.1f };
|
||||
const float udp_tcp_ratio[] = { 0.45f,0.1f,0.45f };
|
||||
static char udp_ipv4_buffer[30];
|
||||
static int udp_ipv4_len[30];
|
||||
static char tcp_pass_buf[30];
|
||||
static int tcp_pass_len[30];
|
||||
static char tcp_desc_buf[30];
|
||||
static int tcp_desc_len[30];
|
||||
static char send_port_buf[30];
|
||||
static int send_port_len[30];
|
||||
static char send_host_buf[30];
|
||||
static int send_host_len[30];
|
||||
const char network_attr[][30] = { "-udp port:", "-udp [host:]port:","-sendto host[:port]:","-tcp port:","-tcppassword password:", "-tcpdesc description:" };
|
||||
static struct nk_rect s = { 20,30,480,500 };
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Network Settings", NK_WINDOW_CLOSABLE|NK_WINDOW_NO_SCROLLBAR, s))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 220, 1);
|
||||
if(nk_group_begin(ctx, "Receive", NK_WINDOW_TITLE ))
|
||||
{
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 21, 3, udp_tcp_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_label(ctx, "UDP:", NK_TEXT_CENTERED);
|
||||
nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, "Hostname/IPv4 Address:", NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, network_settings->udp_ipv4, &network_settings->udp_ipv4_len, 50, nk_filter_default);
|
||||
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 21, 3, udp_tcp_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_label(ctx, "TCP:", NK_TEXT_CENTERED);
|
||||
nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, "Password:", NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, network_settings->tcp_pass, &network_settings->tcp_pass_len, 25, nk_filter_default);
|
||||
nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, "Description:", NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, network_settings->tcp_desc, &network_settings->tcp_desc_len, 25, nk_filter_default);
|
||||
|
||||
nk_group_end(ctx);
|
||||
}
|
||||
|
||||
nk_layout_row_dynamic(ctx, 200, 1);
|
||||
if (nk_group_begin(ctx, "Send", NK_WINDOW_TITLE ))
|
||||
{
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 21, 3, udp_tcp_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_label(ctx, "Send to:", NK_TEXT_CENTERED);
|
||||
nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, "Port:", NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, network_settings->send_port, &network_settings->send_port_len, 25, nk_filter_default);
|
||||
nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, "Host:", NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, network_settings->send_host, &network_settings->send_host_len, 25, nk_filter_default);
|
||||
|
||||
nk_group_end(ctx);
|
||||
}
|
||||
|
||||
/*nk_layout_row_static(ctx, 20, 200, 2);
|
||||
nk_label(ctx, network_attr[5], NK_TEXT_LEFT);
|
||||
nk_edit_string(ctx, NK_EDIT_SIMPLE, text_buffer[5], &text_len[5], 50, nk_filter_default);*/
|
||||
|
||||
//OK Button
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 27, 3, save_ok_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_button_label(ctx, "Save")) {
|
||||
network_settings->save_network_settings = nk_true;
|
||||
network_settings->show_network_settings = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
if (nk_button_label(ctx, "OK")) {
|
||||
network_settings->save_network_settings = nk_false;
|
||||
network_settings->show_network_settings = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
else
|
||||
network_settings->show_network_settings = nk_false;
|
||||
}
|
||||
|
||||
void draw_getting_started_popup(struct nk_context *ctx, int *show_getting_started)
|
||||
{
|
||||
static struct nk_rect s = { 20,30,480,500 };
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Getting Started", NK_WINDOW_CLOSABLE, s))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 80, 1);
|
||||
nk_label_wrap(ctx, "Getting Started information about CCX will come here! This popup will be populated at the end.");
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
else
|
||||
*show_getting_started = nk_false;
|
||||
}
|
||||
|
||||
void draw_about_ccx_popup(struct nk_context *ctx, int *show_about_ccx, struct nk_user_font *droid_big, struct nk_user_font *droid_head)
|
||||
{
|
||||
const float ccx_ratio[] = { 0.3f,0.4f,0.3f };
|
||||
const float ok_ratio[] = { 0.9f,0.1f };
|
||||
static struct nk_rect s = { 20,30,480,500};
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "About CCExtractor", NK_WINDOW_CLOSABLE|NK_WINDOW_NO_SCROLLBAR, s))
|
||||
{
|
||||
nk_style_push_font(ctx, droid_big);
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 30, 3, ccx_ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
nk_label_wrap(ctx, "About CCExtractor"/*, NK_TEXT_LEFT*/);
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 390, 1);
|
||||
if (nk_group_begin(ctx, "About CCExtractor", NK_WINDOW_BACKGROUND))
|
||||
{
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "What's CCExtractor?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 65, 1);
|
||||
nk_label_wrap(ctx, "A tool that analyzes video files and produces independent subtitle files from the closed captions data. CCExtractor is portable, small, and very fast. It works in Linux, Windows, and OSX.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "What kind of closed captions does CCExtractor support?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 47, 1);
|
||||
nk_label_wrap(ctx, "American TV captions (CEA-608 is well supported, and CEA-708 is starting to look good) and Teletext based European subtitles.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "How easy is it to use CCExtractor?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 30, 1);
|
||||
nk_label_wrap(ctx, "Very. Just tell it what file to process and it does everything for you.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "CCExtractor integration with other tools");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 147, 1);
|
||||
nk_label_wrap(ctx, "It is possible to integrate CCExtractor in a larger process. A couple of tools already call CCExtractor as part their video process - this way they get subtitle support for free. Starting in 0.52, CCExtractor is very front - end friendly.Front - ends can easily get real - time status information.The GUI source code is provided and can be used for reference. Any tool, commercial or not, is specifically allowed to use CCExtractor for any use the authors seem fit. So if your favourite video tools still lacks captioning tool, feel free to send the authors here.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 50, 1);
|
||||
nk_label_wrap(ctx, "What's the point of generating separate files for subtitles, if they are already in the source file?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 367, 1);
|
||||
nk_label_wrap(ctx, "There are several reasons to have subtitles separated from the video file, including: - Closed captions never survive MPEG processing. If you take a MPEG file and encode it to any format (such as divx), your result file will not have closed captions. This means that if you want to keep the subtitles, you need to keep the original file. This is hardly practical if you are archiving HDTV shows for example. - Subtitles files are small - so small (around 250 Kb for a movie) that you can quickly download them, or email them, etc, in case you have a recording without subtitles. - Subtitles files are indexable: You can have a database with all your subtitles if you want (there are many available), so you can search the dialogs. - Subtitles files are a de-facto standard: Almost every player can use them. In fact, many setbox players accept subtitles files in .srt format - so you can have subtitles in your divx movies and not just in your original DVDs. - Closed captions are stored in many different formats by capture cards. Upgrading to a new card, if it comes with a new player, may mean that you can't use your previously recorded closed captions, even if the audio/video are fine. - Closed captions require a closed caption decoder. All US TV have one (it's a legal requirement), but no European TV does, since there are not closed captions in Europe (teletext is used instead). Basically this means that if you buy a DVD in the US which has closed captions but no DVD subtitles, you are out of luck. This is a problem with many (most) old TV shows DVDs, which only come with closed captions. DVD producers don't bother doing DVD subs, since it's another way to segment the market, same as with DVD regions. ");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "How I do use subtitles once they are in a separate file?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 80, 1);
|
||||
nk_label_wrap(ctx, "CCExtractor generates files in the two most common formats: .srt (SubRip) and .smi (which is a Microsoft standard). Most players support at least .srt natively. You just need to name the .srt file as the file you want to play it with, for example sample.avi and sample.srt.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "What kind of files can I extract closed captions from?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "CCExtractor currently handles:");
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- DVDs.");
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- Most HDTV captures(where you save the Transport Stream).");
|
||||
nk_layout_row_dynamic(ctx, 52, 1);
|
||||
nk_label_wrap(ctx, "- Captures where captions are recorded in bttv format.The number of cards that use this card is huge.My test samples came from a Hauppage PVR - 250. You can check the complete list here:");
|
||||
nk_layout_row_dynamic(ctx, 40, 1);
|
||||
nk_label_colored_wrap(ctx, "http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux/CARDLIST.bttv", nk_rgb(61, 117, 206));
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- DVR - MS(microsoft digital video recording).");
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- Tivo files");
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- ReplayTV files");
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
nk_label_wrap(ctx, "- Dish Network files");
|
||||
nk_layout_row_dynamic(ctx, 80, 1);
|
||||
nk_label_wrap(ctx, "Usually, if you record a TV show with your capture card and CCExtractor produces the expected result, it will work for your all recordings.If it doesn't, which means that your card uses a format CCExtractor can't handle, please contact me and we'll try to make it work.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "Can I edit the subtitles? ");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 43, 1);
|
||||
nk_label_wrap(ctx, ".srt files are just text files, with time information (when subtitles are supposed to be shown and for how long) and some basic formatting (use italics, bold, etc). So you can edit them with any text editor. If you need to do serious editing (such as adjusting timing), you can use subtitle editing tools - there are many available.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "Can CCExtractor generate other subtitles formats?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "At this time, CCExtractor can generate .srt, .smi and raw and bin files.");
|
||||
|
||||
nk_style_push_font(ctx, droid_head);
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "How I can contact the author?");
|
||||
nk_style_pop_font(ctx);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 23, 1);
|
||||
nk_label_wrap(ctx, "Send me an email: carlos@ccextractor.org");
|
||||
|
||||
|
||||
nk_group_end(ctx);
|
||||
}
|
||||
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 27, 2, ok_ratio);
|
||||
nk_spacing(ctx,1);
|
||||
if (nk_button_label(ctx, "OK")) {
|
||||
*show_about_ccx = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
else
|
||||
*show_about_ccx = nk_false;
|
||||
}
|
||||
|
||||
void draw_progress_details_popup(struct nk_context *ctx, int *show_progress_details, struct main_tab *main_settings)
|
||||
{
|
||||
static struct nk_rect s = { 20,30,480,500 };
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Progress Details of Extraction", NK_WINDOW_CLOSABLE, s))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 20, 1);
|
||||
for( int i = 0; i < main_settings->activity_string_count; i++)
|
||||
nk_label_wrap(ctx, main_settings->activity_string[i]);
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
else
|
||||
*show_progress_details = nk_false;
|
||||
}
|
||||
|
||||
void draw_color_popup(struct nk_context *ctx, struct output_tab *output)
|
||||
{
|
||||
static struct nk_rect s = { 250,250,200,230 };
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Color Picker", NK_WINDOW_TITLE |NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_BORDER, s))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 160, 1);
|
||||
output->color_rgb = nk_color_picker(ctx, output->color_rgb, NK_RGBA);
|
||||
|
||||
nk_layout_row_dynamic(ctx, 25, 3);
|
||||
nk_spacing(ctx, 1);
|
||||
if (nk_button_label(ctx, "OK")) {
|
||||
show_color_from_picker = nk_true;
|
||||
output->color_popup = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
nk_spacing(ctx, 1);
|
||||
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
else
|
||||
output->color_popup = nk_false;
|
||||
}
|
||||
|
||||
|
||||
void draw_thread_popup(struct nk_context *ctx, int *show_thread_popup)
|
||||
{
|
||||
static struct nk_rect s = { 100, 100, 300, 175 };
|
||||
static const float ratio[] = { 0.85f, 0.15f };
|
||||
if (nk_popup_begin(ctx, NK_POPUP_STATIC, "File Read Error",
|
||||
NK_WINDOW_TITLE | NK_WINDOW_NO_SCROLLBAR | NK_WINDOW_BORDER, s))
|
||||
{
|
||||
nk_layout_row_dynamic(ctx, 25, 1);
|
||||
nk_label(ctx, "Cannot read file.", NK_TEXT_CENTERED);
|
||||
nk_layout_row_dynamic(ctx, 60, 1);
|
||||
nk_label_wrap(ctx, "Make sure the directory isn't write protected OR you are running the program with write permissions.");
|
||||
|
||||
|
||||
nk_layout_row(ctx, NK_DYNAMIC, 25, 2, ratio);
|
||||
nk_spacing(ctx, 1);
|
||||
if(nk_button_label(ctx, "OK"))
|
||||
{
|
||||
*show_thread_popup = nk_false;
|
||||
nk_popup_close(ctx);
|
||||
}
|
||||
nk_popup_end(ctx);
|
||||
}
|
||||
|
||||
else
|
||||
*show_thread_popup = nk_false;
|
||||
}
|
||||