Skip to content

Instantly share code, notes, and snippets.

@jvcleave
jvcleave / gist:3835128
Created October 4, 2012 17:28
ofRGBCube
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
int dimensions = 256;
mesh.setMode(OF_PRIMITIVE_POINTS);
float direction = dimensions * 0.5 - 0.5;
for (int r=0; r<dimensions; r++)
{
@jvcleave
jvcleave / gist:3905740
Created October 17, 2012 14:17
setGlutDisplayString
window.setGlutDisplayString("rgba double samples>=6 depth");
@jvcleave
jvcleave / gist:4123245
Created November 21, 2012 05:28
RaspberryPI successful webcam test command
pi@raspberrypi /dev/v4l/by-id $ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 30
MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
@jvcleave
jvcleave / gist:4138914
Created November 24, 2012 08:42
Raspberry PI test.h264 format
pi@raspberrypi /opt/vc/src/hello_pi/hello_video $ mediainfo test.h264.org
General
Complete name : test.h264.org
Format : AVC
Format/Info : Advanced Video Codec
File size : 29.6 MiB
Video
Format : AVC
Format/Info : Advanced Video Codec
@jvcleave
jvcleave / gist:4141486
Created November 24, 2012 21:33
setupRPiNativeWindow
//------------------------------------------------------------
bool ofAppEGLWindow::setupRPiNativeWindow(int w, int h, int screenMode){
#ifdef TARGET_RASPBERRY_PI
bcm_host_init();
//boolean force HDMI vs. composite
int32_t success = 0;
@jvcleave
jvcleave / gist:4152860
Created November 27, 2012 07:06
ldd ./jvc_fboTest
/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x40391000)
libudev.so.0 => /lib/arm-linux-gnueabihf/libudev.so.0 (0x400af000)
libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x40087000)
libEGL.so => /opt/vc/lib/libEGL.so (0x40050000)
libopenmaxil.so => /opt/vc/lib/libopenmaxil.so (0x4001c000)
libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x401ff000)
libvcos.so => /opt/vc/lib/libvcos.so (0x40041000)
libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x400c4000)
libfreeimage.so.3 => /usr/lib/libfreeimage.so.3 (0x40100000)
libcairo.so.2 => /usr/lib/arm-linux-gnueabihf/libcairo.so.2 (0x40218000)
@jvcleave
jvcleave / gist:4159230
Created November 28, 2012 05:33
buildAllExamplesRPI.sh
#!/bin/bash
#assumes script is in openFrameworks/scripts/linux
#assumes using distcc setup by https://github.com/openFrameworks-RaspberryPi/openFrameworks/wiki/Raspberry-Pi-Cross-compiling-guide
export LC_ALL=C
export DISTCC_FALLBACK=0
cd ../../examples
for category in $( ls . )
do
@jvcleave
jvcleave / gist:4159390
Created November 28, 2012 06:25
remove files older than 5 days
find ./ -mtime +5 -exec rm -f {} \;
@jvcleave
jvcleave / gist:4200675
Created December 4, 2012 04:53
mplayer fingers.mov output
Playing fingers.mov.
libavformat version 53.21.0 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 320x240 24bpp 30.099 fps 258.9 kbps (31.6 kbyte/s)
Clip info:
major_brand: qt
minor_version: 512
compatible_brands: qt
@jvcleave
jvcleave / gist:4200846
Created December 4, 2012 05:14
videoPlayerExample debug
pi@raspberrypi ~/openFrameworks/apps/devApps/videoPlayerExample/bin $ export GST_DEBUG=2
pi@raspberrypi ~/openFrameworks/apps/devApps/videoPlayerExample/bin $ ./videoPlayerExample_debug
ofAppEGLWindow constructor
in ofAppEGLWINDOW: setupOpenGL
succes=0
REQUESTED SCREEN SIZE w=1280 and h=720
HARDWARE SCREEN SIZE IS sw=1280 and sh=720
CREATING A SCREEN THAT IS w=1280 and h=720
[ofAppEGLWindow::setupEGL:notice] setting EGL Display
[ofAppEGLWindow::setupEGL:notice] setting default Display