[vlc-devel] [PATCH] access module for BlackMagic SDI cards

Steinar H. Gunderson sgunderson at bigfoot.com
Sun Oct 3 00:58:28 CEST 2010


On Sat, Oct 02, 2010 at 09:18:27PM +0200, Laurent Aimar wrote:
>  - the blackmagic pictures have a stride equals to the width (in pixels
>    not numerical value)

No. The stride can be different from the width.

>  - the SDK allows to keep a reference to its buffer.

You can AddRef() the buffer; otherwise it will be destroyed at the return of
the callback function.

>> And does Demux() not get stuck if we never get an image? Is that possible at 
>> all? Do you really need the mutex and condition variable?
> That's why I requested the code to be changed to not need Demux() at all. No
> polling and no deadlock.

There's never going to be a _deadlock_; as soon as the frames arrive,
everything's fine (and nothing in Demux() prevents them from arriving).

In any case, it appears like sending the frames directly from the thread
works; I've only made pretty rudimentary checking, though (I haven't looked
at latency the same way I did with Demux() in particular), but it's a simpler
solution so I guess it should be fine. New patch attached.

/* Steinar */
-- 
Homepage: http://www.sesse.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-access-module-for-BlackMagic-SDI-cards-decklink.patch
Type: text/x-diff
Size: 27249 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101003/383210bb/attachment.patch>


More information about the vlc-devel mailing list