![]() |
TSDuck v3.41-4217
MPEG Transport Stream Toolkit
|
A specialization of a DirectShow graph for tuner reception (Windows-specific). More...
#include <tsTunerGraph.h>
Public Types | |
enum | PropSearch { psFIRST , psLAST , psLOWEST , psHIGHEST } |
Search criteria for properties. More... | |
Public Member Functions | |
TunerGraph ()=default | |
Default constructor. | |
virtual | ~TunerGraph () |
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) override |
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 (const UString &tuner_name, ::IMoniker *tuner_moniker, DeliverySystemSet &delivery_systems, Report &report) |
Initialize 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. | |
template<typename VALTYPE , typename IVALTYPE , class FILTER , typename std::enable_if< std::is_base_of<::IBDA_SignalStatistics, FILTER >::value >::type * = nullptr> | |
bool | searchProperty (VALTYPE &retvalue, PropSearch searchtype, ::HRESULT(__stdcall FILTER::*getmethod)(IVALTYPE *), const ::GUID &propset, int propid) |
Search a property, until found, in all interfaces of a given class and then in tuner properties. | |
template<typename VALTYPE > | |
bool | searchTunerProperty (VALTYPE &retvalue, PropSearch searchtype, const ::GUID &propset, int propid) |
Search all IKsPropertySet in the tuner until the specified data is found. | |
template<typename VALTYPE , typename ARGTYPE , typename IVALTYPE , class FILTER , typename std::enable_if< std::is_same<::IBDA_DigitalDemodulator, FILTER >::value >::type * = nullptr> | |
bool | searchVarProperty (VALTYPE unset, std::optional< ARGTYPE > ¶meter, PropSearch searchtype, bool reset_unknown, ::HRESULT(__stdcall FILTER::*getmethod)(IVALTYPE *), const ::GUID &propset, int propid) |
Search a property, until found, in all interfaces of a given class and then in tuner properties. | |
bool | sendTuneRequest (DuckContext &duck, const ModulationArgs ¶ms) |
Send a tune request. | |
void | setReceiverName (const UString &name) |
Specify a receiver filter name. | |
SinkFilter * | sinkFilter () const |
Get the sink filter of the graph. | |
ComPtr<::IBaseFilter > | startingFilter (Report &report) |
Get the starting filter of the graph. | |
bool | stop (Report &report) |
Stop the graph. | |
A specialization of a DirectShow graph for tuner reception (Windows-specific).
A DirectShow graph for TS capture is usually made of the following filters:
|
inline |
Specify a receiver filter name.
Must be called before initialize(). The graph will use the specified receiver filter instead of the standard algorithm.
[in] | name | Name of the receiver filter to use. |
bool ts::TunerGraph::initialize | ( | const UString & | tuner_name, |
::IMoniker * | tuner_moniker, | ||
DeliverySystemSet & | delivery_systems, | ||
Report & | report | ||
) |
Initialize the graph.
[in] | tuner_name | Tuner filter name (informational only). |
[in,out] | tuner_moniker | A moniker to create instances of a tuner filter. This tuner filter is the base of the graph creation (not the starting point of the graph, which is the network provider filter). |
[out] | delivery_systems | List of delivery systems which are supported by the tuner. |
[in,out] | report | Where to report errors. |
|
overridevirtual |
Clear the graph back to uninitialized state.
[in,out] | report | Where to report errors. |
Reimplemented from ts::DirectShowGraph.
|
inline |
Get the sink filter of the graph.
This is where the TS packets can be fetched out of the graph.
bool ts::TunerGraph::sendTuneRequest | ( | DuckContext & | duck, |
const ModulationArgs & | params | ||
) |
Send a tune request.
[in,out] | duck | TSDuck execution context. |
[in] | params | Modulation parameters. |
bool ts::TunerGraph::searchTunerProperty | ( | VALTYPE & | retvalue, |
PropSearch | searchtype, | ||
const ::GUID & | propset, | ||
int | propid | ||
) |
Search all IKsPropertySet in the tuner until the specified data is found.
VALTYPE | The type of the property to search. |
[out] | retvalue | Returned property value. |
[in] | searchtype | Selection criteria for the final value. |
[in] | propset | GUID of the property set. |
[in] | propid | Id of the property to search. |
|
inline |
Search a property, until found, in all interfaces of a given class and then in tuner properties.
VALTYPE | The type of the property to search. |
IVALTYPE | The type of the property in the get_XXX() method of the object. |
FILTER | The interface class through which the property can be found. |
[out] | retvalue | Returned property value. |
[in] | searchtype | Selection criteria for the final value. |
[in] | getmethod | The get_XXX() method of the object to retrieve the property. Used to search in ivector. |
[in] | propset | GUID of the property set. Used to search in tuner properties. |
[in] | propid | Id of the property to search. |
|
inline |
Search a property, until found, in all interfaces of a given class and then in tuner properties.
Same as previous method, with additional handling of unknown return value.
VALTYPE | The type of the property to search. |
ARGTYPE | |
IVALTYPE | The type of the property in the get_XXX() method of the object. |
FILTER | The interface class through which the property can be found. |
[in] | unset | A value which, when returned by the interface, means "value is unset". |
[in,out] | parameter | A variable object containing the result. When the value is considered as "unset", the variable is reset (becomes uninitialized). |
[in] | searchtype | Selection criteria for the final value. |
[in] | reset_unknown | If true and the property cannot be found, reset the variable in parameter. |
[in] | getmethod | The get_XXX() method of the object to retrieve the property. Used to search in ivector. |
[in] | propset | GUID of the property set. Used to search in tuner properties. |
[in] | propid | Id of the property to search. |
|
inherited |
Initialize the graph.
[in,out] | report | Where to report errors. |
|
inherited |
Check if the graph was correctly initialized.
|
inherited |
Add a filter in the graph.
[in,out] | filter | The filter to add. |
[in] | name | Filter name. |
[in,out] | report | Where to report errors. |
|
inherited |
Remove a filter from the graph.
[in,out] | filter | The filter to remove. |
[in,out] | report | Where to report errors. |
|
inherited |
Directly connect two filters using whatever output and input pin.
[in,out] | filter1 | DirectShow filter with output pins. |
[in,out] | filter2 | DirectShow filter with input pins. |
[in,out] | report | Where to report errors. |
|
inherited |
In the graph, cleanup everything downstream a specified filter.
All downstream filters are disconnected and removed from the graph.
[in,out] | filter | DirectShow filter. |
[in,out] | report | Where to report errors. |
Get the starting filter of the graph.
[in,out] | report | Where to report errors. |
|
inherited |
Run the graph.
[in,out] | report | Where to report errors. |
|
inherited |
Stop the graph.
[in,out] | report | Where to report errors. |
|
inherited |
Display the description of the graph.
[in,out] | output | Where to display test results. |
[in,out] | report | Where to report errors. |
[in] | margin | Left margin to display. |
[in] | verbose | True for verbose information. |