dshow/Core/Structures.cs

(开头部分) 4KB

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

/*
 * DirectShow structures and enumerations
 */
namespace dshow.Core
{
	using System;
	using System.Runtime.InteropServices;

	// Indicates a pin's direction
	//
	[ComVisible(false)]
	public enum PinDirection	// PIN_DIRECTION
	{
		Input,
		Output
	}

	// The AM_MEDIA_TYPE structure describes the format of a media sample
	//
	[ComVisible(false),
	StructLayout(LayoutKind.Sequential)]
	public class AMMediaType : IDisposable	// AM_MEDIA_TYPE
	{
		public Guid		majorType;
		public Guid		subType;

		[MarshalAs(UnmanagedType.Bool)]
		public bool		fixedSizeSamples = true;

		[MarshalAs(UnmanagedType.Bool)]
		public bool		temporalCompression;

		public int		sampleSize = 1;
		public Guid		formatType;
		public IntPtr	unkPtr;
		public int		formatSize;
		public IntPtr	formatPtr;

		// dispose
		public void Dispose()
		{
			if (formatSize != 0)
				Marshal.FreeCoTaskMem(formatPtr);
			if (unkPtr != IntPtr.Zero)
				Marshal.Release(unkPtr);
		}
	}

	// The PIN_INFO structure contains information about a pin
	// Used with the IPin::QueryPinInfo method
	//
	[ComVisible(false),
	StructLayout(LayoutKind.Sequential, Pack=1, CharSet=CharSet.Unicode)]
	public class PinInfo		// PIN_INFO
	{
		public IBaseFilter filter;
		public PinDirection dir;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string name;
	}

后面还有 112 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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