📄 control.odl
字号:
//==========================================================================;
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
// Copyright (c) 1992 - 2002 Microsoft Corporation. All Rights Reserved.
//
//--------------------------------------------------------------------------;
// Neutral/English language type library for basic Quartz control interfaces
// the quartz type library defines the basic control interfaces
[
uuid(56a868b0-0ad4-11ce-b03a-0020af0ba770),
helpstring("ActiveMovie control type library"),
lcid(0x0000),
version(1.0)
]
library QuartzTypeLib
{
importlib("STDOLE2.TLB");
// types are restricted to be automation-compatible
typedef double REFTIME; // ReferenceTime
typedef LONG_PTR OAEVENT; // should be a HANDLE
typedef LONG_PTR OAHWND; // should be an hwnd
// from strmif.idl
typedef long OAFilterState;
// collection interface - represents a collection of IUnknowns
// this is used below to collect filter-info objects, registry-filters
// pin-info objects and wrapped media type objects
[
uuid(56a868b9-0ad4-11ce-b03a-0020af0ba770),
helpstring("Collection"),
odl,
oleautomation,
dual
]
interface IAMCollection : IDispatch
{
// number of items in collection
[propget]
HRESULT Count(
[out, retval] LONG* plCount);
// return IUnknown for contained item by index
HRESULT Item(
[in] long lItem,
[out] IUnknown** ppUnk);
// return IUnknown for an object that implements IEnumVARIANT on
// this collection
[propget]
HRESULT _NewEnum(
[out, retval] IUnknown** ppUnk);
}
// core control providing state control
[
uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770),
helpstring("IMediaControl interface"),
odl,
oleautomation,
dual
]
interface IMediaControl : IDispatch
{
// methods
HRESULT Run();
HRESULT Pause();
HRESULT Stop();
//returns the state. same semantics as IMediaFilter::GetState
HRESULT GetState(
[in] LONG msTimeout,
[out] OAFilterState* pfs);
// adds and connects filters needed to play the specified file
// (same as IFilterGraph::RenderFile)
HRESULT RenderFile(
[in] BSTR strFilename);
// adds to the graph the source filter that can read this file,
// and returns an IFilterInfo object for it (actually returns
// an IDispatch for the IFilterInfo object).
HRESULT AddSourceFilter(
[in] BSTR strFilename,
[out] IDispatch**ppUnk);
// get a collection of IFilterInfo objects representing the
// filters in the graph (returns IDispatch for an object
// that supports IAMCollection
[propget]
HRESULT FilterCollection(
[out, retval] IDispatch** ppUnk);
// get a collection of IRegFilter objects representing the
// filters available in the registry
[propget]
HRESULT RegFilterCollection(
[out, retval] IDispatch** ppUnk);
HRESULT StopWhenReady();
}
// provides an event notification scheme passing events
// asynchronously to applications. See also IMediaEventSink in
// strmif.idl and sdk\h\evcodes.h.
//
// this interface behaves as if events are held on a queue. A call to
// IMediaEventSink::Notify will place an event on this queue. Calling
// GetEvent removes the first item off the queue and returns it. Items are
// returned in the order they were queued (there is no priority scheme).
// The event handle is in a signalled state iff the queue is non-empty.
//
// Apps that issue multiple Run calls without always picking up the
// completion events are advised to call GetEvent or WaitForCompletion
// (with a 0 timeout) repeatedly to remove all events from the queue
// when in stopped or paused state before each Run method.
//
// Parameters to events are actually LONG, IUnknown* or BSTR. You need to
// look at evcode.h for details of parameters to a specific event code.
// In order to correctly free resources, always call FreeEventParams
// after receiving an event.
//
[
uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770),
helpstring("IMediaEvent interface"),
odl,
oleautomation,
dual
]
interface IMediaEvent : IDispatch
{
// get back the event handle. This is manual-reset
// (don't - it's reset by the event mechanism) and remains set
// when events are queued, and reset when the queue is empty.
HRESULT GetEventHandle(
[out] OAEVENT * hEvent);
// remove the next event notification from the head of the queue and
// return it. Waits up to msTimeout millisecs if there are no events.
// if a timeout occurs without any events, this method will return
// E_ABORT, and the value of the event code and other parameters
// is undefined.
//
// If this call returns successfully the caller MUST call
// FreeEventParams(lEventCode, lParam1, lParam2) to release
// resources held inside the event arguments
//
HRESULT GetEvent(
[out] long * lEventCode,
[out] LONG_PTR * lParam1,
[out] LONG_PTR * lParam2,
[in] long msTimeout
);
// Calls GetEvent repeatedly discarding events until it finds a
// completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT).
// The completion event is removed from the queue and returned
// in pEvCode. Note that the object is still in running mode until
// a Pause or Stop call is made.
// If the timeout occurs, *pEvCode will be 0 and E_ABORT will be
// returned.
HRESULT WaitForCompletion(
[in] long msTimeout,
[out] long * pEvCode);
// cancels any system handling of the specified event code
// and ensures that the events are passed straight to the application
// (via GetEvent) and not handled. A good example of this is
// EC_REPAINT: default handling for this ensures the painting of the
// window and does not get posted to the app.
HRESULT CancelDefaultHandling(
[in] long lEvCode);
// restore the normal system default handling that may have been
// cancelled by CancelDefaultHandling().
HRESULT RestoreDefaultHandling( [in] long lEvCode);
// Free any resources associated with the parameters to an event.
// Event parameters may be LONGs, IUnknown* or BSTR. No action
// is taken with LONGs. IUnknown are passed addrefed and need a
// Release call. BSTR are allocated by the task allocator and will be
// freed by calling the task allocator.
HRESULT FreeEventParams(
[in] long lEvCode,
[in] LONG_PTR lParam1,
[in] LONG_PTR lParam2
);
}
[
uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770),
helpstring("IMediaEventEx interface"),
odl
]
interface IMediaEventEx : IMediaEvent
{
// Register a window to send messages to when events occur
// Parameters:
//
// hwnd - handle of window to notify -
// pass NULL to stop notification
// lMsg - Message id to pass messages with
// lInstanceData - will come back in lParam
//
// The event information must still be retrived by a call
// to GetEvent when the window message is received.
//
// Multiple events may be notified with one window message.
//
HRESULT SetNotifyWindow(
[in] OAHWND hwnd,
[in] long lMsg,
[in] LONG_PTR lInstanceData
);
// Turn events notification on or off
// lNoNotify = 0x00 event notification is ON
// lNoNotify = 0x01 event notification is OFF. The
// handle returned by GetEventHandle will be signalled at
// end of stream
HRESULT SetNotifyFlags(
[in] long lNoNotifyFlags
);
HRESULT GetNotifyFlags(
[out] long *lplNoNotifyFlags
);
}
// seek/cueing for positional media
[
uuid(56a868b2-0ad4-11ce-b03a-0020af0ba770),
helpstring("IMediaPosition interface"),
odl,
oleautomation,
dual
]
interface IMediaPosition : IDispatch
{
// properties
[propget]
HRESULT Duration(
[out, retval] REFTIME* plength);
[propput]
HRESULT CurrentPosition(
[in] REFTIME llTime);
[propget]
HRESULT CurrentPosition(
[out, retval] REFTIME* pllTime);
[propget]
HRESULT StopTime(
[out, retval] REFTIME* pllTime);
[propput]
HRESULT StopTime(
[in] REFTIME llTime);
[propget]
HRESULT PrerollTime(
[out, retval] REFTIME* pllTime);
[propput]
HRESULT PrerollTime(
[in] REFTIME llTime);
[propput]
HRESULT Rate(
[in] double dRate);
[propget]
HRESULT Rate(
[out, retval] double * pdRate);
HRESULT CanSeekForward([out, retval] LONG *pCanSeekForward);
HRESULT CanSeekBackward([out, retval] LONG *pCanSeekBackward);
}
// basic audio-related functionality
[
uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770),
helpstring("IBasicAudio interface"),
odl,
oleautomation,
dual
]
interface IBasicAudio : IDispatch
{
// properties
[propput]
HRESULT Volume(
[in] long lVolume);
[propget]
HRESULT Volume(
[out, retval] long * plVolume);
[propput]
HRESULT Balance(
[in] long lBalance);
[propget]
HRESULT Balance(
[out, retval] long * plBalance);
}
// basic window-related functionality
[
uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770),
helpstring("IVideoWindow interface"),
odl,
oleautomation,
dual
]
interface IVideoWindow : IDispatch
{
// properties
// set and get the window title caption
[propput]
HRESULT Caption([in] BSTR strCaption);
[propget]
HRESULT Caption([out, retval] BSTR *strCaption);
// change the window styles (as per Win32)
[propput]
HRESULT WindowStyle([in] long WindowStyle);
[propget]
HRESULT WindowStyle([out, retval] long *WindowStyle);
// change the extended window styles (as per Win32)
[propput]
HRESULT WindowStyleEx([in] long WindowStyleEx);
[propget]
HRESULT WindowStyleEx([out, retval] long *WindowStyleEx);
[propput]
HRESULT AutoShow([in] long AutoShow);
[propget]
HRESULT AutoShow([out, retval] long *AutoShow);
// change the window state (as per Win32)
[propput]
HRESULT WindowState([in] long WindowState);
[propget]
HRESULT WindowState([out, retval] long *WindowState);
// realise the palette in the background
[propput]
HRESULT BackgroundPalette([in] long BackgroundPalette);
[propget]
HRESULT BackgroundPalette([out, retval] long *pBackgroundPalette);
// affect the visibility of the window
[propput]
HRESULT Visible([in] long Visible);
[propget]
HRESULT Visible([out, retval] long *pVisible);
// change the desktop position of the video window
[propput]
HRESULT Left([in] long Left);
[propget]
HRESULT Left([out, retval] long *pLeft);
[propput]
HRESULT Width([in] long Width);
[propget]
HRESULT Width([out, retval] long *pWidth);
[propput]
HRESULT Top([in] long Top);
[propget]
HRESULT Top([out, retval] long *pTop);
[propput]
HRESULT Height([in] long Height);
[propget]
HRESULT Height([out, retval] long *pHeight);
// change the owning window of the video
[propput]
HRESULT Owner([in] OAHWND Owner);
[propget]
HRESULT Owner([out, retval] OAHWND *Owner);
// change the window to receive posted messages
[propput]
HRESULT MessageDrain([in] OAHWND Drain);
[propget]
HRESULT MessageDrain([out, retval] OAHWND *Drain);
[propget]
HRESULT BorderColor([out, retval] long *Color);
[propput]
HRESULT BorderColor([in] long Color);
[propget]
HRESULT FullScreenMode([out, retval] long *FullScreenMode);
[propput]
HRESULT FullScreenMode([in] long FullScreenMode);
// methods
// ask the renderer to grab it's window the foreground
// and optionally also give the window the input focus
HRESULT SetWindowForeground([in] long Focus);
// owners should pass WM_PALETTECHANGED and WM_SYSCOLORCHANGE
// messages on the filter graph so they can be distributed
// otherwise child renderers never see these messages go by
HRESULT NotifyOwnerMessage([in] OAHWND hwnd,
[in] long uMsg,
[in] LONG_PTR wParam,
[in] LONG_PTR lParam
);
// get and set the window position on the desktop
HRESULT SetWindowPosition([in] long Left,
[in] long Top,
[in] long Width,
[in] long Height);
HRESULT GetWindowPosition([out] long *pLeft,
[out] long *pTop,
[out] long *pWidth,
[out] long *pHeight);
// get the ideal sizes for the video image playback (client) area
HRESULT GetMinIdealImageSize([out] long *pWidth,[out] long *pHeight);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -