diff options
Diffstat (limited to 'abs/core/mythtv/stable-0.25/mythplugins')
4 files changed, 0 insertions, 432 deletions
diff --git a/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD b/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD deleted file mode 100644 index 7278249..0000000 --- a/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD +++ /dev/null @@ -1,135 +0,0 @@ -# $Id: PKGBUILD 91281 2010-09-26 06:04:21Z remy $ -# Maintainer: Giovanni Scafora <giovanni@archlinux.org> - -pkgbase=mythplugins -pkgname=('mytharchive' - 'mythbrowser' - 'mythgallery' - 'mythgame' - 'mythmusic' - 'mythnetvision' - 'mythnews' - 'mythweather' - 'mythzoneminder') -pkgver=0.25 -pkgrel=19 - -arch=('i686' 'x86_64') -url="http://www.mythtv.org" -license=('GPL') -conflicts=('mythmovies') -makedepends=("mythtv>=${pkgver}" 'mplayer' 'fftw2' 'dvdauthor' 'libexif' - 'python-imaging' 'libcdaudio' 'taglib' 'perl-xml-simple' 'dcraw' - 'libvisual' 'perl-xml-xpath' 'perl-image-size' 'perl-json' - 'perl-class-inspector' 'perl-datetime-format-iso8601' - 'flac' 'libvorbis' 'python2' 'python-pycurl' 'python-oauth' - 'libcdio' 'fftw') - -source=(mythburn.py.patch) - - -#_gitroot="https://github.com/MythTV/mythtv.git" -#_gitname="mythplugins" - -build() { - - if [ -e ${srcdir}/mythplugins ] - then - rm -rf ${srcdir}/mythplugins - fi - - cd ${startdir} - msg "copy in myth plugins src" - cp -rp ../git_src/mythtv/mythplugins $srcdir - cd ${srcdir}/${pkgbase} - - - - msg "The local files are updated." - #find . -name '*.py' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' - cd ${srcdir}/${pkgbase} - ./configure --prefix=/usr \ - --enable-all --python=/usr/bin/python2 - - qmake mythplugins.pro || return 1 - make || return 1 -} - -package_mytharchive() { - pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows" - depends=("mythtv>=${pkgver}" 'libxmu' 'pil' 'dvdauthor' 'm2vrequantiser' 'mjpegtools' 'cdrkit' 'dvd+rw-tools') -# replaces=('mytharchive') - cd "${srcdir}/${_gitname}/${pkgbase}/mytharchive" - - patch mythburn/scripts/mythburn.py < $srcdir/mythburn.py.patch || return 1 - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythbrowser() { - pkgdesc="Mini web browser for MythTV" - depends=("mythtv>=${pkgver}") -# replaces=('mythbrowser') - cd "${srcdir}/${_gitname}/${pkgbase}/mythbrowser" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythgallery() { - pkgdesc="Image gallery plugin for MythTV" - depends=("mythtv>=${pkgver}" 'libexif') -# replaces=('mythgallery') - cd "${srcdir}/${_gitname}/${pkgbase}/mythgallery" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythgame() { - pkgdesc="Game emulator module for MythTV" - depends=("mythtv>=${pkgver}" 'zlib') -# replaces=('mythgame') - cd "${srcdir}/${_gitname}/${pkgbase}/mythgame" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythmusic() { - pkgdesc="Music playing plugin for MythTV" - depends=("mythtv>=${pkgver}" 'flac' 'libvorbis' 'libcdaudio' 'cdparanoia' 'taglib' 'libvisual-plugins' 'libcdio' 'fftw' ) -# replaces=('mythmusic') - cd "${srcdir}/${_gitname}/${pkgbase}/mythmusic" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythnetvision() { - pkgdesc="MythNetvision plugin for MythTV" - depends=("mythtv>=${pkgver}" 'python-pycurl' 'python-oauth' 'python2-lxml' 'python2' ) -# replaces=('mythnetvision') - cd "${srcdir}/${_gitname}/${pkgbase}/mythnetvision" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythnews() { - pkgdesc="News checking plugin for MythTV" - depends=("mythtv>=${pkgver}") -# replaces=('mythnews') - cd "${srcdir}/${_gitname}/${pkgbase}/mythnews" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythweather() { - pkgdesc="Weather checking plugin for MythTV" - depends=("mythtv>=${pkgver}" 'perl-xml-xpath' 'perl-image-size' - 'perl-class-inspector' 'perl-datetime-format-iso8601' - 'perl-date-manip' 'perl-json') -# replaces=('mythweather') - cd "${srcdir}/${_gitname}/${pkgbase}/mythweather" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -package_mythzoneminder() { - pkgdesc="Allows for viewing of CCTV cameras through zoneminder" - depends=("mythtv>=${pkgver}") -# replaces=('mythzoneminder') -# install=mythplugins-mythzoneminder.install - cd "${srcdir}/${_gitname}/${pkgbase}/mythzoneminder" - make INSTALL_ROOT="${pkgdir}" install || return 1 -} - -md5sums=('19446f65722769926bafad220bbc6551') diff --git a/abs/core/mythtv/stable-0.25/mythplugins/__changelog b/abs/core/mythtv/stable-0.25/mythplugins/__changelog deleted file mode 100644 index 48cdce8..0000000 --- a/abs/core/mythtv/stable-0.25/mythplugins/__changelog +++ /dev/null @@ -1 +0,0 @@ -placeholder diff --git a/abs/core/mythtv/stable-0.25/mythplugins/mythburn.py.patch b/abs/core/mythtv/stable-0.25/mythplugins/mythburn.py.patch deleted file mode 100644 index 380385b..0000000 --- a/abs/core/mythtv/stable-0.25/mythplugins/mythburn.py.patch +++ /dev/null @@ -1,285 +0,0 @@ ---- mythburn.py.orig 2012-12-16 15:23:41.000000000 -0600 -+++ mythburn.py 2012-12-18 14:23:56.000000000 -0600 -@@ -44,7 +44,7 @@ - - - # version of script - change after each update --VERSION="0.1.20120304-1" -+VERSION="0.1.20121218-1" - - # keep all temporary files for debugging purposes - # set this to True before a first run through when testing -@@ -93,6 +93,7 @@ - from fcntl import ioctl - import CDROM - from shutil import copy -+from subprocess import Popen, PIPE - - import MythTV - from MythTV.altdict import OrdDict -@@ -425,7 +426,7 @@ - os.remove(os.path.join(root, name)) - - ############################################################# --# Romoves all the objects from a directory -+# Removes all the objects from a directory - - def deleteEverythingInFolder(folder): - for root, dirs, files in os.walk(folder, topdown=False): -@@ -615,7 +616,7 @@ - # of a video file from its stream info file - - def getVideoParams(folder): -- """Returns the video resolution, fps and aspect ratio for the video file from the streamindo.xml file""" -+ """Returns the video resolution, fps and aspect ratio for the video file from the streaminfo.xml file""" - - #open the XML containing information about this file - infoDOM = xml.dom.minidom.parse(os.path.join(folder, 'streaminfo.xml')) -@@ -651,14 +652,14 @@ - # Gets the aspect ratio of a video file from its stream info file - - def getAspectRatioOfVideo(index): -- """Returns the aspect ratio of the video file (1.333, 1.778, etc)""" -+ """Returns the aspect ratio of the original video file (1.333, 1.778, etc)""" - - #open the XML containing information about this file -- infoDOM = xml.dom.minidom.parse(os.path.join(getItemTempPath(index), 'streaminfo.xml')) -+ infoDOM = xml.dom.minidom.parse(os.path.join(getItemTempPath(index), 'streaminfo_orig.xml')) - - #error out if its the wrong XML - if infoDOM.documentElement.tagName != "file": -- fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo.xml')) -+ fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo_orig.xml')) - video = infoDOM.getElementsByTagName("file")[0].getElementsByTagName("streams")[0].getElementsByTagName("video")[0] - if video.attributes["aspectratio"].value != 'N/A': - aspect_ratio = float(video.attributes["aspectratio"].value) -@@ -679,7 +680,7 @@ - - #error out if its the wrong XML - if infoDOM.documentElement.tagName != "file": -- fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo_orig.xml')) -+ fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo.xml')) - - video = infoDOM.getElementsByTagName("file")[0].getElementsByTagName("streams")[0].getElementsByTagName("video")[0] - video_start = float(video.attributes["start_time"].value) -@@ -1432,9 +1433,23 @@ - - data.rating = str(vid.userrating) - -- if doesFileExist(vid.coverfile): -- data.coverfile = vid.coverfile -+ data.coverfile = None - -+ #Check filename for valid path. If valid return nothing. -+ if os.path.isfile(str(vid.coverfile)): -+ write("Coverart is in local directory: %s" % vid.coverfile) -+ data.coverfile = vid.coverfile -+ else: -+ # iterate through storage group directories to get Coverart -+ for sg in DB.getStorageGroup(groupname='Coverart', hostname=DB.gethostname()): -+ if os.path.isfile(os.path.join(sg.dirname, str(vid.coverfile))): -+ write("Coverart is in Storage Groups: %s%s" % (sg.dirname, vid.coverfile)) -+ data.coverfile = os.path.join(sg.dirname, str(vid.coverfile)) -+ break -+ -+ if data.coverfile == None: -+ write("No Coverart Found") -+ - elif file.attributes["type"].value=="file": - data.type = file.attributes["type"].value - data.filename = file.attributes["filename"].value -@@ -1485,6 +1500,30 @@ - - - ############################################################# -+# Finds the path of a video file from a Storage Group -+ -+def getVideoPath(filename): -+ -+ filepath = None -+ -+ #Check filename for valid path. If valid return nothing. -+ if os.path.isfile(filename): -+ write("Video is in local video directory: %s" % filename) -+ return (filepath) -+ else: -+ # iterate through storage group directories -+ for sg in DB.getStorageGroup(groupname='Videos', hostname=DB.gethostname()): -+ wholepath = os.path.join(sg.dirname, filename) -+ if os.path.isfile(wholepath): -+ write("Video is in Storage Groups: %s" % wholepath) -+ filepath = "".join(sg.dirname) -+ return (filepath) -+ break -+ -+ if filepath == None: -+ write("Video is not in local video directory or Storage Groups") -+ -+############################################################# - # Pre-process a single video/recording file - - def preProcessFile(file, folder, count): -@@ -1501,7 +1540,7 @@ - if file.attributes["type"].value == "recording": - mediafile = file.attributes["filename"].value - elif file.attributes["type"].value == "video": -- mediafile = os.path.join(videopath, file.attributes["filename"].value) -+ mediafile = os.path.join(getVideoPath(file.attributes["filename"].value), file.attributes["filename"].value) - elif file.attributes["type"].value == "file": - mediafile = file.attributes["filename"].value - else: -@@ -1661,6 +1700,37 @@ - fatalError("Failed while running mytharchivehelper to get stream information.\n" - "Result: %d, Command was %s" % (result, command)) - -+ #open the XML containing information about this file -+ infoDOM = xml.dom.minidom.parse(xmlFilename) -+ -+ #error out if its the wrong XML -+ if infoDOM.documentElement.tagName != "file": -+ fatalError("This info file doesn't look right (%s)." % xmlFilename) -+ -+ file = infoDOM.getElementsByTagName("file")[0] -+ video = infoDOM.getElementsByTagName("file")[0].getElementsByTagName("streams")[0].getElementsByTagName("video")[0] -+ -+ #use ffmpeg to get display aspect ratio (DAR) of video -+ cmd = "mythffmpeg -i " + quoteCmdArg(file.attributes["filename"].value) + " 2>&1" -+ aspect_ratio = Popen(cmd, shell=True, stdout=PIPE).stdout.read() -+ if "DAR" in aspect_ratio: -+ #clean DAR string -+ aspect_ratio = aspect_ratio.split("DAR ")[-1].split(",")[0] -+ aspect_ratio = ''.join([c for c in aspect_ratio if c in '1234567890:']).split(":") -+ else: -+ #calculate aspect from video size -+ aspect_ratio = getVideoSize(xmlFilename) -+ -+ #convert to decimal -+ aspect_ratio = float(aspect_ratio[0]) / float(aspect_ratio[1]) -+ -+ write("Video %s aspect ratio is: %s" % (filename, aspect_ratio)) -+ -+ #set aspect ratio -+ video.setAttribute("aspectratio",str(aspect_ratio)) -+ -+ WriteXMLToFile (infoDOM,xmlFilename) -+ - # print out the streaminfo.xml file to the log - infoDOM = xml.dom.minidom.parse(xmlFilename) - write(xmlFilename + ":-\n" + infoDOM.toprettyxml(" ", ""), False) -@@ -1707,7 +1777,7 @@ - write("Using cutlist: %s" % cutlist_s) - - if (localfile != ""): -- localfile = quoteFilename(localfile) -+ localfile = quoteCmdArg(localfile) - if usecutlist == True: - command = "mythtranscode --mpeg2 --honorcutlist %s --infile %s --outfile %s" % (cutlist_s, quoteCmdArg(localfile), quoteCmdArg(destination)) - else: -@@ -1973,7 +2043,7 @@ - ############################################################# - # Re-encodes a file to mpeg2 - --def encodeVideoToMPEG2(source, destvideofile, video, audio1, audio2, aspectratio, profile): -+def encodeVideoToMPEG2(source, destvideofile, video, folder, audio1, audio2, aspectratio, profile): - """Encodes an unknown video source file eg. AVI to MPEG2 video and AC3 audio, use mythffmpeg""" - - profileNode = findEncodingProfile(profile) -@@ -1998,7 +2068,36 @@ - value = quoteCmdArg(destvideofile) - if value == "%aspect": - value = aspectratio -+ if value == "720x480" or value == "720x576": -+ videores, fps, videoAR = getVideoParams(folder) -+ videoWidth = int(videores.split("x")[0]) -+ videoHeight = int(videores.split("x")[1]) -+ -+ #add padding to correct for aspects > than 1.9:1 -+ if float(videoAR) >= 1.9: -+ #check which video type and set the correct height -+ if videomode == "ntsc": -+ videoModeHeight = 480 -+ else: -+ videoModeHeight = 576 - -+ #calculate the video height based on the aspect ratio of the video -+ #multiply by 1.185 to compensate for dvds non-square pixels -+ calVideoHeight = int(round((720 / float(videoAR)) * 1.185)) -+ if calVideoHeight % 2 == 1: -+ calVideoHeight = calVideoHeight + 1 -+ #write("calVideoHeight: %s" % calVideoHeight) -+ -+ #use original video height if the calculated video height is close -+ if (calVideoHeight + 20 < videoHeight) or (calVideoHeight - 20 > videoHeight): -+ videoHeight = calVideoHeight -+ -+ cropPixels = videoModeHeight - videoHeight -+ -+ write("Crop Pixels Total: %s" % cropPixels) -+ name = "-vf" -+ value = "\"scale=720:%d, setsar=1:1, pad=720:%d:0:%d:black\"" % (videoModeHeight - cropPixels, videoModeHeight, cropPixels / 2) -+ - # only re-encode the audio if it is not already in AC3 format - if audio1[AUDIO_CODEC] == "AC3": - if name == "-acodec": -@@ -2094,10 +2193,6 @@ - outaudiosamplerate = 48000 - outaudiocodec = "ac3" - deinterlace = 0 -- croptop = 0 -- cropright = 0 -- cropbottom = 0 -- cropleft = 0 - qmin = 5 - qmax = 31 - qdiff = 31 -@@ -2121,14 +2216,6 @@ - outvideores = value - if name == "-deinterlace": - deinterlace = 1 -- if name == "-croptop": -- croptop = value -- if name == "-cropright": -- cropright = value -- if name == "-cropbottom": -- cropbottom = value -- if name == "-cropleft": -- cropleft = value - if name == "-qmin": - qmin = value - if name == "-qmax": -@@ -4409,7 +4496,7 @@ - elif file.attributes["type"].value=="recording": - mediafile = file.attributes["filename"].value - elif file.attributes["type"].value=="video": -- mediafile=os.path.join(videopath, file.attributes["filename"].value) -+ mediafile=os.path.join(getVideoPath(file.attributes["filename"].value), file.attributes["filename"].value) - elif file.attributes["type"].value=="file": - mediafile=file.attributes["filename"].value - else: -@@ -4547,7 +4634,7 @@ - - #do the re-encode - encodeVideoToMPEG2(mediafile, os.path.join(folder, "newfile2.mpg"), video, -- audio1, audio2, aspectratio, profile) -+ folder, audio1, audio2, aspectratio, profile) - mediafile = os.path.join(folder, 'newfile2.mpg') - - #remove the old mediafile that was run through mythtranscode -@@ -4621,7 +4708,7 @@ - elif file.attributes["type"].value=="recording": - mediafile = file.attributes["filename"].value - elif file.attributes["type"].value=="video": -- mediafile=os.path.join(videopath, file.attributes["filename"].value) -+ mediafile=os.path.join(getVideoPath(file.attributes["filename"].value), file.attributes["filename"].value) - elif file.attributes["type"].value=="file": - mediafile=file.attributes["filename"].value - else: -@@ -4701,7 +4788,7 @@ - - #do the re-encode - encodeVideoToMPEG2(mediafile, os.path.join(folder, "newfile2.mpg"), video, -- audio1, audio2, aspectratio, profile) -+ folder, audio1, audio2, aspectratio, profile) - mediafile = os.path.join(folder, 'newfile2.mpg') - - #remove an intermediate file diff --git a/abs/core/mythtv/stable-0.25/mythplugins/mythplugins-mythzoneminder.install b/abs/core/mythtv/stable-0.25/mythplugins/mythplugins-mythzoneminder.install deleted file mode 100644 index a4e0c0d..0000000 --- a/abs/core/mythtv/stable-0.25/mythplugins/mythplugins-mythzoneminder.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - . /etc/systemconfig - if [ $SystemType = Master_backend -o $SystemType = Standalone ] - then - echo "This looks a zoneminder server install" - echo "Installing zoneminder" - #for reference the pacman statement below will not work because of a db lock. - pacman -S zoneminder - fi - -} |