kylemcdonald / ofxBlackmagic

Simplified and optimized Black Magic DeckLink SDK grabber.
Other
79 stars 29 forks source link

App don't run #10

Open yasuhirohoshino opened 8 years ago

yasuhirohoshino commented 8 years ago

When I run my app including this addon, it output a lot of error messages and don't work. Error messages are following.

[ error ] ofGLUtils: ofGetGLInternalFormatFromPixelFormat(): unknown OF pixel format-1, returning GL_RGBA [ error ] ofGLUtils: ofGetGLFormatFromPixelFormat(): unknown OF pixel format-1, returning GL_LUMINANCE [ error ] ofTexture: allocate(): ofTextureData has 0 width and/or height: 0x0 ......

So I tried to uncomment 'ofxBlackMagic::getColorPixels()' line 80 - 83, it work.

radames commented 8 years ago

Had the same issue here with my UltraStudio Mini recorder, did uncomment the lines and worked perfect. Seems like the controller.rgbaFrame colour conversion using DeckLink SDK it's not working.

smallfly commented 8 years ago

Hi,

I can confirm that the color conversion using the DeckLink SDK is working. You are getting these messages because there is still no rgbaFrame available, and therefore colorPix has not been allocated yet.

If I use the example project included, you could simply wait for a frame before drawing the color texture:

    void draw() {
        if (ofGetFrameNum() <= 1) {
            return;
        }

        cam.drawColor();
        ofDrawBitmapStringHighlight(ofToString((int) timer.getFramerate()), 10, 20);
    }

That being said, it would be certainly better to deal with this, to some extent, in the add-on. I may have time to do this in the coming days.