コード例 #1
0
 /// <summary>
 /// Creates a video output directly to file based on the parameters
 /// </summary>
 /// <param name="filename">The file to output to</param>
 /// <param name="codec">The codec to encode with</param>
 /// <param name="width">The viedo width</param>
 /// <param name="height">The video height</param>
 /// <param name="depth">The video colour bit-depth</param>
 /// <param name="fps">The number of frames to encode per second</param>
 /// <param name="length">The length of the video</param>
 /// <param name="effects">The effects to apply to the video (null for none)</param>
 /// <returns>The video stream to write to</returns>
 public static IOutputStream CreateVideoStream(string filename, ICodec codec,
                                               int width, int height, int depth,
                                               int fps, TimeSpan length,
                                               IFrameEffect[] effects)
 {
     if ((int)(codec.Capabilities.OutputType & CodecCapabilities.OutputTypes.File) > 0)
         return ((Codec)codec).CreateStream(filename, width, height, depth, fps, effects);
     return null;
 }
コード例 #2
0
ファイル: XVidCodec.cs プロジェクト: xuchuansheng/GenXSource
 internal override IOutputStream CreateStream(string filename, int width, int height, int depth, int fps, IFrameEffect[] effects)
 {
     return new XvidOutputStream(filename, width, height, depth, fps);
 }
コード例 #3
0
ファイル: XVidCodec.cs プロジェクト: xuchuansheng/GenXSource
 internal override IOutputStream CreateStream(System.IO.Stream stream, int width, int height, int depth, int fps, IFrameEffect[] effects)
 {
     return null;
 }
コード例 #4
0
ファイル: ICodec.cs プロジェクト: xuchuansheng/GenXSource
 internal abstract IOutputStream CreateStream(string filename, int width, int height, int depth, int fps, IFrameEffect[] effects);