forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathISampleGrabberCB.cs
47 lines (44 loc) · 1.6 KB
/
ISampleGrabberCB.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// AForge Direct Show Library
// AForge.NET framework
//
// Copyright © Andrew Kirillov, 2007
// andrew.kirillov@gmail.com
//
namespace AForge.Video.DirectShow.Internals
{
using System;
using System.Runtime.InteropServices;
/// <summary>
/// The interface provides callback methods for the <see cref="ISampleGrabber.SetCallback"/> method.
/// </summary>
///
[ComImport,
Guid("0579154A-2B53-4994-B0D0-E773148EFF85"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface ISampleGrabberCB
{
/// <summary>
/// Callback method that receives a pointer to the media sample.
/// </summary>
///
/// <param name="sampleTime">Starting time of the sample, in seconds.</param>
/// <param name="sample">Pointer to the sample's <b>IMediaSample</b> interface.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int SampleCB( double sampleTime, IntPtr sample );
/// <summary>
/// Callback method that receives a pointer to the sample bufferþ
/// </summary>
///
/// <param name="sampleTime">Starting time of the sample, in seconds.</param>
/// <param name="buffer">Pointer to a buffer that contains the sample data.</param>
/// <param name="bufferLen">Length of the buffer pointed to by <b>buffer</b>, in bytes</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int BufferCB( double sampleTime, IntPtr buffer, int bufferLen );
}
}