//*@@@+++@@@@****************************************************************** // // Microsoft Windows Media Foundation // Copyright (C) Microsoft Corporation. All rights reserved. // //*@@@---@@@@****************************************************************** // import "unknwn.idl"; import "objidl.idl"; import "mfidl.idl"; typedef enum TED_ATTRIBUTE_CATEGORY { TED_ATTRIBUTE_CATEGORY_NONE = 0, TED_ATTRIBUTE_CATEGORY_TOPONODE = 1, TED_ATTRIBUTE_CATEGORY_MEDIATYPE = 2, TED_ATTRIBUTE_CATEGORY_STREAMDESCRIPTOR = 3, TED_ATTRIBUTE_CATEGORY_PRESENTATIONDESCRIPTOR = 4, TED_ATTRIBUTE_CATEGORY_OTA = 5, } TED_ATTRIBUTE_CATEGORY; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(72D92BD9-CA59-4bc7-9F40-2E6064826098), local ] /// /// Interface for obtaining window handles when needed by the EVR /// interface ITedVideoWindowHandler : IUnknown { HRESULT GetVideoWindow([out] LONG_PTR* pHwnd); HRESULT ReleaseVideoWindow([in] LONG_PTR hwnd); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(C2C3A379-3D36-4566-AC1B-A562466C021F), local ] /// /// Interface for notifying the application of events in the topology editor /// interface ITedTopoEventHandler : IUnknown { HRESULT NotifyAddedNode(int nNodeID); HRESULT NotifyRemovedNode(int nNodeID); HRESULT NotifyConnection(int nUpNodeID, int nDownNodeID); HRESULT NotifyDisconnection(int nUpNodeID, int nDownNodeID); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(C311E957-D926-4dd8-BCDE-6F31B4DDB1AD), local ] /// /// Represents information concerning properties and attributes of topology objects /// interface ITedPropertyInfo : IUnknown { HRESULT GetPropertyInfoName([out, annotation("__deref_out")] LPWSTR* szName, [out, annotation("__out")] TED_ATTRIBUTE_CATEGORY* pCategory); HRESULT GetPropertyCount([out] DWORD* pdwCount); HRESULT GetProperty([in] DWORD dwIndex, [out, annotation("__deref_out")] LPWSTR* szName, [out, annotation("__deref_out")] LPWSTR* szValue); HRESULT GetPropertyType([in] DWORD dwIndex, [out] VARTYPE* pVT); HRESULT IsWriteable(); HRESULT SetProperty([in] DWORD dwIndex, [in] LPCWSTR szName, [in] VARTYPE vt, [in] LPCWSTR szValue); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(D3903C3E-D5DF-43c1-A099-ABF74A536770), local ] /// /// Handles displaying of properties /// interface ITedPropertyController : IUnknown { HRESULT ClearProperties(); HRESULT AddPropertyInfo([in] ITedPropertyInfo* pInfo); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(4C086376-9583-4906-A06D-AA57042407DA), dual, helpstring("TED Topo View Interface"), local ] /// /// View for displaying an MF topology /// interface ITedTopoView : IDispatch { /// /// Initialize the topology viewer /// /// /// The video window provider. May be NULL if a video playback from the viewed topology is not required. /// /// /// The property controller. May be NULL if viewing and editing properties is not required. /// HRESULT Init([in] ITedVideoWindowHandler* pVideoWindowHandler, [in] ITedPropertyController* pPropertyController, [in] ITedTopoEventHandler* pEventHandler); /// /// Create a window for displaying the topology /// /// /// Title of the window. See CreateWindow in the Platform SDK /// /// /// Style flags of the window. See CreateWindow in the Platform SDK /// /// /// X position of the new window /// /// /// Y position of the new window /// /// /// Width of the new window /// /// /// Height of the new window /// /// /// Specifies the parent window, or NULL for a top-level window /// /// /// Pointer to an HWND variable that will receive the HWND of the created client window /// HRESULT CreateTopoWindow([in] LPCWSTR szTitle, [in] DWORD dwStyle, [in] DWORD x, [in] DWORD y, [in] DWORD width, [in] DWORD height, [in] LONG_PTR hWndParent, [out] LONG_PTR* phWnd); /// /// Close the topology view window created with CreateTopoWindow /// HRESULT CloseTopoWindow(); /// /// Set whether or not the view should be editable. Editable views allow the user to move around nodes, /// create connections, and remove connections. /// /// /// TRUE if the view should be editable, FALSE if it should be static. /// HRESULT SetEditable([in] BOOL fEditable); /// /// Specifies whether or not the topology has changed since the last time it was saved. /// /// /// TRUE if the topology has been saved and is unchanged since; FALSE if the topology has been edited and /// the changes have not been saved. /// HRESULT IsSaved([out] BOOL* pfIsSaved); /// /// Clears the old topology and sets up a new, blank topology to work with. /// HRESULT NewTopology(); /// /// Shows the given topology on the view. /// /// /// Pointer to a media foundation topology to show on the view. /// /// /// URL of the input file for the media source. May be NULL, in which case if the topology is saved /// it will not be able to be properly loaded. /// HRESULT ShowTopology([in] IMFTopology* pTopology, [in] LPCWSTR wszSourceURL); /// /// Inserts new nodes from the input topology into the view's topology and draws the resultant topology /// on the screen. Will fail if the sources in the topologies are different. /// /// /// Pointer to the media foundation topology to merge. /// HRESULT MergeTopology([in] IMFTopology* pTopology); /// /// Load a topology from an XML file and draw it on the view. /// /// /// XML file to load. /// HRESULT LoadTopology([in] LPCWSTR wszFilename); /// /// Save the topology on the view to an XML file /// /// /// XML file to save to. /// HRESULT SaveTopology([in] LPCWSTR wszFilename); /// /// Acquire the internal topology on the view /// /// /// Pointer to an IMFTopology pointer, receives a clone of the internal topology /// /// /// Pointer to a boolean value, receives TRUE if the topology has a protected source and thus needs PMP /// playback, or FALSE if the source is clear and can be played in a normal session. /// HRESULT GetTopology([out] IMFTopology** ppTopology, [out] BOOL* pfIsProtected); /// /// Add a source to the view's topology in an open location /// /// /// URL of the source file to create the media source /// HRESULT AddSource([in] LPCWSTR wszSourceURL); /// /// Add a SAR (audio renderer) to the view's topology in an open location /// HRESULT AddSAR(); /// /// Add an EVR (video renderer) to the view's topology in an open location. If this EVR will be used /// for video playback, a valid ITedVideoWindowHandler must have been supplied upon creation of the /// view (see TEDCreateTopoViewer) /// HRESULT AddEVR(); /// /// Add a transform to the view's topology in an open location. /// /// /// CLSID of the transform. TED must be able to instantiate a transform with CoCreateInstance using this CLSID. /// /// /// A friendly name for the transform that will be displayed on the node /// HRESULT AddTransform([in] GUID gidTransformID, [in] LPCWSTR wszTransformName); /// /// Add a transform to the view's topology in an open location. /// /// /// Activate from which the transform can be created. /// HRESULT AddTransformActivate([in] IMFActivate* pTransformActivate); /// /// Add a tee node with a default of one output to the view's topology in an open location /// HRESULT AddTee(); /// /// Add a sink from an IMFMediaSink object /// /// /// Pointer to the sink to add. /// HRESULT AddSink([in] IMFMediaSink* pSink); /// /// Add a custom sink (not a SAR or EVR) to the view's topology in an open location /// /// /// CLSID of the sink to add. TED must be able to instantiate the sink with CoCreateInstance using this CLSID. /// HRESULT AddCustomSink([in] GUID gidSinkID); /// /// Add a capture source from an IMFMediaSource object /// /// /// Pointer to the sink to add /// HRESULT AddCaptureSource([in] IMFMediaSource* pSource); /// /// Delete the topology node currently selected by the user /// HRESULT DeleteSelectedNode(); /// /// Spy calls on a selected transform or stream sink node. If a source is selected, nothing will be done. /// Output will be directed to a text file. /// HRESULT SpySelectedNode(); }; /// /// Creates a topology viewer. /// /// /// Specifies a pointer to an ITedVideoWindowHandler interface. May be NULL. Required if the view's /// topology will be used for video playback. /// /// /// Specifies a pointer to an ITedPropertyController interface. May be NULL. Called by the view /// when properties for a node or connection should be shown to the user. /// /// /// Specifies a pointer to a variable where the topo viewer object will be stored /// cpp_quote( "STDAPI TEDCreateTopoViewer(" ) cpp_quote( " ITedVideoWindowHandler* pVideoWindowHandler," ) cpp_quote( " ITedPropertyController* pPropertyController," ) cpp_quote( " ITedTopoEventHandler* pEventHandler," ) cpp_quote( " __out ITedTopoView** ppTopoViewer" ) cpp_quote( " );" ) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(AAEB0E96-0214-42c4-80F1-3BAD06F54F58), local ] interface ITedDataSaver : IDispatch { HRESULT Init(LPCWSTR strDocName); HRESULT BeginSaveObject(LPCWSTR strName); HRESULT BeginSaveChildObjects(); HRESULT EndSaveChildObjects(); HRESULT SaveData(LPCWSTR strName, LPCWSTR strValue); HRESULT SaveToFile(LPCWSTR strFileName); }; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// [ object, uuid(892FADFF-90BB-4189-9910-3FBF58DAA1E8), local ] interface ITedDataLoader : IDispatch { HRESULT HasNextObject([out, annotation("__out")] BOOL* pfHasNextObject); HRESULT GetNextObject([out, annotation("__deref_out")] LPWSTR* strName); HRESULT HasChildObjects([out, annotation("__out")] BOOL* pfHasChildObjects); HRESULT BeginLoadChildObjects(); HRESULT EndLoadChildObjects(); HRESULT LoadData(LPCWSTR strName, [out, annotation("__deref_out")] LPWSTR* strValue, long nIndex); HRESULT LoadFromFile(LPCWSTR strFileName, LPCWSTR strDocName); }; [ uuid(64D3D369-B1E9-4aff-B1A4-8D8518E14A97), helpstring("TedUtil Type Library"), helpstringdll("TEDUTIL"), version(1.0) ] library TedUtil { [ uuid(7B0BB325-CC66-459e-B393-5D42937AAAA2), helpstring("TED Topo Viewer Class") ] coclass CTopoViewerController { [default] interface ITedTopoView; } [ uuid(F517B713-86B1-4bc3-BF16-F09119F6725A), helpstring("TED XML Data Saver Class") ] coclass CXMLDataSaver { [default] interface ITedDataSaver; } [ uuid(01917079-8954-49a8-B9B8-3318728ADA25), helpstring("TED XML Data Loader Class") ] coclass CXMLDataLoader { [default] interface ITedDataLoader; } [ uuid(3A59CBE9-E5D7-4769-9D3A-4EE0F327A3C3), helpstring("TED Multi-input Test Sink Class") ] coclass CTedTestSink { [default] interface IMFMediaSInk; } }