IRenderEngine::ConnectFrontEnd
Microsoft DirectShow 9.0 |
IRenderEngine::ConnectFrontEnd
The ConnectFrontEnd method builds the front end of the filter graph from the current timeline.
Syntax
HRESULT ConnectFrontEnd( void );
Return Value
Returns an HRESULT value. Possible return values include the following:
Value | Description |
S_OK | Success. |
S_WARN_OUTPUTRESET | Rendering portion of the graph was deleted. |
E_INVALIDARG | No timeline set for this render engine. |
E_MUST_INIT_RENDERER | Render engine failed to initialize. |
E_RENDER_ENGINE_IS_BROKEN | Operation failed because the project was not rendered successfully. |
E_UNEXPECTED | Unexpected error. |
VFW_E_INVALIDMEDIATYPE | Invalid media type. |
Remarks
This method does not build the rendering portion of the filter graph. The application must connect the output pins on the front end to the desired rendering filters:
- To preview, call the IRenderEngine::RenderOutputPins method.
- To output a file, call IRenderEngine::GetGroupOutputPin to retrieve the output pin for each group, then connect the pins to a multiplexer filter.
If you are using the basic render engine, the output pins on the front end produce uncompressed data. If you are using the smart render engine, the output pins produce compressed data.
If you change the timeline after you build the filter graph, you must call ConnectFrontEnd again to rebuild the front end. The method preserves the rendering portion of the graph whenever possible. However, if you add or delete a group, or change the order of the groups, ConnectFrontEnd deletes the rendering portion and your application must rebuild it. If the method deletes the rendering portion, it returns S_WARN_OUTPUTRESET.
Requirements
Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.
Library: Use strmiids.lib.
See Also