Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

mpeg4 stream decoding from memory

bendeguy
Beginner
181 Views

Hi!

I would like to decode mpeg4 video stream. The stream come from a camera and it is stored in the memory. After I've decoded itI will get another part of the stream from the camera. I can decode an mpeg4 avi file with the modified MJPEG sample code, but I don't know how to decode a stream from the memory. FIOReader reads from a file, but I don't know how to init datareader to read from memory. Do I have to use avisplitter or mpeg4splitter?etc.

Thanks in advance,

Bendeguy

0 Kudos
1 Reply
Chao_Y_Intel
Moderator
182 Views

Hi,

Some suggestion from our media experts:

In this case, user can avoid using splitter at all.The user just need to initialize properly the MediaData *in before call GetFrame().
Mainly he need to setup buffer and size using SetBufferPointer(Ipp8u *ptr, vm_sizet bytes) method.

For example, The applicationhas in memory decoded frame (FramePtr is pointer to it and FrameSize is the size of encoded frame)

MediaData in, out;
Ipp8u* FramePtr;
vm_sizet FrameSize;
....
in.SetBufferPointer(FramePtr, FrameSize);
decoder.GetFrame(&in, &out);
...

Thanks,
Chao

0 Kudos
Reply