[vlc-devel] [PATCH V3] dcp: Creation of access-demux module for DCP (using asdcplib)

Rémi Denis-Courmont remi at remlab.net
Mon Sep 2 19:00:58 CEST 2013


Le lundi 2 septembre 2013 16:42:10 Rémi Denis-Courmont a écrit :
> On Mon, 02 Sep 2013 16:16:36 +0200, Nicolas Bertrand
> 
> <nicoinattendu at gmail.com> wrote:
> > If somebody have an idea to avoid the memcpy ....
> > PicFrameBuff.Data() is defined as
> > 
> >   class FrameBuffer
> >   
> >      {
> >      
> >        ASDCP_NO_COPY_CONSTRUCT(FrameBuffer);
> >      
> >      protected:
> >        byte_t* m_Data;          // pointer to memory area containing
> > 
> > frame data
> > 
> >        }
> > 
> > and so how to write something like p_video_frame->p_buffer
> > =&PicFrameBuff.Data
> 
> If the library is designed properly, it should allow subclassing the frame
> buffer so as to wrap custom memory, namely VLC picture_t.

Hmm, that's for decoders.

For demuxers, there are two ways to avoid memory copying. A custom block_t 
allocator/deallocator can be created with block_Init(). This is more flexible 
but more prone to implementation errors.

Alternatively, custom callbacks for output frame buffer allocation can be 
provided to the library (most libraries support that).

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list