|
|
|
|
|
by dceddia
914 days ago
|
|
One thing to look at is ffmpeg in its encoders and decoders. At the bottom of the file there's a struct with pointers to functions (among other things). Anything that wants to do decoding can just call init(), decode(), close() on an AVCodec and the internal functions do whatever they need to do. Here's one from h264.c: AVCodec ff_h264_decoder = {
.name = "h264",
.type = AVMEDIA_TYPE_VIDEO,
.init = ff_h264_decode_init,
.close = h264_decode_end,
.decode = h264_decode_frame,
... more fields ...
};
|
|