0

In FFMPEG, there are many video decoders integrated. One of them is H264. Now, in FFMPEG, which part of the decoder is taking care of providing the decoder with necessary input data to the decoder, so that it can decode it?

I have gone through most of the code of the decoder, but am not able to find where fread of anything is happening.

All i got to know is there is a file called file.c in libavutils directory of the FFMPEG source. In this file there is a read() function used. But, how is it that the h.264 decoder conveying this to the ffmpeg to send some data to decode.

Any pointers regarding the same will be really helpful to me. Please do provide your valuable suggestions.

Thanks in advance.

sam
  • 289
  • 5
  • 16

1 Answers1

2

ffmpeg is made of of several libraries. libavutil you already mentioned, this library provides low level access to reading data from a file or a network. Next that data is handled by libavformat. This library knows how to read the may different container formats and protocols (mp4, mkv, rtmp, etc), and extract the individual frames int the AVPacket structure. Each AVPacket is then given to the decoder which is part of libavcodec.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • Thanks for your answer. Once more doupt regarding this is, even in vlc we are having libavcodec. So can i use the same libavcodec that i'm creating in my FFMPEG to integrate my decoder into vlc? Please suggest. – sam Feb 13 '14 at 12:39
  • You can compile vlc and have it link against your custom libavcodec. – szatmary Feb 13 '14 at 18:51
  • can u pls suggest something for this: http://stackoverflow.com/questions/21756638/ffmpeg-compilation-error-for-custom-code – sam Feb 14 '14 at 01:02