ADTF
Loading...
Searching...
No Matches
request_forwarding.h
Go to the documentation of this file.
1
7#pragma once
11
12namespace adtf
13{
14namespace streaming
15{
16namespace vision
17{
51
78template<typename BaseReader = adtf::streaming::flash::cDynamicSampleReader>
79class request_forwarding_reader : public BaseReader
80{
81public:
88 {
89 m_oWriters.push_back(pWriter);
90 }
91
92 // ISampleStreamer implementation
94 {
95 if (auto pHollowStream = adtf::ucom::ucom_cast<IInternalBindingProxy*>(&oSampleStream))
96 {
98 if (IS_OK(pHollowStream->GetInternalBindingProxy(pProxy)))
99 {
100 for (auto pWriter : m_oWriters)
101 {
102 RETURN_IF_FAILED(pWriter->SetSource(pProxy));
103 }
104 }
105 }
106
107 return BaseReader::BeginStreaming(oSampleStream);
108 }
109
110private:
111 std::vector<cRequestForwardingWriter*> m_oWriters;
112};
113
114} // namespace vision
115
116using vision::cRequestForwardingWriter;
117using vision::request_forwarding_reader;
118
119} // namespace streaming
120} // namespace adtf
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define IS_OK(s)
Check if result is OK.
Definition result.h:17
Definition samplestream_intf.h:30
Definition samplewriter.h:361
Definition request_forwarding.h:30
tResult SetSource(const adtf::ucom::iobject_ptr< adtf::streaming::IBindingProxy > &pSource)
tResult BeginStreaming(adtf::streaming::ISampleStream &oSampleStream) override
Definition request_forwarding.h:80
void AddWriter(cRequestForwardingWriter *pWriter)
Definition request_forwarding.h:87
tResult BeginStreaming(adtf::streaming::ISampleStream &oSampleStream) override
Definition request_forwarding.h:93
Definition object_ptr.h:384
Namespace for all functionality of the ADTF Streaming SDK provided since v3.21.
Definition request_forwarding.h:17
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
ant::weak_object_ptr< T > weak_object_ptr
Alias always bringing the latest version of ant::weak_object_ptr into scope.
Definition weak_object_ptr.h:232
InterfacePointerType ucom_cast(ObjectPointerType i_pObject) noexcept
Alias always bringing the latest version of ant::ucom_cast() into scope.
Definition ucom_cast.h:157
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14