boinx / DeckLink

ObjC wrapper for the Blackmagic Design DeckLink SDK
MIT License
15 stars 12 forks source link

multiple devices #6

Open kcwvc52 opened 5 years ago

kcwvc52 commented 5 years ago

would this framework allow multiple devices to be used simultaneously?

achimb commented 5 years ago

Hi,

yes it will work with multiple devices simultaneously. However there are some restrictions for Blackmagic Design Ultra Studio Mini Recorders: Because they don’t keep their unique device ID after reboot you may need to adjust it.

You can see the framework in action in our product mimoLIve: https://boinx https://boinx/.com/mimoLive

best,

Achim Breidenbach Boinx Software Ltd.

On 11.06.2019, at 19:32, kcwvc52 notifications@github.com wrote:

would this framework allow multiple devices to be used simultaneously?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boinx/DeckLink/issues/6?email_source=notifications&email_token=AAE3FIXMRV4Q7M34YBNLGBTPZ7ORPA5CNFSM4HXBMBK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GY36GYA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE3FIT7RHBOL6KUVUANRVDPZ7ORPANCNFSM4HXBMBKQ.

kcwvc52 commented 5 years ago

great thanks. any sample code on this?

kcwvc52 commented 5 years ago

does anyone have anything on this? can this be used inside of apple swift?

achimb commented 5 years ago

You should be able to use those libraries with swift.

For Sample code please check out the DeckLinkTests folder and the files here.

I hope this helps. If you have any specific questions I will try to answer them.

Best,

Achim

On 18.06.2019, at 13:20, kcwvc52 notifications@github.com wrote:

does anyone have anything on this? can this be used inside of apple swift?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boinx/DeckLink/issues/6?email_source=notifications&email_token=AAE3FIX7JRGEK62274RBW4LP3DAIJA5CNFSM4HXBMBK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX6BXLQ#issuecomment-503061422, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE3FIXHM3DKEGXXEKEIAC3P3DAIJANCNFSM4HXBMBKQ.

kcwvc52 commented 5 years ago

yea my objective c knowledge is limited but I have combed through the code pretty hard. I can't find any reference to nsview where I am trying to display the video 2. I did finally load a list of my connected devices in swift.

achimb commented 5 years ago

To capture an image and display it, I would recommend something like this, see DeckLin_041_Capture.m file:

In testSimpleCapture method you can see how the capture process is set up. Your frame receiving class must implement the "DeckLinkDeviceCaptureVideoDelegate"-protocol and need to be set as delegate as done in line 83.

(Ignore Line 122 through 136 as they are only for the test.)

After starting the device in Line 117 your delegate object will be called on the callback - (void)DeckLinkDevice:(DeckLinkDevice *)device didCaptureVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer. (see line 114)

Here you can grab the image buffer from the sampleBuffer and convert it to an NSImage with this code:

CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
NSCIImageRep *imageRep = [NSCIImageRep imageRepWithCIImage:[CIImage imageWithCVImageBuffer:imageBufferRef]];
NSImage *image = [[NSImage alloc] initWithSize:CVImageBufferGetDisplaySize(imageBufferRef)];
[image addRepresentation:imageRep];

Now you can do anything with this NSImage image (e.g. put it into an NSImageView).

Hope this helps!

kcwvc52 commented 5 years ago

that worked out great! do u happen to have a objective c wrapper for NDI sdk?

achimb commented 5 years ago

yes we do, but I can’t share it with you, sorry!

On 06.08.2019, at 18:48, kcwvc52 notifications@github.com wrote:

that worked out great! do u happen to have a objective c wrapper for NDI sdk?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boinx/DeckLink/issues/6?email_source=notifications&email_token=AAE3FIVJ47MH7LW2PIKUWZDQDGTNVA5CNFSM4HXBMBK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3VYM3Y#issuecomment-518751855, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE3FIVEEOSAU2ZHI2P7GR3QDGTNVANCNFSM4HXBMBKQ.