Page 1 of 1

BlackMagic RAW SDK C++ Code Samples?

PostPosted: Tue Mar 08, 2022 6:57 pm
by Vincent_Dory
Hello,

I am interested in using BlackMagic's RAW SDK to decode .braw files into other formats using C++ code. The download for the SDK has all .so files needed to run the SDK, but there is no sample code that I can find in the download or the BlackMagic website that contains sample code using the SDK.

Is there any public sample code that uses the RAW SDK? I have the documentation on using the SDK, but having seeing some sample code would make it easier for me to learn as well.

Thanks!

Re: BlackMagic RAW SDK C++ Code Samples?

PostPosted: Tue Mar 08, 2022 11:47 pm
by CaptainHook
Hi,

When you install Blackmagic RAW there is a folder added for the Blackmagic RAW SDK, and within each platform folder a "Samples" folder that has sample code for that platform.

Eg on macOS they are found here:

Image

Re: BlackMagic RAW SDK C++ Code Samples?

PostPosted: Sun Apr 17, 2022 3:40 pm
by Entropy512
This is not the case for the current Linux download (2.3) of the BRAW SDK:

Code: Select all
adodd@andyslaptop:~/Downloads/braw$ tree Blackmagic\ RAW/
Blackmagic RAW/
├── BlackmagicRAW
│   ├── BlackmagicRawAPI
│   │   ├── libBlackmagicRawAPI.so
│   │   ├── libc++abi.so.1
│   │   ├── libc++.so.1
│   │   ├── libDecoderCUDA.so
│   │   ├── libDecoderOpenCL.so
│   │   ├── libInstructionSetServicesAVX2.so
│   │   └── libInstructionSetServicesAVX.so
│   ├── BlackmagicRAWPlayer
│   │   ├── BlackmagicRawAPI
│   │   │   ├── libBlackmagicRawAPI.so
│   │   │   ├── libc++abi.so.1
│   │   │   ├── libc++.so.1
│   │   │   ├── libDecoderCUDA.so
│   │   │   ├── libDecoderOpenCL.so
│   │   │   ├── libInstructionSetServicesAVX2.so
│   │   │   └── libInstructionSetServicesAVX.so
│   │   ├── BlackmagicRAWPlayer
│   │   ├── lib
│   │   │   ├── fonts
│   │   │   │   └── fonts.bin
│   │   │   ├── libQt5Core.so.5
│   │   │   ├── libQt5DBus.so.5
│   │   │   ├── libQt5Gui.so.5
│   │   │   ├── libQt5Multimedia.so.5
│   │   │   ├── libQt5Network.so.5
│   │   │   ├── libQt5Widgets.so.5
│   │   │   └── libQt5XcbQpa.so.5
│   │   ├── plugins
│   │   │   ├── audio
│   │   │   │   └── libqtaudio_alsa.so
│   │   │   ├── bearer
│   │   │   │   ├── libqconnmanbearer.so
│   │   │   │   ├── libqgenericbearer.so
│   │   │   │   └── libqnmbearer.so
│   │   │   ├── imageformats
│   │   │   │   ├── libqgif.so
│   │   │   │   ├── libqjpeg.so
│   │   │   │   ├── libqtiff.so
│   │   │   │   └── libqwbmp.so
│   │   │   ├── mediaservice
│   │   │   │   └── libqtmedia_audioengine.so
│   │   │   ├── platforms
│   │   │   │   └── libqxcb.so
│   │   │   └── xcbglintegrations
│   │   │       ├── libqxcb-egl-integration.so
│   │   │       └── libqxcb-glx-integration.so
│   │   ├── qt.conf
│   │   └── Third Party Licenses.rtf
│   └── BlackmagicRAWSpeedTest
│       ├── BlackmagicRawAPI
│       │   ├── libBlackmagicRawAPI.so
│       │   ├── libc++abi.so.1
│       │   ├── libc++.so.1
│       │   ├── libDecoderCUDA.so
│       │   ├── libDecoderOpenCL.so
│       │   ├── libInstructionSetServicesAVX2.so
│       │   └── libInstructionSetServicesAVX.so
│       ├── BlackmagicRAWSpeedTest
│       ├── Blackmagic RAW Speed Test.pdf
│       ├── lib
│       │   ├── fonts
│       │   │   └── fonts.bin
│       │   ├── libQt5Core.so.5
│       │   ├── libQt5DBus.so.5
│       │   ├── libQt5Gui.so.5
│       │   ├── libQt5Multimedia.so.5
│       │   ├── libQt5Network.so.5
│       │   ├── libQt5Widgets.so.5
│       │   └── libQt5XcbQpa.so.5
│       ├── plugins
│       │   ├── audio
│       │   │   └── libqtaudio_alsa.so
│       │   ├── bearer
│       │   │   ├── libqconnmanbearer.so
│       │   │   ├── libqgenericbearer.so
│       │   │   └── libqnmbearer.so
│       │   ├── imageformats
│       │   │   ├── libqgif.so
│       │   │   ├── libqjpeg.so
│       │   │   ├── libqtiff.so
│       │   │   └── libqwbmp.so
│       │   ├── mediaservice
│       │   │   └── libqtmedia_audioengine.so
│       │   ├── platforms
│       │   │   └── libqxcb.so
│       │   └── xcbglintegrations
│       │       ├── libqxcb-egl-integration.so
│       │       └── libqxcb-glx-integration.so
│       ├── profile.braw
│       ├── qt.conf
│       └── Third Party Licenses.rtf
├── BlackmagicRAW_2.3.tar.gz
└── blackmagic-raw-2.3.x86_64.rpm

24 directories, 71 files


Not only is sample code missing, the SDK download for Linux does not even contain header files, making it kind of useless.

And yes, I have tried using rpm2cpio to extract the RPM to determine if there is anything present in the RPM that is not present in the .tar.gz - there is not any additional content that is in BlackmagicRAW_2.3.tar.gz

We should not have to download BOTH the Linux and Windows SDKs and use msiextract on the Windows version to find sample code.

Re: BlackMagic RAW SDK C++ Code Samples?

PostPosted: Fri Sep 30, 2022 5:55 am
by Chris Hocking
Are you sure you're downloading the right thing?

There's definitely Linux example code in the macOS SDK download:

Screen Shot 2022-09-30 at 3.54.26 pm.png
Screen Shot 2022-09-30 at 3.54.26 pm.png (239.39 KiB) Viewed 3035 times

Re: BlackMagic RAW SDK C++ Code Samples?

PostPosted: Tue Nov 01, 2022 5:57 pm
by Entropy512
Chris Hocking wrote:Are you sure you're downloading the right thing?

There's definitely Linux example code in the macOS SDK download:

Screen Shot 2022-09-30 at 3.54.26 pm.png

Apparently my problem was downloading the right thing.

It's kind of ridiculous that we need to download the WRONG thing (MacOS SDK or Windows SDK) to get Linux example code...

Re: BlackMagic RAW SDK C++ Code Samples?

PostPosted: Wed Nov 02, 2022 8:29 am
by CaptainHook
After the .rpm is installed, the SDK files can be found in /usr/lib/blackmagic/BlackmagicRAWSDK, with subdirectories for Linux, Windows, and Mac containing the includes and samples.