// AForge Direct Show Library // 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 controls certain video capture operations such as enumerating available /// frame rates and image orientation. /// /// [ComImport, Guid( "6A2E0670-28E4-11D0-A18c-00A0C9118956" ), InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] internal interface IAMVideoControl { /// /// Retrieves the capabilities of the underlying hardware. /// /// /// Pin to query capabilities from. /// Get capabilities of the specified pin. /// /// Return's HRESULT error code. /// [PreserveSig] int GetCaps( [In] IPin pin, [Out, MarshalAs( UnmanagedType.I4 )] out VideoControlFlags flags ); /// /// Sets the video control mode of operation. /// /// /// The pin to set the video control mode on. /// Value specifying a combination of the flags to set the video control mode. /// /// Return's HRESULT error code. /// [PreserveSig] int SetMode( [In] IPin pin, [In, MarshalAs( UnmanagedType.I4 )] VideoControlFlags mode ); /// /// Retrieves the video control mode of operation. /// /// /// The pin to retrieve the video control mode from. /// Gets combination of flags, which specify the video control mode. /// /// Return's HRESULT error code. /// [PreserveSig] int GetMode( [In] IPin pin, [Out, MarshalAs( UnmanagedType.I4 )] out VideoControlFlags mode ); /// /// The method retrieves the actual frame rate, expressed as a frame duration in 100-nanosecond units. /// USB (Universal Serial Bus) and IEEE 1394 cameras may provide lower frame rates than requested /// because of bandwidth availability. This is only available during video streaming. /// /// /// The pin to retrieve the frame rate from. /// Gets frame rate in frame duration in 100-nanosecond units. /// /// Return's HRESULT error code. /// [PreserveSig] int GetCurrentActualFrameRate( [In] IPin pin, [Out, MarshalAs( UnmanagedType.I8 )] out long actualFrameRate ); /// /// Retrieves the maximum frame rate currently available based on bus bandwidth usage for connections /// such as USB and IEEE 1394 camera devices where the maximum frame rate can be limited by bandwidth /// availability. /// /// /// The pin to retrieve the maximum frame rate from. /// Index of the format to query for maximum frame rate. This index corresponds /// to the order in which formats are enumerated by . /// Frame image size (width and height) in pixels. /// Gets maximum available frame rate. The frame rate is expressed as frame duration in 100-nanosecond units. /// /// Return's HRESULT error code. /// [PreserveSig] int GetMaxAvailableFrameRate( [In] IPin pin, [In] int index, [In] System.Drawing.Size dimensions, [Out] out long maxAvailableFrameRate ); /// /// Retrieves a list of available frame rates. /// /// /// The pin to retrieve the maximum frame rate from. /// Index of the format to query for maximum frame rate. This index corresponds /// to the order in which formats are enumerated by . /// Frame image size (width and height) in pixels. /// Number of elements in the list of frame rates. /// Array of frame rates in 100-nanosecond units. /// /// Return's HRESULT error code. /// [PreserveSig] int GetFrameRateList( [In] IPin pin, [In] int index, [In] System.Drawing.Size dimensions, [Out] out int listSize, [Out] out IntPtr frameRate ); } }