⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 axextend.idl

📁 c语言编程软件vc6.0中文绿色版_vc6.0官方下载
💻 IDL
📖 第 1 页 / 共 5 页
字号:

typedef IMediaEventSink *PMEDIAEVENTSINK;

//=====================================================================
//=====================================================================
// Defines IFileSourceFilter interface
//
// Exposed by source filters to set the file name and media type.
//=====================================================================
//=====================================================================

[
        object,
        uuid(56a868a6-0ad4-11ce-b03a-0020af0ba770),
        pointer_default(unique)
]
interface IFileSourceFilter : IUnknown {

    // Load a file and assign it the given media type
    HRESULT Load(
        [in] LPCOLESTR pszFileName,     // Pointer to absolute path of file to open
        [in] const AM_MEDIA_TYPE *pmt   // Media type of file - can be NULL
    );
    // Get the currently loaded file name
    HRESULT GetCurFile(
        [out] LPOLESTR *ppszFileName,   // Pointer to the path for the current file
        [out] AM_MEDIA_TYPE *pmt        // Pointer to the media type
    );
}

typedef IFileSourceFilter *PFILTERFILESOURCE;

//=====================================================================
//=====================================================================
// Defines IFileSinkFilter interface
//
// Exposed by renderers to set the output file name.
//=====================================================================
//=====================================================================

[
        object,
        uuid(a2104830-7c70-11cf-8bce-00aa00a3f1a6),
        pointer_default(unique)
]
interface IFileSinkFilter : IUnknown {

    // Output to this file. default is to open the existing file
    HRESULT SetFileName(
        [in] LPCOLESTR pszFileName,     // Pointer to absolute path of output file
        [in] const AM_MEDIA_TYPE *pmt   // Media type of file - can be NULL
    );
    // Get the current file name
    HRESULT GetCurFile(
        [out] LPOLESTR *ppszFileName,   // Pointer to the path for the current file
        [out] AM_MEDIA_TYPE *pmt        // Pointer to the media type
    );
}

typedef IFileSinkFilter *PFILTERFILESINK;

[
        object,
        uuid(00855B90-CE1B-11d0-BD4F-00A0C911CE86),
        pointer_default(unique)
]
interface IFileSinkFilter2 : IFileSinkFilter {

    HRESULT SetMode(
        [in] DWORD dwFlags              // AM_FILESINK_FLAGS
    );

    HRESULT GetMode(
        [out] DWORD *pdwFlags           // AM_FILESINK_FLAGS
    );
}

typedef IFileSinkFilter2 *PFILESINKFILTER2;

typedef enum {

    // create a new file
    AM_FILE_OVERWRITE = 0x00000001,

} AM_FILESINK_FLAGS;


//=====================================================================
//=====================================================================
// Defines IFileAsyncIO interface
//
// Exposed by high performance file readers
//=====================================================================
//=====================================================================

typedef struct _AsyncIOReq {
   DWORD         engine[4];  // used by IO engine
   [size_is(cb)] BYTE * lpv; // points to buffer of data to be transferred
   DWORD         cb;         // size of data to be transferred

   // the following 4 fields intentionally mimic an OVERLAPPED structure
   //
   DWORD         dwError;    // on return, contains error/success code
   DWORD         cbDone;     // number of bytes actually transferred
   LARGE_INTEGER liPos;      // 64 bit seek location. on return contains read/write location
   DWORD         hEvent;     // handle (used to mimic OVERLAPPED structure)

   DWORD         dwUser;     // preserved, for user data
   } AsyncIOReq;

[
        object,
        uuid(56a868a7-0ad4-11ce-b03a-0020af0ba770),
        pointer_default(unique)
]
interface IFileAsyncIO : IUnknown {

    // query the required alignment for io buffers & sizes
    //
    HRESULT QueryAlignment (
        [out] LPDWORD  pdwAlign
    );

    // do async, aligned read from a specific location in the file
    //
    HRESULT Read (
        [in] AsyncIOReq * pReq
    );

    // do async, aligned write to a specific location in the file
    // the file may be extended as a result.
    //
    HRESULT Write (
        [in] AsyncIOReq * pReq
    );

    // wait for the next available read to complete, on success
    // returns the buffer pointer and
    //
    HRESULT WaitForNext (
        [out] AsyncIOReq **  ppReq,    // returns pointer to next request to complete
        [in]  DWORD          dwTimeout // how long to wait, 0 does not wait
    );

    // wait for a specific io request to complete
    //
    HRESULT WaitForSpecific (
        [out] AsyncIOReq * pReq,    // wait for this request to complete
        [in]  DWORD        dwTimeout
    );

    // discard all pending io and place all requests on the 'done' queue
    //
    HRESULT DiscardPending (void);

    // wait for all pending io's to be complete
    //
    HRESULT Flush (void);
}

typedef IFileAsyncIO * PFILEASYNCIO;


//
// Intelligent connectivity for filters - an interface supported by
// filter graphs (since it is an extension to IFilterGraph) that supports
// building of graphs by automatic selection and connection of appropriate
// filters

[
    object,
    local,
    uuid(56a868a9-0ad4-11ce-b03a-0020af0ba770),
    pointer_default(unique)
]
interface IGraphBuilder : IFilterGraph {
    // Connect these two pins directly or indirectly, using transform filters
    // if necessary.

    HRESULT Connect
        ( [in] IPin * ppinOut,    // the output pin
          [in] IPin * ppinIn      // the input pin
        );


    // Connect this output pin directly or indirectly, using transform filters
    // if necessary to something that will render it.

    HRESULT Render
        ( [in] IPin * ppinOut     // the output pin
        );


    // Build a filter graph that will render this file using this play list.
    // If lpwstrPlayList is NULL then it will use the default play list
    // which will typically render the whole file.

    HRESULT RenderFile
        ( [in] LPCWSTR lpcwstrFile,
          [in] LPCWSTR lpcwstrPlayList
        );


    // Add to the filter graph a source filter for this file.  This would
    // be the same source filter that would be added by calling Render.
    // This call gives you more control over building
    // the rest of the graph, e.g. AddFilter(<a renderer of your choice>)
    // and then Connect the two.
    // The IBaseFilter* interface exposed by the source filter is returned
    // in ppFilter, addrefed already for you
    // The filter will be known by the name lpcwstrFIlterName
    // nn this filter graph,
    HRESULT AddSourceFilter
        ( [in]      LPCWSTR lpcwstrFileName,
          [in]      LPCWSTR lpcwstrFilterName,
          [out]     IBaseFilter* *ppFilter
        );


    // If this call is made then trace information will be written to the
    // file showing the actions taken in attempting to perform an operation.
    HRESULT SetLogFile
        ( [in]      HANDLE hFile  // open file handle e.g. from CreateFile
        );


    // Request that the graph builder should return as soon as possible from
    // its current task.
    // Note that it is possible fot the following to occur in the following
    // sequence:
    //     Operation begins; Abort is requested; Operation completes normally.
    // This would be normal whenever the quickest way to finish an operation
    // was to simply continue to the end.
    HRESULT Abort();

    // Return S_OK if the curent operation is to continue,
    // return S_FALSE if the current operation is to be aborted.
    // This method can be called as a callback from a filter which is doing
    // some operation at the request of the graph.
    HRESULT ShouldOperationContinue();

}


//
// New capture graph builder

[
    object,
    local,
    uuid(bf87b6e0-8c27-11d0-b3f0-00aa003761c5),
    pointer_default(unique)
]
interface ICaptureGraphBuilder : IUnknown {

    // Use this filtergraph
    HRESULT SetFiltergraph(
	[in] IGraphBuilder *pfg);

    // what filtergraph are you using?
    // *ppfg->Release() when you're done with it
    HRESULT GetFiltergraph(
	[out] IGraphBuilder **ppfg);

    // creates a rendering section in the filtergraph consisting of a MUX
    // of some filetype, and a file writer (and connects them together)
    // *ppf->Release() when you're done with it
    // *ppSink->Release() when you're done with it
    HRESULT SetOutputFileName(
	[in] const GUID *pType,	// type of file to write, eg. MEDIASUBTYPE_Avi
	[in] LPCOLESTR lpstrFile,	// filename given to file writer
	[out] IBaseFilter **ppf,	// returns pointer to the MUX
        [out] IFileSinkFilter **ppSink);// queried from file writer

    // Looks for an interface on the filter and on the output pin of the given
    // category.  Possible categories are "capture" and "preview" and NULL for
    // "don't care". (And in the future "time code" and "VBI data").
    // It will also look upstream and downstream of
    // the pin for the interface, to find interfaces on renderers, MUXES, TV
    // Tuners, etc.
    // Call *ppint->Release() when you're done with it
    HRESULT FindInterface(
	[in] const GUID *pCategory,	// can be NULL for all pins
	[in] IBaseFilter *pf,
	[in] REFIID riid,
	[out] void **ppint);

    // Connects the pin of the given category of the source filter to the
    // rendering filter, optionally through another filter (compressor?)
    // For the "capture" category, it will
    // instantiate and connect additional required filters upstream too, like
    // TV Tuners and Crossbars (this part can only be done if you give a
    // Moniker) If there is only one output pin on the source, use a NULL
    // category.  You can also have pSource be a pin, and not use the moniker
    HRESULT RenderStream(
	[in] const GUID *pCategory,	// can be NULL if only one output pin
	[in] IUnknown *pSource,		// must match pMSource
	[in] IBaseFilter *pfCompressor,
	[in] IBaseFilter *pfRenderer);	// can be NULL

    // Sends IAMStreamControl messages to the pin of the desired category, eg.
    // "capture" or "preview"
    // REFERENCE_TIME=NULL means NOW
    // REFERENCE_TIME=MAX_TIME means never, or cancel previous request
    // NULL controls all capture filters in the graph - you will get one
    //     notification for each filter with a pin of that category found
    // returns S_FALSE if stop will be signalled before last sample is
    //     rendered.
    // return a FAILURE code if the filter does not support IAMStreamControl
    HRESULT ControlStream(
	[in] const GUID *pCategory,
	[in] IBaseFilter *pFilter,
	[in] REFERENCE_TIME *pstart,
	[in] REFERENCE_TIME *pstop,
	[in] WORD wStartCookie,		// high word reserved
	[in] WORD wStopCookie);		// high word reserved

    // creates a pre-allocated file of a given size in bytes
    HRESULT AllocCapFile(
	[in] LPCOLESTR lpstr,
	[in] DWORDLONG dwlSize);

    // Copies the valid file data out of the old, possibly huge old capture
    //   file into a shorter new file.
    // Return S_FALSE from your progress function to abort capture, S_OK to
    //   continue
    HRESULT CopyCaptureFile(
	[in] LPOLESTR lpwstrOld,
	[in] LPOLESTR lpwstrNew,
	[in] int fAllowEscAbort,	// pressing ESC will abort?
	[in] IAMCopyCaptureFileProgress *pCallback);	// implement this to
							// get progress
}


//
// Capture graph builder "CopyCapturedFile" progress callback

[
    object,
    uuid(670d1d20-a068-11d0-b3f0-00aa003761c5),
    pointer_default(unique)
]
interface IAMCopyCaptureFileProgress : IUnknown {

    // If you support this interface somewhere, this function will be called
    // periodically while ICaptureGraphBuilder::CopyCaptureFile is executing

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -