27template <
typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
29 public ReaderImplementation,
30 public cSampleCodecFactory
40 static_cast<cSampleCodecFactory&
>(*this) = cSampleCodecFactory();
43 if (m_fnAcceptCallback)
45 RETURN_IF_FAILED(m_fnAcceptCallback(pStreamType));
53 RETURN_IF_FAILED(ReaderImplementation::SetType(pStreamType));
55 static_cast<cSampleCodecFactory&
>(*this) = cSampleCodecFactory();
56 if (pStreamType.
Get())
70 m_fnAcceptCallback = fnAcceptTypeCallback;
95 auto oResult = ReaderImplementation::GetNextSample(pSample);
98 if (oResult == ERR_EMPTY)
133 auto oResult = ReaderImplementation::GetLastSample(pSample);
136 if (oResult == ERR_EMPTY)
197template <
typename WriterImplementation = streaming::flash::cSampleWriter>
199 public WriterImplementation,
200 public cSampleCodecFactory
219 RETURN_IF_FAILED(WriterImplementation::SetType(pStreamType));
220 if (pStreamType.
Get())
227 *
static_cast<cSampleCodecFactory*
>(
this) = cSampleCodecFactory();
234 RETURN_IF_FAILED(WriterImplementation::ChangeType(pStreamType));
240 using WriterImplementation::Write;
#define IS_FAILED(s)
Check if result is failed.
Definition result.h:20
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 THROW_IF_FAILED(s)
throws if the expression returns a failed tResult
Definition result.h:88
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
tResult alloc_sample(ucom::ant::iobject_ptr< ucom::ant::IObject > &pSample)
base::flash::tNanoSeconds get_sample_time(const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
A timestamp with nanosecond precision.
Definition chrono.h:23