如何修复“名称空间'x.Requisites'已包含'IAMVideoControl'(CS0101)的定义”

时间:2019-01-08 13:30:34

标签: c#

我的代码似乎有问题,它没有运行 其他代码似乎像我们使用的接口一样工作。 IAMStreamconfig IAMCameracontrol

我试图通过搜索来发现问题,但找不到解决方法

using System;
using System.Runtime.InteropServices;

namespace ObjectProximityDetection.Requisites
{


// 
// 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 IAMStreamConfig.GetStreamCaps.
    // 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 IAMStreamConfig.GetStreamCaps.
    // 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 );
}

}

0 个答案:

没有答案