forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathIMediaEventEx.cs
126 lines (116 loc) · 5 KB
/
IMediaEventEx.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © AForge.NET, 2009-2011
// contacts@aforgenet.com
//
namespace AForge.Video.DirectShow.Internals
{
using System;
using System.Runtime.InteropServices;
/// <summary>
/// The interface inherits contains methods for retrieving event notifications and for overriding the
/// filter graph's default handling of events.
/// </summary>
[ComVisible( true ), ComImport,
Guid( "56a868c0-0ad4-11ce-b03a-0020af0ba770" ),
InterfaceType( ComInterfaceType.InterfaceIsDual )]
internal interface IMediaEventEx
{
/// <summary>
/// Retrieves a handle to a manual-reset event that remains signaled while the queue contains event notifications.
/// </summary>
/// <param name="hEvent">Pointer to a variable that receives the event handle.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetEventHandle( out IntPtr hEvent );
/// <summary>
/// Retrieves the next event notification from the event queue.
/// </summary>
///
/// <param name="lEventCode">Variable that receives the event code.</param>
/// <param name="lParam1">Pointer to a variable that receives the first event parameter.</param>
/// <param name="lParam2">Pointer to a variable that receives the second event parameter.</param>
/// <param name="msTimeout">Time-out interval, in milliseconds.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetEvent( [Out, MarshalAs( UnmanagedType.I4 )] out DsEvCode lEventCode, [Out] out IntPtr lParam1, [Out] out IntPtr lParam2, int msTimeout );
/// <summary>
/// Waits for the filter graph to render all available data.
/// </summary>
///
/// <param name="msTimeout">Time-out interval, in milliseconds. Pass zero to return immediately.</param>
/// <param name="pEvCode">Pointer to a variable that receives an event code.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int WaitForCompletion( int msTimeout, [Out] out int pEvCode );
/// <summary>
/// Cancels the Filter Graph Manager's default handling for a specified event.
/// </summary>
///
/// <param name="lEvCode">Event code for which to cancel default handling.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int CancelDefaultHandling( int lEvCode );
/// <summary>
/// Restores the Filter Graph Manager's default handling for a specified event.
/// </summary>
/// <param name="lEvCode">Event code for which to restore default handling.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int RestoreDefaultHandling( int lEvCode );
/// <summary>
/// Frees resources associated with the parameters of an event.
/// </summary>
/// <param name="lEvCode">Event code.</param>
/// <param name="lParam1">First event parameter.</param>
/// <param name="lParam2">Second event parameter.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int FreeEventParams( [In, MarshalAs( UnmanagedType.I4 )] DsEvCode lEvCode, IntPtr lParam1, IntPtr lParam2 );
/// <summary>
/// Registers a window to process event notifications.
/// </summary>
///
/// <param name="hwnd">Handle to the window, or <see cref="IntPtr.Zero"/> to stop receiving event messages.</param>
/// <param name="lMsg">Window message to be passed as the notification.</param>
/// <param name="lInstanceData">Value to be passed as the <i>lParam</i> parameter for the <i>lMsg</i> message.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int SetNotifyWindow( IntPtr hwnd, int lMsg, IntPtr lInstanceData );
/// <summary>
/// Enables or disables event notifications.
/// </summary>
///
/// <param name="lNoNotifyFlags">Value indicating whether to enable or disable event notifications.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int SetNotifyFlags( int lNoNotifyFlags );
/// <summary>
/// Determines whether event notifications are enabled.
/// </summary>
///
/// <param name="lplNoNotifyFlags">Variable that receives current notification status.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetNotifyFlags( out int lplNoNotifyFlags );
}
}