Changeset - b281ee32c785
[Not reviewed]
default
0 4 0
Drew Perttula - 11 years ago 2014-06-02 07:46:55
drewp@bigasterisk.com
use Pillow. make vidref start up
Ignore-this: 52ba5ec2409bbf446c7592d3646220ad
4 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
bin/vidref
Show inline comments
 
#!bin/python
 
from run_local import log
 
import sys
 
sys.path.append('/usr/lib/python2.7/dist-packages') # For gtk
 
from twisted.internet import gtk2reactor
 
gtk2reactor.install()
 
from twisted.internet import reactor, defer
 
import gobject
 
gobject.threads_init()
 
import gtk
 
import sys, logging, optparse, json
 
sys.path.append(".")
 
from light9 import networking
 
from light9.vidref.main import Gui
 
from light9.vidref.replay import snapshotDir
 
import cyclone.web, cyclone.httpclient, cyclone.websocket
 

	
 
 # find replay dirs correctly. show multiple
 
 # replays. trash. reorder/pin. dump takes that are too short; they're
 
 # just from seeking
 

	
 
parser = optparse.OptionParser()
 
parser.add_option("-v", "--verbose", action="store_true",
 
                  help="logging.DEBUG")
 
(options, args) = parser.parse_args()
 

	
 

	
 
log.setLevel(logging.DEBUG)
light9/vidref/videorecorder.py
Show inline comments
 
import pygst
 
pygst.require("0.10")
 
import gst, gobject, time, logging, os, traceback
 
import gtk
 
import Image
 
from PIL import Image
 
from threading import Thread
 
from twisted.internet import defer
 
from Queue import Queue, Empty
 
from light9.vidref.replay import framerate, songDir, takeDir, snapshotDir
 
log = logging.getLogger()
 

	
 
class Pipeline(object):
 
    def __init__(self, liveVideoXid, musicTime, recordingTo):
 
        self.musicTime = musicTime
 
        self.liveVideoXid = liveVideoXid
 
        self.recordingTo = recordingTo
 
        self.snapshotRequests = Queue()
 

	
 
        try:
 
            os.makedirs(snapshotDir())
 
        except OSError:
 
            pass
 

	
 
    def snapshot(self):
 
        """
 
        returns deferred to the path (which is under snapshotDir()) where
 
        we saved the image. This callback comes from another thread,
 
        but I haven't noticed that being a problem yet.
 
        """
makefile
Show inline comments
 
@@ -6,50 +6,48 @@ tests:
 
tests_watch:
 
	eval env/bin/nosetests --with-watch $(NOSEARGS)
 

	
 

	
 
# needed packages: python-gtk2 python-imaging
 

	
 
install_python_deps: link_to_sys_packages
 
	env/bin/pip install -r pydeps
 

	
 
DP=/usr/lib/python2.7/dist-packages
 
SP=env/lib/python2.7/site-packages
 

	
 
link_to_sys_packages:
 
	# http://stackoverflow.com/questions/249283/virtualenv-on-ubuntu-with-no-site-packages
 
	ln -sf $(DP)/glib $(SP)/
 
	ln -sf $(DP)/gi $(SP)/
 
	ln -sf $(DP)/gobject $(SP)/
 
	ln -sf $(DP)/cairo $(SP)/
 
	ln -sf $(DP)/gtk-2.0 $(SP)/
 
	ln -sf $(DP)/pygtk.py $(SP)/
 
	ln -sf $(DP)/pygtk.pth $(SP)/
 
	ln -sf $(DP)/pygst.pth $(SP)/
 
	ln -sf $(DP)/pygst.py $(SP)/
 
	ln -sf $(DP)/gst-0.10 $(SP)/
 
	ln -sf $(DP)/PIL $(SP)/
 
	ln -sf $(DP)/PIL.pth $(SP)/
 
	ln -sf $(DP)/goocanvasmodule.so $(SP)/
 

	
 
PYTHON=/usr/bin/pypy
 
PYTHON=/usr/bin/python
 

	
 
create_virtualenv:
 
	mkdir -p env
 
	virtualenv -p $(PYTHON) env
 
	ln -sf ../env/bin/python bin/python
 

	
 
tkdnd_build:
 
	# get tkdnd r95 with subversion
 
	# then apply tkdnd-patch-on-r95 to that
 
	cd tkdnd/trunk
 
	./configure
 
	make
 

	
 
bin/ascoltami2: gst_packages link_to_sys_packages
 

	
 
gst_packages:
 
	sudo aptitude install python-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio gir1.2-goocanvas-2.0-9
 

	
 
packages:
 
	sudo aptitude install coffeescript freemind normalize-audio audacity python-pygoocanvas python-pygame
pydeps
Show inline comments
 
rdflib==4.1.2
 
Twisted==14.0.0
 
webcolors==1.4
 
Louie==1.1
 
cyclone==1.1
 

	
 
web.py==0.37
 
restkit==4.2.2
 
ipython==2.1.0
 
nose==1.3.3
 
nose-alert==0.9.0
 
ipdb==0.8
 
coloredlogs==0.5
 
genshi==0.7
 
pyjade==2.2.0
 
python-dateutil==2.2
 
txosc==0.2.0
 
service_identity==0.2
 
\ No newline at end of file
 
service_identity==0.2
 
Pillow==2.4.0
 
\ No newline at end of file
0 comments (0 inline, 0 general)