Template to provide media description based access sample data.
The adtf_mdgen will generate specializations of this template that provide access methods for all members of the given struct.
<structs>
<struct name="tChild" alignment="4" version="1">
<element name="nA" type="tUInt32" arraysize="1">
<deserialized alignment="4"/>
<serialized bytepos="0" byteorder="LE"/>
</element>
<element name="nB" type="tUInt32" arraysize="1">
<deserialized alignment="4"/>
<serialized bytepos="4" byteorder="LE"/>
</element>
</struct>
<struct name="tTest" alignment="4" version="1">
<element name="nValue" type="tUInt32" arraysize="1">
<deserialized alignment="4"/>
<serialized bytepos="0" byteorder="LE"/>
</element>
<element name="aArray" type="tUInt32" arraysize="2">
<deserialized alignment="4"/>
<serialized bytepos="4" byteorder="LE"/>
</element>
<element name="sChild" type="tChild" arraysize="1">
<deserialized alignment="4"/>
<serialized bytepos="12" byteorder="LE"/>
</element>
<element name="aChildren" type="tChild" arraysize="2">
<deserialized alignment="4"/>
<serialized bytepos="20" byteorder="LE"/>
</element>
</struct>
</structs>
#include <test_struct.h>
{
public:
cMyFilter()
{
}
{
}
{
auto oSampleData = m_oSampleDataFactory.Make(pSample);
" nValue = %u\n"
" aArray[0] = %u\n"
" sChild.nA = %u\n"
" aChildren[0].nA = %u",
oSampleData.nValue(),
oSampleData.aArray()[0],
oSampleData.sChild().nA(),
oSampleData.aChildren()[0].nB());
}
private:
};
#define LOG_INFO(...)
Logs an info message.
Definition log.h:388
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Definition class_id.h:33
virtual tResult ProcessInput(base::flash::tNanoSeconds tmTrigger, streaming::flash::ISampleReader *pReader)
ReaderType * CreateInputPin(const char *strName, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true)
Definition graph_object.h:1215
virtual tResult AcceptType(streaming::flash::ISampleReader *pReader, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Definition samplestreamer_intf.h:188
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437