From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-video/noad/Manifest | 19 ++++ media-video/noad/files/confd_vdraddon.noad | 71 ++++++++++++++ media-video/noad/files/noad-reccmd | 7 ++ .../patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff | 13 +++ .../files/patches-0.7.x/noad-0.7.3-hangcheck.diff | 21 ++++ .../files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff | 17 ++++ .../patches-0.7.x/noad-0.7.3_missing_include.diff | 14 +++ .../files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch | 16 ++++ .../files/patches-0.8.x/noad-0.8.6-libav9.diff | 106 +++++++++++++++++++++ media-video/noad/files/pre-shutdown-15-noad.sh | 41 ++++++++ media-video/noad/files/reccmds.noad.conf | 1 + media-video/noad/files/record-50-noad.sh | 66 +++++++++++++ media-video/noad/metadata.xml | 18 ++++ media-video/noad/noad-0.7.3-r1.ebuild | 88 +++++++++++++++++ media-video/noad/noad-0.8.6-r1.ebuild | 79 +++++++++++++++ media-video/noad/noad-0.8.6-r2.ebuild | 83 ++++++++++++++++ 16 files changed, 660 insertions(+) create mode 100644 media-video/noad/Manifest create mode 100644 media-video/noad/files/confd_vdraddon.noad create mode 100644 media-video/noad/files/noad-reccmd create mode 100644 media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff create mode 100644 media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff create mode 100644 media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff create mode 100644 media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff create mode 100644 media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch create mode 100644 media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff create mode 100644 media-video/noad/files/pre-shutdown-15-noad.sh create mode 100644 media-video/noad/files/reccmds.noad.conf create mode 100644 media-video/noad/files/record-50-noad.sh create mode 100644 media-video/noad/metadata.xml create mode 100644 media-video/noad/noad-0.7.3-r1.ebuild create mode 100644 media-video/noad/noad-0.8.6-r1.ebuild create mode 100644 media-video/noad/noad-0.8.6-r2.ebuild (limited to 'media-video/noad') diff --git a/media-video/noad/Manifest b/media-video/noad/Manifest new file mode 100644 index 000000000000..6c31225c6ca1 --- /dev/null +++ b/media-video/noad/Manifest @@ -0,0 +1,19 @@ +AUX confd_vdraddon.noad 1353 SHA256 a005321a684f5e7585b269eebc4e89e2240e512572716f349b00243abd8ba780 SHA512 7d516aa290451ed79e010ba5f084ff120d1bb4e9cda68ff3a66a3b35786856dc9a6ebbf84df9f1d8d33f9ab3287018032377f675523b93edb89523fea456b29b WHIRLPOOL f337fc6487fa7e140294054f96dc4e99d67785dcbe5424f4ae7b708224ae490e38a3467d0dae84865bdfcb5c2c972712d0a432c79975380003bda96c59402c94 +AUX noad-reccmd 145 SHA256 f9d3c963f1c745cd671925c1a48c5e4785cfc913c416dc0fd5963ff625e4a653 SHA512 83e53b1ff4af56ab188ea43ec34b843447101bd71f4eaa93b88892df8c5ff66160fbd441f13e19f7e73a5f6e193aacc003465ae174ad06ee3ae49a5c0977a60d WHIRLPOOL 2f10953c98ded5a0d21d43e39cb279fa21a1a4927b80c2f9a7b07405a415ccc45f632bacb1894bb623753d2e523b00bda4ccb087a0a5ead2b5e714b7800ec328 +AUX patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff 603 SHA256 f17857969d8dd121b9f92671977abce3a3b986bd2ecc15b7529ff4ada42d8083 SHA512 32bbefe976fbe556d468365fb96dd10137178c58aab8f996d7312afddad9e99000e08ab2b93a411f6a1dac7542619eec49d9287ef2d613b2ad35fb62b327df45 WHIRLPOOL 80a6d71f9a8fec3854be89cc3a87d4237b4bdfb8f609ebb09cc706d2c632263736a273140809c65f8e3d9c4802f010a07ec6ce5e3b170f8990f09e4aba507935 +AUX patches-0.7.x/noad-0.7.3-hangcheck.diff 617 SHA256 0919ce88b855a026db642e5071d7cf6a81c90068ce1703bdd28d1551fee34f46 SHA512 b426c4999f534b2940849f5f647c06d76c282d6f4f74e44c729de847b8ffd2699e242a29762a4407615ed44394495775df0aaf8220238c5baf9bf548111103ff WHIRLPOOL 8a268951d3f40ad49aa65529b4c880c89d691ecc637f8d43e8967fc67a250a73565a6d88d73b37e804af6221eef3084f89984940cc7f0750ad7d599612efc7b1 +AUX patches-0.7.x/noad-0.7.3_gcc-4.7.diff 527 SHA256 571a5b208370ce1336b6ccb4d60a0b27f216c4682548f1d9097ef05463a2ae3f SHA512 ddcaea8a324cd634a294881cf272be211a42edb317e3342f28166b211584a5599b1f8ab9869dfa56983d50ff78e3e27a163ca7d752fd8efca009ba3a01e539d4 WHIRLPOOL 58dd60e895fbd16cf71bc6af26fd3a401d5f1a4a88964775a8b56b8c0f9b5f1c46316d2841db888f5204e231f87f44f6fc058d5d8196cee4216a019c43ee0702 +AUX patches-0.7.x/noad-0.7.3_missing_include.diff 277 SHA256 23d1e0bafdf120ce6e38393054d64ba7807e5579b93d3daf96179531dc4c431f SHA512 6c0c03597f71d71efbcd80ec3d4c2df8f38ff8e46140232c95e4d0ed354da9932b80ab9587dfe9376fd29670b7154cef1a33974c739eaf5981048f21844208c3 WHIRLPOOL d4fac30d385b76482e981368eb7fbf5444c4b0ba084be43c70b61ea6673147927b727992680eb5eefae99001b54cec42edab93982b3b19867e3877901a79bca7 +AUX patches-0.8.x/noad-0.8.6-ffmpeg25.patch 459 SHA256 47ffe91cd2d467edbd2cd681165e09551b7a11ae0697ab306ba122a1431cd0c4 SHA512 13bd88c67d9e5a0b452cfa46fd8b66108404f2b3efd1fa23563f7d8456318495a5c15916bd81422cffab948673a29cfb15da2e217c4f58d454c460caaad59a3b WHIRLPOOL a784be0f0dce614562071d5c0e70d6eb20abb92bbafa4cfd3605b2dba2ec630c753a04a33eaf733fa8543e4ea7eb98fc3780edd9f4e29380b95906b0f52c75f9 +AUX patches-0.8.x/noad-0.8.6-libav9.diff 3036 SHA256 22e29a5ad94875856bf1a7e5bc5696881db804e5f7a6f760cbe01b5d5d0d28d8 SHA512 f7ecc4e8d2c30a77588cbf5a0977575a0a2a9c44aaca1f061e34795302f56f77bcddb096e6a8ec2d3398829faabcb78a29825e1c0bc28f2350d7a4a7d1f8e64e WHIRLPOOL 658ec0ed907a89004a74fe7d7cbaa0f1c6b5d748b4e1743794073d3402279846a070f3d1eebf8457c5dbd1b9addea8381cc4563a75f299d0ff1e026a29882761 +AUX pre-shutdown-15-noad.sh 771 SHA256 c5a711256fc48bf8edd7b28f23ae61aa365370cec9b0470ca1c017a5e36e66c2 SHA512 d40625e0704bc228879bd5d19d7a62eed4e56d1a688699dde8f628aedf320e86b4bfca474b42edc3f6a93e7f8528ba15d654a818d9b19bd3ac196c1ca8324910 WHIRLPOOL 35d341678eebd70759a64874049d5e64282bea6ed5d3c77330ac4c98784d62d342c02c1164d4760bf1dca0cff650d34be23c4e6a3bcfe37ae31b2eab88230f69 +AUX reccmds.noad.conf 61 SHA256 41dbc62f88429710b92f6d7cc45c49a967ae1376fc01b5b485b51f7e077ed20d SHA512 953af51444af1e4a853e2a501fe0fb31ef0b982795e8a7b350cf0851f6f572884de87d74b71ce0630fcd59082290ce8b9730e343032fea6512da96f1a934fddb WHIRLPOOL be348899b9a66713b83d5ffc4af414eadecebefa631910826382bcd82efcb20715bb55310173fb77e4980ab110bbd1513acc6c36c6aef65e93f0504ca3b40db7 +AUX record-50-noad.sh 1443 SHA256 bfbfc9254b993602def7b01a9d72e2ec1c246d260a229576db2b2b6d2ab27011 SHA512 6ef839ad9c4d7b238e9e02dfdca486623902a5e9f3de722f18b9f50eff03888d58d03f8a17448903bbec2f04d1abcee22d6672798dd23eee024339a6474b98c9 WHIRLPOOL 9a1faa1588bb89f5724652548e2a2ac8ddd8b3fb212663616e247c4e44b30286a174c2026a694a1a40d192f44d253c890c57cbca569651b31ad5114abb19dea2 +DIST noad-0.7.3.tar.bz2 174036 SHA256 6fb597fb0ae0e4c4c954f2feb89dcc88c4852a0f0845aa214606996abb29f6cb SHA512 0edc81c9b689c49b99cd68b80bf7acbb0af9757b4d5439edd0610ca96bf0ee4783844aa0dfe52e3303b21f5794af3ad9a216371d4e698bbf26f24bc31be43c66 WHIRLPOOL cfa03475dc657502fb4ccd67ddb8139edac4b4693e98c9897eb2ac99b38fc5cbe678f975244cd06a8d9464b5c4da9bd1b4354938d4e833e05fae5c2d7e220be2 +DIST noad-0.8.6.tar.bz2 188085 SHA256 4b087c9688d0c8e86e248c1bc775c09541625a7b7ae13a85ec000266e3b69780 SHA512 ffca9e8bc78719350ffdfe59a4f258033f843ddf761ca5d8893cde5a4968a644c0318fd86b60e7b9e78b0650f8f02c68e6f7a95f4dfb702ab30d84ad3750c9e9 WHIRLPOOL c9c5ce710021965743eb1fcad18d6d9946101e78ca802eeb2b146a214f03e3a765be72fd356dcd209b5e43414585db2b3ef43a104d6bdef76ebaa0b29baa2ab1 +EBUILD noad-0.7.3-r1.ebuild 2209 SHA256 7c83f7d18b2e9bc0f2b82c9b38834b39fcb57f4963be1b8a2fe21f5108e3c668 SHA512 b065e6d6681dab66d5397613a9a35499513b5de40016f10f686d51441e452c6aa4ed5d475da52c86942ae95b1be9ff6f56676d61a5c1ede766bc23eb1e6e7e2b WHIRLPOOL a5e04a4cc9a6ea01ec898c3e8e2310eb70574fde8f995346de779ce92b7f6a32eb5b8435b10051939bef0a50f0cc711bbe910afc5d76a9f43953bd6bd1f2ebc0 +EBUILD noad-0.8.6-r1.ebuild 1890 SHA256 91b5ec315b1cf9a546f2c1dcefa7d552a5eb511fa4bd0d5cb966335668a84562 SHA512 36123fab1ead711ec002e1f031839bf82e0d10eea73916cc0306ee49f4fd93e860661aa43f71d85f1170d931ffca9aa6b40aa502ada898119d87cdd6e8cc5704 WHIRLPOOL cf0c4294d4af8b639a8c9c0ea2e7f25a07e600705ad9a19ff084308d02ed2428b7d05cd2b0ed57799a6f0926609546092a141905c4c305d90d125dc6ec332a3c +EBUILD noad-0.8.6-r2.ebuild 2038 SHA256 d6a9651c6d0ca16f30262bef25260e528591ffc8d06253ce5069e80820c61ff8 SHA512 ec02b138a507039e175d6456ee9e4f66f624a0cc0f484c18245be25802b477fb506435a2faab24a332a75ac79167fb0e17f0066eda1a711efa4c39459886be63 WHIRLPOOL e11d9fccfaa73404c5e5edaec3216ad85b6cf9202a686e6374aad5cb7498e47c4246c506e49c62b50c00ab779272dc39ed8d67e94065a05c0aacf0ca1d9d6eb6 +MISC ChangeLog 3231 SHA256 47403af36b0a270e8f1f46d5f0ab0a0b6bf6bd1ccb747799440112c0ad1d09f2 SHA512 7b8f03d49c06c9c75f3285336176253a6ba386b8f51cbb9c54177ed15c7e72a1103dcd119b546fa835978e1f6c5ff1ff1cdefacb343f09764ea72101d32421b1 WHIRLPOOL 2d4778365e70a4672ea68e955a7821f1e7d93d56332962af2b134068cb3ea7a5d39aba0e4302e2aea99108ce3aebf797e21c2f5171e3d69c33db405ab302e6c1 +MISC ChangeLog-2015 14048 SHA256 f4a6cbc6be8781a0f305291a33d771f2a1feb6f6317fd03da75a796898239404 SHA512 4e98518b8aaefdeb989c241fec6c8cf53b6e954ce5ddb09aae24bc32d1c3d27ddcbe99d620c3219bcb9f931ecb4301b5667a99b380e3c440b0b939bcda02fd54 WHIRLPOOL 9e203b018fcedea65edf6cefce69acdc9a35a952388fc63e469263eede9a1b12730369123c3694ca84961a93de62081fc865e93cf1ea4ecb7211a913891a7b96 +MISC metadata.xml 535 SHA256 eb1e1164eb0f443f3ec977e60e4536a4362fdaac924d2f20e96827b3f9d250fe SHA512 fc9fa7cd96b12452c50e75602da047582e3e8a10377555ea363db1662278199c62f4ed3844ba9d1eef3979a896e1953fbf0efa73123a9f16d88cabb2114c82eb WHIRLPOOL c4d9713accd37e293014f19d51f51b246c59b655f7e2772cf2eb73a93f5d97e101e128d48ae86cfc98043eadd42cd175236abef2ec6d9c32c78aa0db3b952afc diff --git a/media-video/noad/files/confd_vdraddon.noad b/media-video/noad/files/confd_vdraddon.noad new file mode 100644 index 000000000000..693e4c7fe3a1 --- /dev/null +++ b/media-video/noad/files/confd_vdraddon.noad @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +######### +## +# run Noad +# available Parameter +# no | yes +# +VDR_USE_NOAD="yes" + +## do online scan while recording +# you can choose between +# no - disable online scan +# live - scan only live recordings online (named @...) +# all - scan all recordings with online mode +# available Parameter +# no | live | all +# +NOAD_ONLINE="no" + +## Use this nice-level when running noad / or no-niceness +# available Parameter +# no | 0 ... 19 +#NOAD_NICE_LEVEL="no" +NOAD_NICE_LEVEL="18" + +## use ac3 detection +# available Parameter +# yes | no +# +NOAD_AC3="yes" + +## detect jumping logos +# available Parameter +# yes | no +# +NOAD_JUMP="yes" + +## detect overlaps +# available Parameter +# yes | no +# +NOAD_OVERLAP="yes" + +## send an OSD-Message to localhost:2001 ( >=vdr-1.7.15 localhost:6419 ) +# for start and end +# available Parameter +# yes | no +# +NOAD_MESSAGES="yes" + +## only scan if sharemarks did not produce an ptsmarks.vdr file +# available Parameter +# yes | no +NOAD_ONLY_SCAN_IF_NO_PTSMARKS="yes" + +## only scan if there are no cut-marks already there (cutting while vdr still records) +# available Parameter +# yes | no +NOAD_ONLY_SCAN_IF_NO_MARKS="yes" + +## add your own parameter here, +# yust run 'noad' in konsole for more parameter +NOAD_PARAMETER="" + + + + + + diff --git a/media-video/noad/files/noad-reccmd b/media-video/noad/files/noad-reccmd new file mode 100644 index 000000000000..3979baa574f9 --- /dev/null +++ b/media-video/noad/files/noad-reccmd @@ -0,0 +1,7 @@ +#!/bin/sh + +VDR_RECORD_STATE=reccmd +VDR_RECORD_NAME="${1}" + +. /usr/share/vdr/record/record-50-noad.sh "${VDR_RECORD_STATE}" "${VDR_RECORD_NAME}" + diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff new file mode 100644 index 000000000000..e757aeb884b0 --- /dev/null +++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff @@ -0,0 +1,13 @@ +Index: noad-0.7.3/configure.ac +=================================================================== +--- noad-0.7.3.orig/configure.ac ++++ noad-0.7.3/configure.ac +@@ -158,7 +158,7 @@ dnl check that libavcodec is usable + dnl --------------------------------------------------------------------------- + if test "$withffmpeg" == "1"; then + AC_SUBST(LIBAVCODEC,"-lavcodec") +- AC_CHECK_LIB([avcodec],[avcodec_init],[AC_SUBST(HAVE_LIBAVCODEC,1) AC_SUBST(LIBS,"$LIBS $LIBAVCODEC ") ]) ++ AC_CHECK_LIB([avcodec],[avcodec_register_all],[AC_SUBST(HAVE_LIBAVCODEC,1) AC_SUBST(LIBS,"$LIBS $LIBAVCODEC ") ]) + fi + + diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff new file mode 100644 index 000000000000..37788a197fd7 --- /dev/null +++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff @@ -0,0 +1,21 @@ +diff -ru noad-0.6.0-orig/main.cpp noad-0.6.0/main.cpp +--- noad-0.6.0-orig/main.cpp 2007-05-12 17:28:01.000000000 +0200 ++++ noad-0.6.0/main.cpp 2007-05-12 18:20:30.000000000 +0200 +@@ -566,10 +566,17 @@ + signal(SIGABRT, signal_handler); + signal(SIGSEGV, signal_handler); + signal(SIGUSR1, signal_handler); ++ signal(SIGALRM, signal_handler); + + // do cleanup at exit... + atexit(cleanUp); + ++ ++ if (!bOnline) { ++ // now start alarm timer to kill hanging noad (hardcoded 30min timeout) ++ alarm(30*60); ++ } ++ + // now do the work.., + doNoad(bBefore, recDir); + diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff new file mode 100644 index 000000000000..ca37f8e22a87 --- /dev/null +++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/show_bug.cgi?id=423623 +compilefix gcc-4.7.x + +signed-of-by: Joerg Bornkessel (2012/06/27) + +diff -Naur noad-0.7.3.orig/vdr_cl.h noad-0.7.3/vdr_cl.h +--- noad-0.7.3.orig/vdr_cl.h 2012-06-27 20:27:57.000000000 +0200 ++++ noad-0.7.3/vdr_cl.h 2012-06-27 20:30:56.000000000 +0200 +@@ -287,7 +287,7 @@ + { + T *l = new T; + if (l->Parse(s)) +- Add(l); ++ this->Add(l); + else + { + esyslog("ERROR: error in %s, line %d", fileName, line); diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff new file mode 100644 index 000000000000..c3c335c2663b --- /dev/null +++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff @@ -0,0 +1,14 @@ +Add missing includes for ressource limits. + +Signed-off-by: Markus Rathgeb + +--- main.cpp ++++ main.cpp +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch b/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch new file mode 100644 index 000000000000..455252a74c8a --- /dev/null +++ b/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch @@ -0,0 +1,16 @@ +Index: noad-0.8.6/ffmpeg_decoder.cpp +=================================================================== +--- noad-0.8.6.orig/ffmpeg_decoder.cpp ++++ noad-0.8.6/ffmpeg_decoder.cpp +@@ -253,7 +253,11 @@ int FFMPegDecoder::decoder_exit() + // close the file + if( pFormatCtx ) + { ++#if LIBAVFORMAT_VERSION_MAJOR < 54 + av_close_input_file(pFormatCtx); ++#else ++ avformat_close_input(&pFormatCtx); ++#endif + pFormatCtx = NULL; + } + // Close the codec diff --git a/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff b/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff new file mode 100644 index 000000000000..a9b6c89d9f8c --- /dev/null +++ b/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff @@ -0,0 +1,106 @@ +compile fix noad-0.8.6 +testet with libav-9 ffmpeg-2.2.9 +Signed-of-by: Joerg Bornkessel (22 Oct 2014) +diff -Naur noad-0.8.6.orig/audiotools.cpp noad-0.8.6/audiotools.cpp +--- noad-0.8.6.orig/audiotools.cpp 2014-10-22 14:26:57.809249955 +0200 ++++ noad-0.8.6/audiotools.cpp 2014-10-22 14:28:06.830249955 +0200 +@@ -50,9 +50,9 @@ + uint8_t *outbuf=NULL; + AVCodec *codec=NULL; + AVCodecContext *codecContext= NULL; +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + AVDictionary *avDictionary = NULL; // "create" an empty dictionary +-#endif ++//#endif + int64_t basepts=0; + int64_t audiobasepts=0; + //int64_t audiopts=0; +@@ -108,13 +108,13 @@ + codecContext = avcodec_alloc_context3(codec); + #endif + +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + /* open it */ + if (avcodec_open2(codecContext, codec, &avDictionary) < 0) +-#else ++//#else + /* open it */ +- if (avcodec_open(codecContext, codec) < 0) +-#endif ++// if (avcodec_open(codecContext, codec) < 0) ++//#endif + { + fprintf(stderr, "could not open codec\n"); + } +@@ -129,9 +129,9 @@ + { + free(outbuf); + avcodec_close(codecContext); +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + av_dict_free(&avDictionary); +-#endif ++//#endif + av_free(codecContext); + av_codec_initialised = false; + } +diff -Naur noad-0.8.6.orig/ffmpeg_decoder.cpp noad-0.8.6/ffmpeg_decoder.cpp +--- noad-0.8.6.orig/ffmpeg_decoder.cpp 2014-10-22 14:26:57.808249955 +0200 ++++ noad-0.8.6/ffmpeg_decoder.cpp 2014-10-22 14:38:26.366249955 +0200 +@@ -184,7 +184,7 @@ + + // Retrieve stream information + resetDecoder(); +- int openCode2 = av_find_stream_info(pFormatCtx); ++ int openCode2 = avformat_find_stream_info(pFormatCtx, NULL); + if(openCode2<0) + return -1; // Couldn't find stream information + +@@ -222,13 +222,13 @@ + if(pCodec->capabilities & CODEC_CAP_TRUNCATED) + pCodecCtx->flags|=CODEC_FLAG_TRUNCATED; + +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + // Open codec + if(avcodec_open2(pCodecCtx, pCodec,&avDictionary) < 0) +-#else ++//#else + // Open codec +- if(avcodec_open(pCodecCtx, pCodec)<0) +-#endif ++// if(avcodec_open(pCodecCtx, pCodec)<0) ++//#endif + return -1; // Could not open codec + + +@@ -270,10 +270,10 @@ + pIOContext = NULL; + } + #endif +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + av_dict_free(&avDictionary); + avDictionary = NULL; +-#endif ++//#endif + return 0; + } + +diff -Naur noad-0.8.6.orig/ffmpeg_decoder.h noad-0.8.6/ffmpeg_decoder.h +--- noad-0.8.6.orig/ffmpeg_decoder.h 2014-10-22 14:26:57.807249955 +0200 ++++ noad-0.8.6/ffmpeg_decoder.h 2014-10-22 14:36:27.213249955 +0200 +@@ -22,9 +22,9 @@ + int i, videoStream; + AVCodecContext *pCodecCtx; + AVCodec *pCodec; +-#if LIBAVCODEC_VERSION_MAJOR > 54 ++//#if LIBAVCODEC_VERSION_MAJOR > 54 + AVDictionary *avDictionary; +-#endif ++//#endif + AVFrame *pFrame; + + public: diff --git a/media-video/noad/files/pre-shutdown-15-noad.sh b/media-video/noad/files/pre-shutdown-15-noad.sh new file mode 100644 index 000000000000..476741e7bac7 --- /dev/null +++ b/media-video/noad/files/pre-shutdown-15-noad.sh @@ -0,0 +1,41 @@ +# +# pre-shutdown script to abort shutdown in case noad is running + +check_runtime() { + local PID="$1" + + # Max runtime of 30m = 1800s + local NOAD_MAX_TIME=1800 + local NOW="$(date +%s)" + local START="$(stat --format "%Z" /proc/${PID}/)" + local DIFF=$(( $NOW - $START )) + if [ "${DIFF}" -ge "${NOAD_MAX_TIME}" ]; then + kill ${PID} + sleep 2 + kill -9 ${PID} + return 0 + else + # There still is a running noad process + return 1 + fi +} + +check_noad() { + local PIDOF=pidof + local NOAD=/usr/bin/noad + + local PIDS=$(${PIDOF} ${NOAD}) + local PID + local still_running=0 + for PID in $PIDS; do + check_runtime "${PID}" + [ "$?" = "1" ] && still_running=1 + done + + if [ "${still_running}" -gt "0" ]; then + # stop shutdown + shutdown_abort_can_force "noad is running" + fi +} + +check_noad diff --git a/media-video/noad/files/reccmds.noad.conf b/media-video/noad/files/reccmds.noad.conf new file mode 100644 index 000000000000..5d35495a90b8 --- /dev/null +++ b/media-video/noad/files/reccmds.noad.conf @@ -0,0 +1 @@ +Scan for Commercials (noad) :/usr/share/vdr/bin/noad-reccmd diff --git a/media-video/noad/files/record-50-noad.sh b/media-video/noad/files/record-50-noad.sh new file mode 100644 index 000000000000..c2e92a1d9a66 --- /dev/null +++ b/media-video/noad/files/record-50-noad.sh @@ -0,0 +1,66 @@ +# +# Joerg Bornkessel +# Mathias Schwarzott +# + +. /etc/conf.d/vdraddon.noad + +CMD="/usr/bin/noad" + +# Parameter to start NoAd +# parameter are "no | yes" + +FORCE_OFFLINE_SCAN=no + +if [ "${VDR_RECORD_STATE}" = "reccmd" ]; then + # script started from reccmd + FORCE_OFFLINE_SCAN=yes + VDR_RECORD_STATE=after +fi + + +if [ "${FORCE_OFFLINE_SCAN}" != "yes" ]; then + # allow it to abort on certain conditions + + # automatic noad scan disabled + [ "${VDR_USE_NOAD}" = "yes" ] || return + + # ptsmarks existing + if [ "${NOAD_ONLY_SCAN_IF_NO_PTSMARKS}" = "yes" ]; then + [ -f "${VDR_RECORD_NAME}/ptsmarks.vdr" ] && return + fi + + # marks existing + if [ "${NOAD_ONLY_SCAN_IF_NO_MARKS}" = "yes" ]; then + [ -f "${VDR_RECORD_NAME}/marks.vdr" ] && return + fi + + # Add Online-scanning parameter + case "${NOAD_ONLINE}" in + live|yes) + CMD="${CMD} --online=1" + ;; + all) + CMD="${CMD} --online=2" + ;; + no) + # abort stage "before" here + [ "${VDR_RECORD_STATE}" = "before" ] && return + ;; + esac +fi + +[ "${NOAD_AC3}" = "yes" ] && CMD="${CMD} -a" +[ "${NOAD_JUMP}" = "yes" ] && CMD="${CMD} -j" +[ "${NOAD_OVERLAP}" = "yes" ] && CMD="${CMD} -o" +[ "${NOAD_MESSAGES}" = "yes" ] && CMD="${CMD} -O" + +: ${NOAD_NICE_LEVEL:=18} +if [ "${NOAD_NICE_LEVEL}" != "no" ]; then + NOAD_NICE_LEVEL=$(($NOAD_NICE_LEVEL+0)) + CMD="nice -n ${NOAD_NICE_LEVEL} ${CMD}" +fi + +CMD="${CMD} ${NOAD_PARAMETER}" +${CMD} "${VDR_RECORD_STATE}" "${VDR_RECORD_NAME}" + diff --git a/media-video/noad/metadata.xml b/media-video/noad/metadata.xml new file mode 100644 index 000000000000..b76754b18b74 --- /dev/null +++ b/media-video/noad/metadata.xml @@ -0,0 +1,18 @@ + + + + + vdr@gentoo.org + Gentoo VDR Project + + + media-video@gentoo.org + Gentoo Video project + + + Support for libmpeg2 library + + + Mark commercial Breaks in VDR records. + + diff --git a/media-video/noad/noad-0.7.3-r1.ebuild b/media-video/noad/noad-0.7.3-r1.ebuild new file mode 100644 index 000000000000..2a433cde6db5 --- /dev/null +++ b/media-video/noad/noad-0.7.3-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Mark commercial Breaks in VDR records" +HOMEPAGE="http://noad.heliohost.org/" +SRC_URI="http://noad.heliohost.org/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="ffmpeg" + +RDEPEND="media-gfx/imagemagick + media-libs/libmpeg2:= + ffmpeg? ( virtual/ffmpeg ) + !media-plugins/vdr-markad" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + EPATCH_FORCE=yes EPATCH_SUFFIX=diff EPATCH_SOURCE="${FILESDIR}"/patches-${PV%.*}.x epatch + + if has_version '>=media-video/vdr-1.7.15'; then + sed -i -e 's:2001:6419:' -i svdrpc.cpp || die + fi + + sed -i -e '/CXXFLAGS.*O3/d' configure.ac || die #426746 + + sed -i \ + -e "s:-lMagick++:$($(tc-getPKG_CONFIG) --libs-only-l Magick++):" \ + Makefile.am || die #467134 + + # FIXME: --with-tools, markpics will compile but showindex won't! + sed -i \ + -e '/^noinst_PROGRAMS/s:@TOOLSRC@::' \ + -e '/^EXTRA_PROGRAMS/s:showindex::' \ + Makefile.am || die + + # ld: audiotools.o: undefined reference to symbol 'av_free@@LIBAVUTIL_51' + if use ffmpeg; then + sed -i -e 's:-lavcodec:& -lavutil:' configure.ac || die + fi + + eautoreconf +} + +src_configure() { + econf \ + --with-magick \ + --with-mpeginclude=/usr/include/mpeg2dec \ + --with-tools \ + $(usex ffmpeg '--with-ffmpeg --with-ffmpeginclude=/usr/include' '') +} + +src_install() { + dobin noad markpics # showindex + + dodoc README INSTALL + # example scripts are installed as dokumentation + dodoc allnewnoad allnoad allnoadnice clearlogos noadifnew stat2html + + newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad + + insinto /usr/share/vdr/record + doins "${FILESDIR}"/record-50-noad.sh + + insinto /usr/share/vdr/shutdown + doins "${FILESDIR}"/pre-shutdown-15-noad.sh + + insinto /etc/vdr/reccmds + doins "${FILESDIR}"/reccmds.noad.conf + + exeinto /usr/share/vdr/bin + doexe "${FILESDIR}"/noad-reccmd +} + +pkg_postinst() { + elog + elog "To integrate noad in VDR you should do this:" + elog + elog "start and set Parameter in /etc/conf.d/vdraddon.noad" + elog + elog "Note: You can use here all pararmeters for noad," + elog "please look in the documentation of noad." +} diff --git a/media-video/noad/noad-0.8.6-r1.ebuild b/media-video/noad/noad-0.8.6-r1.ebuild new file mode 100644 index 000000000000..ae96bfd4fd50 --- /dev/null +++ b/media-video/noad/noad-0.8.6-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Mark commercial breaks in VDR recordings" +HOMEPAGE="http://noad.net23.net/" +SRC_URI="http://noad.net23.net/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+ffmpeg imagemagick libmpeg2" + +RDEPEND=" + libmpeg2? ( media-libs/libmpeg2:= ) + ffmpeg? ( virtual/ffmpeg ) + imagemagick? ( media-gfx/imagemagick ) + !media-plugins/vdr-markad" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +REQUIRED_USE="|| ( ffmpeg libmpeg2 )" + +src_prepare() { + sed -i -e 's:2001:6419:' svdrpc.cpp main.cpp + + # tested libav-9, ffmepg-2.2.9 + epatch "${FILESDIR}/patches-0.8.x/${P}-libav9.diff" \ + "${FILESDIR}/patches-0.8.x/${P}-ffmpeg25.patch" + + eautoreconf +} + +src_configure() { + econf \ + $(usex imagemagick '--with-magick') \ + $(usex ffmpeg '' '--without-ffmpeg') \ + $(usex libmpeg2 '' '--without-libmpeg2') \ + --with-tools +} + +src_compile() { + emake AR="$(tc-getAR)" # see bug #469810 +} + +src_install() { + dobin noad showindex checkMarks + use imagemagick && dobin markpics + + dodoc README INSTALL + # example scripts are installed as dokumentation + dodoc allnewnoad allnoad allnoadnice clearlogos noadcall.sh noadifnew stat2html statupd + + newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad + + insinto /usr/share/vdr/record + doins "${FILESDIR}"/record-50-noad.sh + + insinto /usr/share/vdr/shutdown + doins "${FILESDIR}"/pre-shutdown-15-noad.sh + + insinto /etc/vdr/reccmds + doins "${FILESDIR}"/reccmds.noad.conf + + exeinto /usr/share/vdr/bin + doexe "${FILESDIR}"/noad-reccmd +} + +pkg_postinst() { + elog + elog "To integrate noad in VDR you should do this:" + elog + elog "start and set Parameter in /etc/conf.d/vdraddon.noad" + elog + elog "Note: You can use here all parameters for noad," + elog "please look in the documentation of noad." +} diff --git a/media-video/noad/noad-0.8.6-r2.ebuild b/media-video/noad/noad-0.8.6-r2.ebuild new file mode 100644 index 000000000000..cd819660440a --- /dev/null +++ b/media-video/noad/noad-0.8.6-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Mark commercial breaks in VDR recordings" +HOMEPAGE="http://noad.net23.net/" +SRC_URI="http://noad.net23.net/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ffmpeg imagemagick libmpeg2" + +RDEPEND=" + libmpeg2? ( media-libs/libmpeg2:= ) + ffmpeg? ( virtual/ffmpeg ) + imagemagick? ( media-gfx/imagemagick ) + !media-plugins/vdr-markad" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +REQUIRED_USE="|| ( ffmpeg libmpeg2 )" + +src_prepare() { + sed -i -e 's:2001:6419:' svdrpc.cpp main.cpp + + # wrt bug 575494 + sed -e "s:CODEC_ID_MP3:AV_CODEC_ID_MP3:" -i audiotools.cpp + sed -e "sCODEC_ID_PROBE:AV_CODEC_ID_PROBE:" -i ffmpeg_decoder.cpp + + # tested libav-9, ffmepg-2.2.9 + epatch "${FILESDIR}/patches-0.8.x/${P}-libav9.diff" \ + "${FILESDIR}/patches-0.8.x/${P}-ffmpeg25.patch" + + eautoreconf +} + +src_configure() { + econf \ + $(usex imagemagick '--with-magick') \ + $(usex ffmpeg '' '--without-ffmpeg') \ + $(usex libmpeg2 '' '--without-libmpeg2') \ + --with-tools +} + +src_compile() { + emake AR="$(tc-getAR)" # see bug #469810 +} + +src_install() { + dobin noad showindex checkMarks + use imagemagick && dobin markpics + + dodoc README INSTALL + # example scripts are installed as dokumentation + dodoc allnewnoad allnoad allnoadnice clearlogos noadcall.sh noadifnew stat2html statupd + + newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad + + insinto /usr/share/vdr/record + doins "${FILESDIR}"/record-50-noad.sh + + insinto /usr/share/vdr/shutdown + doins "${FILESDIR}"/pre-shutdown-15-noad.sh + + insinto /etc/vdr/reccmds + doins "${FILESDIR}"/reccmds.noad.conf + + exeinto /usr/share/vdr/bin + doexe "${FILESDIR}"/noad-reccmd +} + +pkg_postinst() { + elog + elog "To integrate noad in VDR you should do this:" + elog + elog "start and set Parameter in /etc/conf.d/vdraddon.noad" + elog + elog "Note: You can use here all parameters for noad," + elog "please look in the documentation of noad." +} -- cgit v1.2.3