TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::DirectShowGraph Class Reference

#include <tsDirectShowGraph.h>

Inheritance diagram for ts::DirectShowGraph:

Public Member Functions

 DirectShowGraph ()
virtual ~DirectShowGraph ()
bool addFilter (::IBaseFilter *filter, const wchar_t *name, Report &report)
bool cleanupDownstream (::IBaseFilter *filter, Report &report)
virtual void clear (Report &report)
bool connectFilters (::IBaseFilter *filter1, ::IBaseFilter *filter2, Report &report)
void display (std::ostream &output, Report &report, const UString &margin=UString(), bool verbose=true)
bool initialize (Report &report)
bool isValid () const
bool removeFilter (::IBaseFilter *filter, Report &report)
bool run (Report &report)
ComPtr<::IBaseFilter > startingFilter (Report &report)
bool stop (Report &report)

Detailed Description

An encapsulation of a DirectShow graph (Windows-specific).

Constructor & Destructor Documentation

◆ DirectShowGraph()

ts::DirectShowGraph::DirectShowGraph ( )

Default constructor.

◆ ~DirectShowGraph()

virtual ts::DirectShowGraph::~DirectShowGraph ( )
virtual

Destructor.

Member Function Documentation

◆ initialize()

bool ts::DirectShowGraph::initialize ( Report & report)

Initialize the graph.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ clear()

virtual void ts::DirectShowGraph::clear ( Report & report)
virtual

Clear the graph back to uninitialized state.

Parameters
[in,out]reportWhere to report errors.

Reimplemented in ts::TunerGraph.

◆ isValid()

bool ts::DirectShowGraph::isValid ( ) const

Check if the graph was correctly initialized.

Returns
True if the graph was correctly initialized.

◆ addFilter()

bool ts::DirectShowGraph::addFilter ( ::IBaseFilter * filter,
const wchar_t * name,
Report & report )

Add a filter in the graph.

Parameters
[in,out]filterThe filter to add.
[in]nameFilter name.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ removeFilter()

bool ts::DirectShowGraph::removeFilter ( ::IBaseFilter * filter,
Report & report )

Remove a filter from the graph.

Parameters
[in,out]filterThe filter to remove.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ connectFilters()

bool ts::DirectShowGraph::connectFilters ( ::IBaseFilter * filter1,
::IBaseFilter * filter2,
Report & report )

Directly connect two filters using whatever output and input pin.

Parameters
[in,out]filter1DirectShow filter with output pins.
[in,out]filter2DirectShow filter with input pins.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ cleanupDownstream()

bool ts::DirectShowGraph::cleanupDownstream ( ::IBaseFilter * filter,
Report & report )

In the graph, cleanup everything downstream a specified filter. All downstream filters are disconnected and removed from the graph.

Parameters
[in,out]filterDirectShow filter.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ startingFilter()

ComPtr<::IBaseFilter > ts::DirectShowGraph::startingFilter ( Report & report)

Get the starting filter of the graph.

Parameters
[in,out]reportWhere to report errors.
Returns
A pointer to the first filter with no connected input pin or a null pointer if not found.

◆ run()

bool ts::DirectShowGraph::run ( Report & report)

Run the graph.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ stop()

bool ts::DirectShowGraph::stop ( Report & report)

Stop the graph.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success or already stopped, false on error.

◆ display()

void ts::DirectShowGraph::display ( std::ostream & output,
Report & report,
const UString & margin = UString(),
bool verbose = true )

Display the description of the graph.

Parameters
[in,out]outputWhere to display test results.
[in,out]reportWhere to report errors.
[in]marginLeft margin to display.
[in]verboseTrue for verbose information.

The documentation for this class was generated from the following file: