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

Nicolas Bertrand nicoinattendu at gmail.com
Mon Sep 2 16:16:36 CEST 2013


Le 02/09/2013 16:10, Nicolas Bertrand a écrit :
> +    switch( p_sys->PictureEssType )
> +    {
> +        case ESS_JPEG_2000:
> +        {
> +            JP2K::MXFReader *p_PicMXFReader = p_sys->p_PicMXFReader;
> +            JP2K::FrameBuffer PicFrameBuff( FRAME_BUFFER_SIZE );
> +
> +            Result_t result = p_PicMXFReader->ReadFrame( i, PicFrameBuff, 0, 0 );
> +            if( ! ASDCP_SUCCESS( result ) )
> +            {
> +                msg_Err( p_demux, "Couldn't read frame with ASDCP");
> +                return -1;
> +            }
> +
> +            if( ( p_video_frame = block_Alloc( PicFrameBuff.Size() ) ) != NULL )
> +                memcpy( p_video_frame->p_buffer, PicFrameBuff.Data(), PicFrameBuff.Size() );
> +            else
> +                return -1;

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

Chhers
Nicolas





More information about the vlc-devel mailing list