Changeset - b246e25b0f25
[Not reviewed]
default
0 3 0
Drew Perttula - 9 years ago 2016-06-07 08:17:13
drewp@bigasterisk.com
fix picamserve config
Ignore-this: 78ac977da6486319bc162d2b25cb5149
3 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/vidref/remotepivideo.py
Show inline comments
 
@@ -25,48 +25,49 @@ class Pipeline(object):
 
        self.graph.addHandler(self.updateCamUrl)
 

	
 
    def updateCamUrl(self):
 
        show = showconfig.showUri()
 
        self.picsUrl = self.graph.value(show, L9['vidrefCamRequest'])
 
        log.info("picsUrl now %r", self.picsUrl)
 
        if not self.picsUrl:
 
            return
 
        
 
        # this cannot yet survive being called a second time
 
        self._startRequest(str(self.picsUrl.replace('/pic', '/pics')) +
 
                           '&res=1080&resize=450')
 
        
 
    def _replaceLiveVideoWidget(self, liveVideo):
 
        aspectFrame = liveVideo.get_parent()
 
        liveVideo.destroy()
 
        img = gtk.Image()
 
        img.set_visible(True)
 
        #img.set_size_request(320, 240)
 
        aspectFrame.add(img)
 
        return img
 
        
 
    def _startRequest(self, url):
 
        self._buffer = ''
 
        log.info('start request to %r', url)
 
        d = treq.get(url)
 
        d.addCallback(treq.collect, self._dataReceived)
 
        # not sure how to stop this
 
        return d
 

	
 
    def _dataReceived(self, chunk):
 
        self._buffer += chunk
 
        if len(self._buffer) < 100:
 
            return
 
        i = self._buffer.index('\n')
 
        size, frameTime = self._buffer[:i].split()
 
        size = int(size)
 
        if len(self._buffer) - i - 1 < size:
 
            return
 
        jpg = self._buffer[i+1:i+1+size]
 
        self.onFrame(jpg, float(frameTime))
 
        self._buffer = self._buffer[i+1+size:]
 
        
 
    def snapshot(self):
 
        """
 
        returns deferred to the path (which is under snapshotDir()) where
 
        we saved the image.
 
        """
 
        filename = "%s/%s.jpg" % (snapshotDir(), time.time())
light9/vidref/vidref.html
Show inline comments
 
@@ -8,49 +8,49 @@
 
     body {
 
       background: black;
 
       color: rgb(170, 170, 170);
 
       font-family: sans-serif; 
 
     }
 
     a {
 
       color: rgb(163, 163, 255);
 
     }
 
     input[type=range] { width: 400px; }
 
     .smallUrl { font-size: 60%; }
 

	
 
     .jcrop-holder {
 
       position: absolute !important;
 
       top: 0 !important;
 
       background-color: initial !important;
 
     }
 
    </style>
 
  </head>
 
  <body>
 
    <h1>video setup</h1>
 
    
 
    <div>Camera view</div>
 
    <div>
 
      <div style="position: relative; display: inline-block">
 
        <img id="cam" src="pic?resize=500&awb_mode=auto&exposure_mode=auto&shutter=100000">
 
        <img id="cam" src="/picamserve/pic?resize=500&awb_mode=auto&exposure_mode=auto&shutter=100000">
 
        <div id="cover" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0;"></div>
 
      </div>
 
    </div>
 
   
 
    <fieldset>
 
      <legend>set these</legend>
 
      <div><label>shutter <input type="range" min="1" max="100000" data-bind="value: params.shutter, valueUpdate: 'input'"></label></div>
 
      <div><label>brightness <span data-bind="text: params.brightness"></span> <input type="range" min="0" max="100" step="1" data-bind="value: params.brightness, valueUpdate: 'input'"></label></div>
 
      <div><label>exposure_mode
 
        <select data-bind="value: params.exposure_mode">
 
          <option>auto</option>
 
          <option>fireworks</option>
 
          <option>verylong</option>
 
          <option>fixedfps</option>
 
          <option>backlight</option>
 
          <option>antishake</option>
 
          <option>snow</option>
 
          <option>sports</option>
 
          <option>nightpreview</option>
 
          <option>night</option>
 
          <option>beach</option>
 
          <option>spotlight</option>
 
        </select>           
 
      </label></div>
makefile
Show inline comments
 
@@ -60,42 +60,42 @@ 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 
 

	
 
packages:
 
	sudo aptitude install coffeescript freemind normalize-audio audacity python-pygoocanvas python-pygame gir1.2-goocanvas-2.0-9 libffi-dev tix libzmq3 python-dev libssl-dev
 

	
 
bower:
 
	cd light9/web/lib; bower install
 
	cd light9/web/lib/N3.js; npm install; npm run browser
 
	cd light9/web/lib/d3; npm install
 

	
 
raspberry_pi_virtualenv:
 
	mkdir -p env_pi
 
	virtualenv --system-site-packages env_pi
 

	
 
raspberry_pi_packages:
 
	sudo apt-get install python-picamera python-twisted 
 
	env_pi/bin/pip install cyclone coloredlogs
 
	sudo apt-get install python-picamera python-dev python-twisted python-virtualenv
 
	env_pi/bin/pip install cyclone 'coloredlogs==1.0.1'
 

	
 
darcs_show_checkpoint:
 
	darcs add --quiet --recursive ${LIGHT9_SHOW} 
 
	darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW}
 

	
 
/usr/share/arduino/Arduino.mk:
 
	sudo aptitude install arduino-mk
 

	
 
arduino_upload: /usr/share/arduino/Arduino.mk
 
	cd rgbled
 
	make upload
 

	
 
effect_node_setup: create_virtualenv packages binexec install_python_deps
 

	
 
coffee:
 
	coffee -cw light9/web/*.coffee
0 comments (0 inline, 0 general)