Add classes to handle both AVFormatContext and AVCodecContext