"景先生毕设|www.jxszl.com

C# AVPixelFormat类代码示例

2023-12-29 17:06编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中AVPixelFormat类的典型用法代码示例。如果您正苦于以下问题:C#AVPixelFormat类的具体用法?C#AVPixelFormat怎么用?C#AVPixelFormat使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Initialize privatevoidInitialize(intwidth,intheight,AVPixelFormatinFormat) { _initialized=true; _pContext=FFmpegInvoke.sws_getContext(width,height,inFormat,width,height,_pixelFormat,FFmpegInvoke.SWS_FAST_BILINEAR,null,null,null); if(_pContext==null) thrownewVideoConverterException("Couldnotinitializetheconversioncontext."); _pCurrentFrame=FFmpegInvoke.avcodec_alloc_frame(); intoutputDataSize=FFmpegInvoke.avpicture_get_size(_pixelFormat,width,height); _outputData=newbyte[outputDataSize]; fixed(byte*pOutputData=&_outputData[0]) { FFmpegInvoke.avpicture_fill((AVPicture*)_pCurrentFrame,pOutputData,_pixelFormat,width,height); } }
原文链接:http://www.jxszl.com/biancheng/C/556585.html