// AForge Direct Show Library
// AForge.NET framework
//
// Copyright © Andrew Kirillov, 2008
// andrew.kirillov@gmail.com
//
namespace AForge.Video.DirectShow.Internals
{
using System;
using System.Runtime.InteropServices;
///
/// This interface sets the output format on certain capture and compression filters,
/// for both audio and video.
///
///
[ComImport,
Guid( "C6E13340-30AC-11d0-A18C-00A0C9118956" ),
InterfaceType( ComInterfaceType.InterfaceIsIUnknown )]
internal interface IAMStreamConfig
{
///
/// Set the output format on the pin.
///
///
/// Media type to set.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int SetFormat( [In, MarshalAs( UnmanagedType.LPStruct )] AMMediaType mediaType );
///
/// Retrieves the audio or video stream's format.
///
///
/// Retrieved media type.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetFormat( [Out, MarshalAs( UnmanagedType.LPStruct )] out AMMediaType mediaType );
///
/// Retrieve the number of format capabilities that this pin supports.
///
///
/// Variable that receives the number of format capabilities.
/// Variable that receives the size of the configuration structure in bytes.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetNumberOfCapabilities( out int count, out int size );
///
/// Retrieve a set of format capabilities.
///
///
/// Specifies the format capability to retrieve, indexed from zero.
/// Retrieved media type.
/// Byte array, which receives information about capabilities.
///
/// Return's HRESULT error code.
///
[PreserveSig]
int GetStreamCaps(
[In] int index,
[Out, MarshalAs( UnmanagedType.LPStruct )] out AMMediaType mediaType,
[In, MarshalAs( UnmanagedType.LPStruct )] VideoStreamConfigCaps streamConfigCaps
);
}
}