Helper class to create a stream type with multiple Substreams.
#include <set>
{
public:
cMyFilter()
{
CreateRunner("generate_samples");
m_pWriter = CreateRequestableOutputPin("output", oSubStreams);
}
uint32_t nSubStreamId,
{
if (nSubStreamId > 2)
{
RETURN_ERROR_DESC(ERR_INVALID_ARG,
"No substream with id %d available", nSubStreamId);
}
m_oEnabledSubStreams.insert(nSubStreamId);
}
{
m_oEnabledSubStreams.erase(nSubStreamId);
}
{
++m_nTriggerCounter;
for (const auto& nSubStreamId: m_oEnabledSubStreams)
{
m_pWriter->Write(oNewData.Release());
}
}
private:
std::set<uint32_t> m_oEnabledSubStreams;
uint32_t m_nTriggerCounter = 0;
};
Copyright © Audi Electronics Venture GmbH.
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Common macro to enable correct treatment of class identifier AND Class Name by IClassInfo.
A common result class usable as return value throughout.
Defintion of a property set container interface.
Base class for ADTF filters.
Helper class to create a stream type with multiple Substreams.
void SetSubStream(const char *strName, uint32_t nSubStreamId, const flash::cStreamTypeHelper &oType)
Adds or updates a Substream.
The Interface defines a runnable item of the GraphObjects providing a IRuntimeBehaviour.
Interface for sample writers that write to sample streams via output pins.
Wrapper class that facilitates the handling of output samples.
Generator template to create an instance of a ant::IStreamType class for penguin::stream_meta_type_pl...
A timestamp with nanosecond precision.