protected override void Dispose(bool disposing) { if (codecContext == null) { return; } FF.avcodec_close(codecContext); codecContext = null; }
internal static AVCodec *GetEncoder(AVCodecID codecID) { AVCodec *codec = FF.avcodec_find_encoder(codecID); if (codec == null) { throw new ArgumentException($"未能找到编码器:{codecID}", nameof(codecID)); } return(codec); }
public static IReadOnlyList <CodecDescription> GetAllCodecs() { var list = new List <CodecDescription>(); AVCodec *codec = FF.av_codec_next(null); while (codec != null) { list.Add(new CodecDescription(codec)); codec = FF.av_codec_next(codec); } return(list); }