?? control.cs
字號:
#region license
/*
DirectShowLib - Provide access to DirectShow interfaces via .NET
Copyright (C) 2006
http://sourceforge.net/projects/directshownet/
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#endregion
using System;
using System.Runtime.InteropServices;
namespace DirectShowLib
{
#region Declarations
/// <summary>
/// From define AM_MEDIAEVENT_NONOTIFY
/// </summary>
[Flags]
public enum NotifyFlags
{
None,
NoNotify
}
/// <summary>
/// From #define OATRUE/OAFALSE
/// </summary>
public enum OABool
{
False = 0,
True = -1 // bools in .NET use 1, not -1
}
/// <summary>
/// From WS_* defines
/// </summary>
[Flags]
public enum WindowStyle
{
Overlapped = 0x00000000,
Popup = unchecked((int)0x80000000), // enum can't be uint for VB
Child = 0x40000000,
Minimize = 0x20000000,
Visible = 0x10000000,
Disabled = 0x08000000,
ClipSiblings = 0x04000000,
ClipChildren = 0x02000000,
Maximize = 0x01000000,
Caption = 0x00C00000,
Border = 0x00800000,
DlgFrame = 0x00400000,
VScroll = 0x00200000,
HScroll = 0x00100000,
SysMenu = 0x00080000,
ThickFrame = 0x00040000,
Group = 0x00020000,
TabStop = 0x00010000,
MinimizeBox = 0x00020000,
MaximizeBox = 0x00010000
}
/// <summary>
/// From WS_EX_* defines
/// </summary>
[Flags]
public enum WindowStyleEx
{
DlgModalFrame = 0x00000001,
NoParentNotify = 0x00000004,
Topmost = 0x00000008,
AcceptFiles = 0x00000010,
Transparent = 0x00000020,
MDIChild = 0x00000040,
ToolWindow = 0x00000080,
WindowEdge = 0x00000100,
ClientEdge = 0x00000200,
ContextHelp = 0x00000400,
Right = 0x00001000,
Left = 0x00000000,
RTLReading = 0x00002000,
LTRReading = 0x00000000,
LeftScrollBar = 0x00004000,
RightScrollBar = 0x00000000,
ControlParent = 0x00010000,
StaticEdge = 0x00020000,
APPWindow = 0x00040000,
Layered = 0x00080000,
NoInheritLayout = 0x00100000,
LayoutRTL = 0x00400000,
Composited = 0x02000000,
NoActivate = 0x08000000
}
/// <summary>
/// From SW_* defines
/// </summary>
public enum WindowState
{
Hide = 0,
Normal,
ShowMinimized,
ShowMaximized,
ShowNoActivate,
Show,
Minimize,
ShowMinNoActive,
ShowNA,
Restore,
ShowDefault,
ForceMinimize
}
/// <summary>
/// From DISPATCH_* defines
/// </summary>
[Flags]
public enum DispatchFlags : short
{
None = 0x0,
Method = 0x1,
PropertyGet = 0x2,
PropertyPut = 0x4,
PropertyPutRef = 0x8
}
#endregion
#region Interfaces
#if ALLOW_UNTESTED_INTERFACES
[ComImport,
Guid("56a868b9-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IAMCollection
{
[PreserveSig]
int get_Count([Out] out int plCount);
[PreserveSig]
int Item(
[In] int lItem,
[Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk
);
[PreserveSig]
int get__NewEnum([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
}
[ComImport,
Guid("56a868ba-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IFilterInfo
{
[PreserveSig]
int FindPin(
[In, MarshalAs(UnmanagedType.BStr)] string strPinID,
[Out, MarshalAs(UnmanagedType.IDispatch)] out object ppUnk
);
[PreserveSig]
int get_Name([Out, MarshalAs(UnmanagedType.BStr)] out string strName);
[PreserveSig]
int get_VendorInfo([Out, MarshalAs(UnmanagedType.BStr)] string strVendorInfo);
[PreserveSig]
int get_Filter([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
[PreserveSig]
int get_Pins([Out, MarshalAs(UnmanagedType.IDispatch)] out object ppUnk);
[PreserveSig]
int get_IsFileSource([Out] out int pbIsSource);
[PreserveSig]
int get_Filename([Out, MarshalAs(UnmanagedType.BStr)] out string pstrFilename);
[PreserveSig]
int put_Filename([In, MarshalAs(UnmanagedType.BStr)] string strFilename);
}
[ComImport,
Guid("56a868bb-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IRegFilterInfo
{
[PreserveSig]
int get_Name([Out, MarshalAs(UnmanagedType.BStr)] out string strName);
[PreserveSig]
int Filter([Out, MarshalAs(UnmanagedType.IDispatch)] out object ppUnk);
}
[ComImport,
Guid("56a868bc-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IMediaTypeInfo
{
[PreserveSig]
int get_Type([Out, MarshalAs(UnmanagedType.BStr)] out string strType);
[PreserveSig]
int get_Subtype([Out, MarshalAs(UnmanagedType.BStr)] out string strType);
}
[ComImport,
Guid("56a868bd-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IPinInfo
{
[PreserveSig]
int get_Pin([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
[PreserveSig]
int get_ConnectedTo([Out, MarshalAs(UnmanagedType.IDispatch)] out object ppUnk);
[PreserveSig]
int get_ConnectionMediaType([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
[PreserveSig]
int get_FilterInfo([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
[PreserveSig]
int get_Name([Out, MarshalAs(UnmanagedType.BStr)] out string ppUnk);
[PreserveSig]
int get_Direction([Out] int ppDirection);
[PreserveSig]
int get_PinID([Out, MarshalAs(UnmanagedType.BStr)] out string strPinID);
[PreserveSig]
int get_MediaTypes([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnk);
[PreserveSig]
int Connect([In, MarshalAs(UnmanagedType.IUnknown)] object pPin);
[PreserveSig]
int ConnectDirect([In, MarshalAs(UnmanagedType.IUnknown)] object pPin);
[PreserveSig]
int ConnectWithType(
[In, MarshalAs(UnmanagedType.IUnknown)] object pPin,
[In, MarshalAs(UnmanagedType.IUnknown)] object pMediaType
);
[PreserveSig]
int Disconnect();
[PreserveSig]
int Render();
}
#endif
[ComImport,
Guid("bc9bcf80-dcd2-11d2-abf6-00a0c905f375"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IAMStats
{
[PreserveSig]
int Reset();
[PreserveSig]
int get_Count([Out] out int plCount);
[PreserveSig]
int GetValueByIndex(
[In] int lIndex,
[Out, MarshalAs(UnmanagedType.BStr)] out string szName,
[Out] out int lCount,
[Out] out double dLast,
[Out] out double dAverage,
[Out] out double dStdDev,
[Out] out double dMin,
[Out] out double dMax
);
[PreserveSig]
int GetValueByName(
[In, MarshalAs(UnmanagedType.BStr)] string szName,
[Out] out int lIndex,
[Out] out int lCount,
[Out] out double dLast,
[Out] out double dAverage,
[Out] out double dStdDev,
[Out] out double dMin,
[Out] out double dMax
);
[PreserveSig]
int GetIndex(
[In, MarshalAs(UnmanagedType.BStr)] string szName,
[In, MarshalAs(UnmanagedType.Bool)] bool lCreate,
[Out] out int plIndex
);
[PreserveSig]
int AddValue(
[In] int lIndex,
[In] double dValue
);
}
[ComImport,
Guid("56a868b4-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IVideoWindow
{
[PreserveSig]
int put_Caption([In, MarshalAs(UnmanagedType.BStr)] string caption);
[PreserveSig]
int get_Caption([Out, MarshalAs(UnmanagedType.BStr)] out string caption);
[PreserveSig]
int put_WindowStyle([In] WindowStyle windowStyle);
[PreserveSig]
int get_WindowStyle([Out] out WindowStyle windowStyle);
[PreserveSig]
int put_WindowStyleEx([In] WindowStyleEx windowStyleEx);
[PreserveSig]
int get_WindowStyleEx([Out] out WindowStyleEx windowStyleEx);
[PreserveSig]
int put_AutoShow([In] OABool autoShow);
[PreserveSig]
int get_AutoShow([Out] out OABool autoShow);
[PreserveSig]
int put_WindowState([In] WindowState windowState);
[PreserveSig]
int get_WindowState([Out] out WindowState windowState);
[PreserveSig]
int put_BackgroundPalette([In] OABool backgroundPalette);
[PreserveSig]
int get_BackgroundPalette([Out] out OABool backgroundPalette);
[PreserveSig]
int put_Visible([In] OABool visible);
[PreserveSig]
int get_Visible([Out] out OABool visible);
[PreserveSig]
int put_Left([In] int left);
[PreserveSig]
int get_Left([Out] out int left);
[PreserveSig]
int put_Width([In] int width);
[PreserveSig]
int get_Width([Out] out int width);
[PreserveSig]
int put_Top([In] int top);
[PreserveSig]
int get_Top([Out] out int top);
[PreserveSig]
int put_Height([In] int height);
[PreserveSig]
int get_Height([Out] out int height);
[PreserveSig]
int put_Owner([In] IntPtr owner);
[PreserveSig]
int get_Owner([Out] out IntPtr owner);
[PreserveSig]
int put_MessageDrain([In] IntPtr drain);
[PreserveSig]
int get_MessageDrain([Out] out IntPtr drain);
// Use ColorTranslator to break out RGB
[PreserveSig]
int get_BorderColor([Out] out int color);
// Use ColorTranslator to break out RGB
[PreserveSig]
int put_BorderColor([In] int color);
[PreserveSig]
int get_FullScreenMode([Out] out OABool fullScreenMode);
[PreserveSig]
int put_FullScreenMode([In] OABool fullScreenMode);
[PreserveSig]
int SetWindowForeground([In] OABool focus);
[PreserveSig]
int NotifyOwnerMessage(
[In] IntPtr hwnd, // HWND *
[In] int msg,
[In] int wParam, // WPARAM
[In] int lParam // LPARAM
);
[PreserveSig]
int SetWindowPosition(
[In] int left,
[In] int top,
[In] int width,
[In] int height
);
[PreserveSig]
int GetWindowPosition(
[Out] out int left,
[Out] out int top,
[Out] out int width,
[Out] out int height
);
[PreserveSig]
int GetMinIdealImageSize(
[Out] out int width,
[Out] out int height
);
[PreserveSig]
int GetMaxIdealImageSize(
[Out] out int width,
[Out] out int height
);
[PreserveSig]
int GetRestorePosition(
[Out] out int left,
[Out] out int top,
[Out] out int width,
[Out] out int height
);
[PreserveSig]
int HideCursor([In] OABool hideCursor);
[PreserveSig]
int IsCursorHidden([Out] out OABool hideCursor);
}
[ComImport,
Guid("56a868b3-0ad4-11ce-b03a-0020af0ba770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IBasicAudio
{
[PreserveSig]
int put_Volume([In] int lVolume);
[PreserveSig]
int get_Volume([Out] out int plVolume);
[PreserveSig]
int put_Balance([In] int lBalance);
[PreserveSig]
int get_Balance([Out] out int plBalance);
}
[ComImport,
Guid("56a868b5-0ad4-11ce-b03a-0020af0ba770"),
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -