Skip to content

Instantly share code, notes, and snippets.

@jvcleave
jvcleave / gist:4212244
Created December 5, 2012 04:30
ofLog printf style
ofLog(OF_LOG_NOTICE,"%s %d x %d framerates:",
video_format.mimetype.c_str(), video_format.width,
video_format.height);
@jvcleave
jvcleave / ofVideoGrabberRPI
Created December 5, 2012 08:00
ofVideoGrabberRPI
#include "testApp.h"
bool hasStarted = false;
//--------------------------------------------------------------
void testApp::setup(){
ofSetLogLevel(OF_LOG_VERBOSE);
camWidth = 320; // try to grab at this size.
camHeight = 240;
@jvcleave
jvcleave / testApp.cpp
Created December 7, 2012 05:38
simple ofxOpenCv RPI test
#include "testApp.h"
bool hasCaptured = false;
//--------------------------------------------------------------
void testApp::setup(){
ofSetLogLevel(OF_LOG_VERBOSE);
logo1.loadImage("ofLogo1.jpg");
w = logo1.getWidth();
h = logo1.getHeight();
@jvcleave
jvcleave / RPI pkgs
Last active October 13, 2015 20:47
RPI pkgs
//WHEEZY
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev gstreamer0.10-ffmpeg libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev libjack-jackd2-dev python-lxml python-argparse portaudio19-dev alsa-utils git libopencv-dev avahi-daemon avahi-utils libavahi-compat-libdnssd-dev distcc libusb-1.0-0-dev samba samba-common-bin autoconf libtool cmake libmpg123-0 libmpg123-dev libjsoncpp-dev libfftw3-dev
//JESSIE
GTK_VERSION=-3
GSTREAMER_VERSION=1.0
sudo apt-get install libmpg123-dev alsa-base alsa-tools alsa-utils libupnp-dev automake cvs libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev python-lxml python-argparse libfreetyp
@jvcleave
jvcleave / RPI install samba
Created December 11, 2012 21:44
RPI install samba
pi@raspberrypi ~ $ sudo apt-get install samba samba-common-bin
pi@raspberrypi ~ $ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
pi@raspberrypi ~ $ sudo rm /etc/samba/smb.conf
pi@raspberrypi ~ $ sudo nano /etc/samba/smb.conf
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
[verbose] ofGstUtils: gstreamer inited
[verbose] loading file:///home/pi/openFrameworks/apps/jvcRPIApps/rpi_gstOmxPlayer/bin/data/big_buck_bunny_480p_h264.mov
[verbose] attaching callbacks
[warning] GStreamer: cannot query time duration
** (rpi_gstOmxPlayer:3076): WARNING **: gstvideo: failed to get caps of pad app_sink:sink
[error] GStreamer: cannot query width and height
[verbose] GStreamer: Got state-changed message from streamsynchronizer0
[verbose] GStreamer: streamsynchronizer0 state changed from null to ready (void pending)
[verbose] GStreamer: Got state-changed message from playsink0
OpenNI really wants java - it can probably be removed but this process currrently requires it
pi@raspberrypi ~ $ sudo apt-get install openjdk-6-jdk libusb-1.0-0-dev
INSTALLING OPENNI
pi@raspberrypi ~ $ cd
pi@raspberrypi ~ $ mkdir OPENNI
pi@raspberrypi ~ $ cd OPENNI
pi@raspberrypi ~/OPENNI $ mkdir OPENNI_RPI
pi@raspberrypi ~/OPENNI $ cd OPENNI_RPI
pi@raspberrypi ~/OPENNI/OPENNI_RPI $ wget http://www.jvcref.com/files/PI/openni/OPENNI_RPI_SRC.zip
@jvcleave
jvcleave / distcc
Last active December 10, 2015 06:29
/etc/default/distcc
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc
DISTCC_VERBOSE=1
DISTCC_FALLBACK=0
#
# should distcc be started on boot?
#
# STARTDISTCC="true"
STARTDISTCC="true"
@jvcleave
jvcleave / ping in c++
Last active December 10, 2015 20:08
ping in c++
string deviceIP2 = "169.254.175.209";
string response = "";
char pipeBuffer[128];
FILE *pipe;
string command = "ping "+ deviceIP2;
pipe = _popen( command.c_str(), "rt" );
if( pipe )
{
while(fgets(pipeBuffer, 128, pipe))
@jvcleave
jvcleave / ofxOMXPlayer static make
Created January 27, 2013 21:23
ofxOMXPlayer static make
################################################################################
# CONFIGURE PROJECT MAKEFILE
# This file is where we make project specific configurations.
################################################################################
OF_ROOT=../../..
################################################################################
# Custom Application Name
# Will default to the project's folder name if not defined.