How libdc1394 is used in Psychtoolbox-3
masterlibdc1394 libraries as the video capture engine for Screen when running on GNU/Linux and macOS. It enables driving IIDC compliant machine vision cameras via Firewire or USB-3 (USB-Vision).repository·master·Indexed 19 days ago
https://github.com/psychtoolbox-3/psychtoolbox-3A suite of tools for stimulus presentation and data acquisition in psychological and neuroscience research. It includes a high-quality FTGL-based text rendering plugin for anti-aliased Unicode text, support for research-grade NVidia Optimus timing on Linux, and integration with ARToolkit, freeglut, and libdc1394 for video capture and image processing.
libdc1394 libraries as the video capture engine for Screen when running on GNU/Linux and macOS. It enables driving IIDC compliant machine vision cameras via Firewire or USB-3 (USB-Vision).The repository provides two versions of the modified modesetting driver, which are built from X-Server 1.19.0 source code with specific patches applied:
modesetting_drv.so: This version has both patches applied. It provides both the custom UDP Prime Sync protocol (for timestamping) and low-lag optimizations (for frame lag reduction).modesetting_drv.so_highlag: This version only has the first patch applied (0001-modesetting-Add-custom-UDP-Prime-Sync-protocol-for-P.patch). It provides timestamping functionality but does not include the frame lag reduction optimizations.gcc compiler (specifically for 32-Bit Octave-4 support on Windows), this repository includes lib/libfreeglut.a. This is the import library required for MinGW32 builds, whereas freeglut.lib is intended for MSVC (32-Bit Matlab).When building PsychCV on Windows, you need to manage the ARToolkit libraries provided in the .zip file within this directory:
PsychCV links statically against other AR libraries. You only need to copy the .lib files into your build environment's libs folder; a full user installation of ARToolkit is not required..dll files to your machine's system32/ folder.Psychtoolbox/PsychContributed/ARToolkit/.The PsychSourceGL/Cohorts/PortAudio/ directory contains the static and import libraries required to build the PsychPortaudio component for different platforms. These libraries are derived from upstream Portaudio V19.7.0+.
libportaudio_osx_64.a for static linking.portaudio_x64.lib to build PsychPortaudio.mexw64.MinGW64/portaudio_x64.lib to build PsychPortaudio.mex.The PsychCV mex file utilizes ARToolkit's image processing and tracking capabilities. Note that the PsychCV mex file is provided exclusively for use with GNU/Octave; it is not intended for use with the Mathworks proprietary Matlab environment.
To build PsychCV on Windows, you must manually place the ARToolkit precompiled libraries and DLLs into the appropriate system directories as described below.
# Requirements for Windows build:
1. Copy .lib files to your build environment's /lib folder.
2. Copy .dll files to the system32/ folder of your machine.On Linux, Psychtoolbox-3 links dynamically against the system-installed libdc1394. To ensure you have the necessary development libraries for building Psychtoolbox-3, use your distribution's package manager. For Debian/Ubuntu and derived distributions, run:
sudo apt build-dep psychtoolbox-3To compile a 32-bit freeglut application using Microsoft Visual C++ (MSVC), follow these configuration steps in your project properties:
mainCRTStartup. This is required because GLUT uses main instead of WinMain.freeglut.lib and opengl32.lib are required, the freeglut headers typically handle these dependencies automatically./* Include headers in your source files */
// For standard GLUT compatibility:
#include <GL/glut.h>
// For freeglut-specific extensions:
#include <GL/freeglut.h>For macOS, a 64-Bit Intel libusb-1.0.dylib is provided in the main folder of this subfolder to support building the PsychHID.pyex Python extension without external dependencies.
weak_linking is recommended so that runtime libraries are not mandatory for rarely used functionality./usr/local/ installation, which can be provided via Homebrew.To build PsychOculusVRCore mex files, you must provide the Oculus SDK (version 0.5.0.1). Because of GitHub file size limits, only the Linux version is included in this repository. For OSX and Windows, you must download the original files from the Oculus VR website (select Platform: "PC" and Version "0.5.0.1-beta").
/usr/local/include and the static library into /usr/local/lib. These will be statically linked into the Linux PsychOculusVRCore mex files.
Note: A prebuilt static version libOVR.a is provided for 64-Bit Linux on 64-Bit Intel.LibOVR.framework into the /Library/Frameworks/ directory as LibOVR.framework.LibOVR shim, which dynamically loads the OSX runtime on the HMD computer.Psychtoolbox-3 root folder is located.OculusSDKWin.Psychtoolbox-3 and OculusSDKWin are siblings in the parent folder.LibOVR shim, which will runtime load/link against the installed 0.5 runtime.# Example Windows Directory Structure:
/path/to/parent/
├── Psychtoolbox-3/
└── OculusSDKWin/Depending on the bitness of your software (Octave, Matlab, or Python) on MS-Windows, you must use the corresponding libusb-1.0.dll provided in the Psychtoolbox distribution:
Psychtoolbox/PsychContributed/libusb-1.0.dll.Psychtoolbox/PsychContributed/x64/libusb-1.0.dll.For macOS (OS/X) builds, the precompiled static link libraries (.a files) are stored in a specific project directory. These are intended to be compiled via an Xcode project.
Library Location:
PsychSourceGL/Projects/MacOSX/PsychToolbox/ARToolkitLibs/