Giter Club home page Giter Club logo

ofxblackmagic2's Introduction

ofxBlackmagic2

Features:

  • Uses DeckLink SDK for colour conversion (much faster/more efficient than hand-rolled solutions)
  • Designed for use with multiple devices (and devices with multiple inputs, e.g. DeckLink Quad)
  • Object oriented with namespaces
  • Lockable frames for threading

Alternatives:

Installation

This addon has been tested on Windows, but it should also work on OSX and Linux (by including the DeckLink SDK's for those platforms in your project and ignoring DeckLinkAPI_i.c, DeckLinkAPI_i.h).

On Windows, install BlackMagic Desktop Video (not the SDK), then try out an example.

Designed to work with all DeckLink products, e.g.:

  • Intensity Pro/Shuttle/Thunderbolt
  • DeckLink Quad
  • DeckLink SDI
  • UltraStudio 4K
  • UltraStudio Mini Recorder
  • etc

Tested with:

  • DeckLink Quad
  • Blackmagic Production Camera 4k
  • Intensity Pro

Warning

Due to particular type names in DeckLinkAPI.h, ofxBlackMagic.h must be included before ofMain.h (or addons which include ofMain.h) in your ofApp.h (or elsewhere).

Setting up new projects

Visual Studio 2012

Remove CompileAsCpp

By default (as of 30-09-2013, oF 008), openFrameworks projects are created with a specific flag turned on called CompileAsCpp. To use the DeckLink API, you need to turn this flag off. I've done this for you in the examples, so feel free to just grab one of the example projects and run from there.

If you want to add ofxBlackmagic2 to an existing project, then you need to do the following steps:

  1. Right click on your app project in Visual Studio and select 'Properties'.
  2. In the <u>C</u>onfiguration drop down box select All Configurations (this means that you're editing Debug and Release at the same time).
  3. Browse the tree on the left to Configuration Properties\ C/C++ \ Advanced
  4. Change the property CompileAs so that it reads Default
  5. Hit OK to save

If you don't make this change, then it's highly likely that you'll experience linker errors (e.g. something like 'undefined symbols'). See http://forum.blackmagicdesign.com/viewtopic.php?f=10&t=13195 for more details.

Using ofxBlackmagicLib pattern

ofxBlackmagic2 follows the pattern of 'one project and one namespace per sizeable addon' pattern. This means that the best way of using ofxBlackmagic2 is NOT to put the files from ofxBlackmagic2/src into your app project, but to add the ofxBlackmagicLib/ofxBlackmagicLib.vcxproj project to your app's solution, and to add only the ofxBlackmagic2/src to your include search path.

To do this follow these steps:

  1. Right click on your solution and choose Add`Existing Project...`
  2. Select ofxBlackmagic2/ofxBlackmagicLib/ofxBlackmagicLib.vcxproj
  3. Right click on your app project and select Properties
  4. Go to Common Properties at the top of the tree on the left
  5. Hit the Add <u>N</u>ew Reference button and select ofxBlackmagicLib
  6. Hit OK to save

Include Order

ofxBlackmagic2 is a little finicky about the order it is added in, and must be included before everything else in your program.

  1. Make sure ofxBlackMagic2.h is included above everything else in your ofApp.h file (or wherever else you are using it).
    #pragma once
    
    #include "ofxBlackmagic.h"
    #include "ofMain.h"
    
    ...
    
  2. Make sure ofApp.h (or whichever file is including the addon) is included above everything else in your main.cpp file.
    #include "ofApp.h"
    #include "ofMain.h"
    
    //========================================================================
    int main(){
        ...
    }
    

License

MIT License http://opensource.org/licenses/MIT

ofxblackmagic2's People

Contributors

elliotwoods avatar hanasaan avatar jgl avatar prisonerjohn avatar rjx-ray avatar satoruhiga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.