/* * In order to avoid duplicate code, we could use dynamic parameters ... * Unfortunately they are not supported by mono on .net 3.5 */ internal unsafe Format(AVOutputFormat format) { LongName = Marshal.PtrToStringAnsi((IntPtr)format.long_name); Name = Marshal.PtrToStringAnsi((IntPtr)format.name); Codecs = FfmpegCalls.GetCodecOfCodecTag(format.codec_tag).AsReadOnly(); var extensions = Marshal.PtrToStringAnsi((IntPtr)format.extensions); FileExtensions = !string.IsNullOrEmpty(extensions) ? extensions.Split(',').ToList().AsReadOnly() : Enumerable.Empty <string>().ToList().AsReadOnly(); }
public static extern AVCodecID av_guess_codec(ref AVOutputFormat pAVOutoutFormat, string short_name, string filename, string mime_type, CodecType type);
public static extern void av_register_output_format(ref AVOutputFormat pAVOutputFormat);