// 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;
///
/// The interface inherits contains methods for retrieving event notifications and for overriding the
/// filter graph's default handling of events.
///
[ComVisible( true ), ComImport,
Guid( "56a868c0-0ad4-11ce-b03a-0020af0ba770" ),
InterfaceType( ComInterfaceType.InterfaceIsDual )]
internal interface IMediaEventEx
{
///
/// Retrieves a handle to a manual-reset event that remains signaled while the queue contains event notifications.
///
/// Pointer to a variable that receives the event handle.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetEventHandle( out IntPtr hEvent );
///
/// Retrieves the next event notification from the event queue.
///
///
/// Variable that receives the event code.
/// Pointer to a variable that receives the first event parameter.
/// Pointer to a variable that receives the second event parameter.
/// Time-out interval, in milliseconds.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetEvent( [Out, MarshalAs( UnmanagedType.I4 )] out DsEvCode lEventCode, [Out] out IntPtr lParam1, [Out] out IntPtr lParam2, int msTimeout );
///
/// Waits for the filter graph to render all available data.
///
///
/// Time-out interval, in milliseconds. Pass zero to return immediately.
/// Pointer to a variable that receives an event code.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int WaitForCompletion( int msTimeout, [Out] out int pEvCode );
///
/// Cancels the Filter Graph Manager's default handling for a specified event.
///
///
/// Event code for which to cancel default handling.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int CancelDefaultHandling( int lEvCode );
///
/// Restores the Filter Graph Manager's default handling for a specified event.
///
/// Event code for which to restore default handling.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int RestoreDefaultHandling( int lEvCode );
///
/// Frees resources associated with the parameters of an event.
///
/// Event code.
/// First event parameter.
/// Second event parameter.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int FreeEventParams( [In, MarshalAs( UnmanagedType.I4 )] DsEvCode lEvCode, IntPtr lParam1, IntPtr lParam2 );
///
/// Registers a window to process event notifications.
///
///
/// Handle to the window, or to stop receiving event messages.
/// Window message to be passed as the notification.
/// Value to be passed as the lParam parameter for the lMsg message.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int SetNotifyWindow( IntPtr hwnd, int lMsg, IntPtr lInstanceData );
///
/// Enables or disables event notifications.
///
///
/// Value indicating whether to enable or disable event notifications.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int SetNotifyFlags( int lNoNotifyFlags );
///
/// Determines whether event notifications are enabled.
///
///
/// Variable that receives current notification status.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetNotifyFlags( out int lplNoNotifyFlags );
}
}