How to decode h264 stream

Viewed 883

I searched a lot but I can't find a decent library to solve to my problem. I receive a h264 stream from the network, and I want to decode it from memory and display it in real time. Something like this pseudocode below:

cv::Mat frame;
while (true)
{
    if (newDataArrived)
    {
        void* h264Buffer; // address with current h264 stream
        size_t h264BufferSize; // size of the stream
        LibraryINeed::UpdateFrame(frame, h264Buffer, h264BufferSize); // !?
    }
    ...
    imshow("display", frame); // show most recent frame
}

Is there any library that provides this functionality?

0 Answers
Related