Shows how to access incoming samples.
#pragma once
#ifndef ADTF_EXAMPLES_CID
#define ADTF_EXAMPLES_CID ".local.cid"
#endif
{
public:
"demo_media_description_dumper.filter" ADTF_EXAMPLES_CID,
"Media Description Dumper");
cMediaDescriptionDumper();
~cMediaDescriptionDumper() override;
private:
};
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Definition class_id.h:33
virtual tResult ProcessInput(base::flash::tNanoSeconds tmTrigger, streaming::flash::ISampleReader *pReader)
Definition samplestreamer_intf.h:188
A timestamp with nanosecond precision.
Definition chrono.h:23
#include "demo_md_dumper.h"
#include <cinttypes>
cMediaDescriptionDumper);
cMediaDescriptionDumper::cMediaDescriptionDumper()
{
m_pReader = CreateInputPin<decoding_sample_reader<>>("input");
SetDescription("input", "Input Pin from which the received DDL structure will be printed to console.");
SetDescription("Use this filter to print the sampla data of a received input.");
SetHelpLink("$(ADTF_DIR)/doc/html/page_media_description_dumper.html");
}
cMediaDescriptionDumper::~cMediaDescriptionDumper() = default;
{
adtf::util::cString strJSONObject = adtf::util::cString::Format("{\n \"timestamp\": %" PRIi64 ",\n \"data\":\n {", nTimeStamp.nCount);
size_t nElementIndex = 0;
strJSONObject.Append(adtf::util::cString::Format("%s\n \"%s\": %s",
nElementIndex > 0 ? "," : "",
oElement.getFullName().c_str(),
oElement.getStringValue().c_str()));
++nElementIndex;
});
strJSONObject.Append("\n }\n}");
return strJSONObject;
}
{
while (m_pReader->GetNextDecoder(oDecoder, tmSampleTime))
{
LOG_INFO(
"%s", decode_to_json(oDecoder, tmSampleTime).GetPtr());
}
}
#define ADTF_PLUGIN(__plugin_identifier,...)
Definition adtf_plugin.h:29
#define LOG_INFO(...)
Logs an info message.
Definition log.h:388
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
Namespace for the ADTF Base SDK.
Definition adtf_base_type_traits.h:13
Namespace for the ADTF Filter SDK.
Definition configurable_runner.h:18
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14