Refactored container API so that it uses the uniform MediaEncoder/MediaDecoder base classes.