I have a function that reads frames from a stream. I want to find out what the format of the stream is (I'm testing with H264):
StreamingResult MediaWriter::Open(const AVFormatContext *const inputFormatContext,
const fs::path &destination)
{
// Save input stream data
AVStream *videoStream = inputFormatContext->streams[FindVideoStreamIndex(inputFormatContext)];
//....
}
How can I get the format/codec type from the video stream? I am expecting to receive H264, but other formats will be received in the future.
P.S.: Some good FFMPEG documentation would be appreciated, because I am getting lost in Doxygen generated documentation.