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;
    };

With "pack" being my buffer with a set size.

I tried following the boost example here but it seems to be for a simpler form of complex data. All of the FFMPEG datatypes are structs themselves, so I wasn't sure what to do.

My question is, is it even possible to share these kinds of datatypes between processes using Boost Interprocess and if so do I need to create allocators and containers for all of the data fields within these FFMPEG datatypes?


Thanks,
Loren