vfw/AVIWriter.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Tiger.Video.VFW
{
	using System;
	using System.Drawing;
	using System.Drawing.Imaging;
	using System.Runtime.InteropServices;

	/// <summary>
	/// Writing AVI files using Video for Windows
	/// 
	/// Note: I am stucked with non even frame width. AVIs with non even
	/// width are playing well in WMP, but not in BSPlayer (it's for "DIB " codec).
	/// Some other codecs does not work with non even width or height at all.
	/// 
	/// </summary>
	public class AVIWriter : IDisposable
	{
		private IntPtr	file;
		private IntPtr	stream;
		private IntPtr	streamCompressed;
		private IntPtr	buf = IntPtr.Zero;

		private int		width;
		private int		height;
		private int		stride;
		private string	codec = "DIB ";
		private int		quality = -1;
		private int		rate = 25;
		private int		position;

		// CurrentPosition property
		public int CurrentPosition
		{
			get { return position; }
		}
		// Width property
		public int Width
		{
			get
			{
				return (buf != IntPtr.Zero) ? width : 0;
			}
		}
		// Height property
		public int Height
		{
			get
			{
				return (buf != IntPtr.Zero) ? height : 0;
			}
		}
		// Codec property
		public string Codec
		{
			get { return codec; }
			set { codec = value; }
		}
		// Quality property
		public int Quality
		{
后面还有 181 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。