forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathIAMStreamConfig.cs
74 lines (69 loc) · 2.57 KB
/
IAMStreamConfig.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
// 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;
/// <summary>
/// This interface sets the output format on certain capture and compression filters,
/// for both audio and video.
/// </summary>
///
[ComImport,
Guid( "C6E13340-30AC-11d0-A18C-00A0C9118956" ),
InterfaceType( ComInterfaceType.InterfaceIsIUnknown )]
internal interface IAMStreamConfig
{
/// <summary>
/// Set the output format on the pin.
/// </summary>
///
/// <param name="mediaType">Media type to set.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int SetFormat( [In, MarshalAs( UnmanagedType.LPStruct )] AMMediaType mediaType );
/// <summary>
/// Retrieves the audio or video stream's format.
/// </summary>
///
/// <param name="mediaType">Retrieved media type.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetFormat( [Out, MarshalAs( UnmanagedType.LPStruct )] out AMMediaType mediaType );
/// <summary>
/// Retrieve the number of format capabilities that this pin supports.
/// </summary>
///
/// <param name="count">Variable that receives the number of format capabilities.</param>
/// <param name="size">Variable that receives the size of the configuration structure in bytes.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetNumberOfCapabilities( out int count, out int size );
/// <summary>
/// Retrieve a set of format capabilities.
/// </summary>
///
/// <param name="index">Specifies the format capability to retrieve, indexed from zero.</param>
/// <param name="mediaType">Retrieved media type.</param>
/// <param name="streamConfigCaps">Byte array, which receives information about capabilities.</param>
///
/// <returns>Return's <b>HRESULT</b> error code.</returns>
///
[PreserveSig]
int GetStreamCaps(
[In] int index,
[Out, MarshalAs( UnmanagedType.LPStruct )] out AMMediaType mediaType,
[In, MarshalAs( UnmanagedType.LPStruct )] VideoStreamConfigCaps streamConfigCaps
);
}
}