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

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

#include <tsDirectShowGraph.h>

Inheritance diagram for ts::DirectShowGraph:

Public Member Functions

 DirectShowGraph ()
 Default constructor.
 
virtual ~DirectShowGraph ()
 Destructor.
 
bool addFilter (::IBaseFilter *filter, const wchar_t *name, Report &report)
 Add a filter in the graph.
 
bool cleanupDownstream (::IBaseFilter *filter, Report &report)
 In the graph, cleanup everything downstream a specified filter.
 
virtual void clear (Report &report)
 Clear the graph back to uninitialized state.
 
bool connectFilters (::IBaseFilter *filter1, ::IBaseFilter *filter2, Report &report)
 Directly connect two filters using whatever output and input pin.
 
void display (std::ostream &output, Report &report, const UString &margin=UString(), bool verbose=true)
 Display the description of the graph.
 
bool initialize (Report &report)
 Initialize the graph.
 
bool isValid () const
 Check if the graph was correctly initialized.
 
bool removeFilter (::IBaseFilter *filter, Report &report)
 Remove a filter from the graph.
 
bool run (Report &report)
 Run the graph.
 
ComPtr<::IBaseFilter > startingFilter (Report &report)
 Get the starting filter of the graph.
 
bool stop (Report &report)
 Stop the graph.
 

Detailed Description

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

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: