diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/noad/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/noad/files')
11 files changed, 375 insertions, 0 deletions
diff --git a/media-video/noad/files/confd_vdraddon.noad b/media-video/noad/files/confd_vdraddon.noad new file mode 100644 index 000000000000..47699b3e8c8e --- /dev/null +++ b/media-video/noad/files/confd_vdraddon.noad @@ -0,0 +1,72 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +######### +## +# 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 <hd_brummy@gentoo.org> (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 <maggu2810@gmail.com> + +--- main.cpp ++++ main.cpp +@@ -22,6 +22,7 @@ + + #include <stdlib.h> + #include <time.h> ++#include <sys/resource.h> + #include <sys/wait.h> + #include <signal.h> + #include <execinfo.h> 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 <hd_brummy@gentoo.o> (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..6a45c03a88e6 --- /dev/null +++ b/media-video/noad/files/record-50-noad.sh @@ -0,0 +1,67 @@ +# $Id$ +# +# Joerg Bornkessel <hd_brummy@gentoo.org> +# Mathias Schwarzott <zzam@gentoo.org> +# + +. /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}" + |