Page 1 of 1

BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Fri Apr 12, 2019 1:50 pm
by Hendrik Proosa
I'm trying to move my small app from SDK version 1 to version 1.3 but have problem with GetClipAttribute method that takes an attribute and VARIANT and fills the variant with attribute value. It compiles without errors but crashes on runtime:
Code: Select all
// Load frame development settings from file
VARIANT colorScienceGen;
result = processingAttrs->GetClipAttribute(blackmagicRawClipProcessingAttributeColorScienceGen, &colorScienceGen);

Am I using the VARIANT data type incorrectly or what might be the reason for runtime crash? If I comment it out, everything else works as expected. Adding VariantInit(&colorScienceGen) as second line makes no difference.

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Fri Apr 12, 2019 11:55 pm
by CaptainHook
Hey, can you post some more info?
What pipeline/flow/OS are you using?
Can you get other clip attributes such as gamma/gamut/etc? What test clip are you using?
Could you provide more code of what you're trying to do? Feel free to pm me if you would rather not post publicly.

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Sat Apr 13, 2019 7:30 am
by Hendrik Proosa
Hi, thank you for getting in touch. After digging around I took a peek into my application using processhacker and discovered that it loaded wrong DLL file which caused crash when using any of the new methods. I don't use the CreateBlackmagicRawFactoryInstanceFromPath method yet for directing it to DLL path and thought that if it is in application directory it would load first. Seems though that library from previous version that I had registered in system loaded instead.

So it seems everything works now :)

Just in case I'll put down my details in case something else fails and I need more help.

OP Sys: Win 7 x64
Compiler used: MSVC2015 x64 compiler
Currently use CPU decode pipeline, nothing fancy yet, no manual decoder flow
Test clips are the ones that came when BRAW was released (wedding etc) plus some test footage from net

I started moving to new sdk by the plain basic way of eliminating compiler errors first and after that was done, started digging why it crashed. As getClipAttribute was actually first method in my soft that had syntax changed, it produced the crash when old dll was loaded. After commenting all the get/set methods out, playback worked.

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Sun Apr 14, 2019 11:39 pm
by CaptainHook
Okay glad you got it sorted. It is an important note that change from the read me:
• Removed BlackmagicRawAPI.dll registration as a system COM object (users are recommended to bundle in to their application).

Let us know if you have any other problems.

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Fri May 03, 2019 8:59 am
by Hendrik Proosa
Hi, I'll add my new question to old thread...

I'm trying to get CUDA decoder to work and have set everything up similar to ProcessClipCuda code example. I can successfully create cuda context and switch pipeline to CUDA, also verifying with GetPipeline tells me current pipeline is 'cuda'. What fails is that ProcessComplete returns an error code -2147467259 (E_FAIL), not S_OK as result. Returned resource is properly identified as CUdevieptr.

What might be the reason ProcessComplete fails in CUDA pipeline?

PS. Does anyone have a working example of how to properly use CUDA resources? I have a so-so idea of how to handle it, but a working example would be nice.

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostPosted: Mon May 06, 2019 12:45 am
by CaptainHook
Hi, are you using the manual flow now or still the "auto"?
What are you doing different to the ProcessClipCuda code example? I assume the example works for you fine?Might need to see some of your code to get a better idea. Feel free to send privately via PM if you would rather.