dshow/Core/ISampleGrabber.cs

(开头部分) 2KB

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

namespace dshow.Core
{
	using System;
	using System.Runtime.InteropServices;

	// ISampleGrabber interface
	//
	// This interface provides methods for retrieving individual
	// media samples as they move through the filter graph
	//
	[ComImport,
	Guid("6B652FFF-11FE-4FCE-92AD-0266B5D7C78F"),
	InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	public interface ISampleGrabber
	{
		// Specifies whether the filter should stop the graph
		// after receiving one sample
		[PreserveSig]
		int SetOneShot(
			[In, MarshalAs(UnmanagedType.Bool)] bool OneShot);

		// Specifies the media type for the connection on
		// the Sample Grabber's input pin
		[PreserveSig]
		int SetMediaType(
			[In, MarshalAs(UnmanagedType.LPStruct)] AMMediaType pmt);

		// Retrieves the media type for the connection on
		// the Sample Grabber's input pin
		[PreserveSig]
		int GetConnectedMediaType(
			[Out, MarshalAs(UnmanagedType.LPStruct)] AMMediaType pmt);

		// Specifies whether to copy sample data into a buffer
		// as it goes through the filter
		[PreserveSig]
		int SetBufferSamples(
			[In, MarshalAs(UnmanagedType.Bool)] bool BufferThem);

		// Retrieves a copy of the sample that
		// the filter received most recently
		[PreserveSig]
		int GetCurrentBuffer(
			ref int pBufferSize,
			IntPtr pBuffer);

		//
		[PreserveSig]
		int GetCurrentSample(
			IntPtr ppSample);

		// Specifies a callback method to call on incoming samples
		[PreserveSig]
		int SetCallback(
			ISampleGrabberCB pCallback,
			int WhichMethodToCallback);
	}


	// ISampleGrabberCB interface
后面还有 26 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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