Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Sharing FFMPEG Datatypes
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2016-06-25 16:53:09


On 24/06/2016 4:14, Loren Garavaglia wrote:
> Hi All,
>
> I'm trying to figure out if it's possible using Boost to share FFMPEG
> data between 2 processes. What I'm trying to do is have one process read
> from a video stream and place the received packets in a buffer. The
> other process then reads from the buffer, decodes the packet, and does
> some analysis on the image. Unfortunately, due to some constraints I
> cannot take a multi-threaded approach to this problem.
>
> My data that I would like to share is as follows:
>
> struct FFMPEGData {
> AVFormatContext *pFormatCtx;
> AVCodecContext *pCodecCtx;
> AVCodec *pCodec;
> AVFrame *pFrame, dst;
> AVPacket *packet;
> AVPacket* pack = new AVPacket[packetNum];
>
> struct SwsContext *convert_ctx;
> };
>

You can't place in shared memory raw pointers or any other handle to
data that belongs to a process. So you need to use your own data structures.

Best

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net