34template<
typename T,
typename U = T>
81 "This port is already connected to a sample stream / binding proxy.");
84 for (
const auto& sTo :
m_oTos)
92 for (
const auto& sTo :
m_oTos)
108 if (FindTo(pTo) !=
m_oTos.end())
133 for (
const auto& sTo :
m_oTos)
149 if (pFrom.
Get() !=
nullptr && sTo.
pTo.Get() !=
nullptr)
153 RETURN_IF_FAILED(pFrom->AttachRouting(sTo.
pTo));
157 RETURN_IF_FAILED(SetTriggerForwarding(pFrom, sTo.
pTo,
true));
171 if (pFrom.
Get() !=
nullptr && sTo.
pTo.Get() !=
nullptr)
175 RETURN_IF_FAILED(SetTriggerForwarding(pFrom, sTo.
pTo,
false));
178 RETURN_IF_FAILED(pFrom->DetachRouting(sTo.
pTo));
192 for (
const auto& sTo :
m_oTos)
194 if (sTo.bTriggerForwarding)
215 const auto itTo = FindTo(pTo);
220 RETURN_ERROR_DESC(ERR_NOT_FOUND,
"This port does not route to the given destination.");
227 if (itTo->bTriggerForwarding != bForwarded)
229 itTo->bTriggerForwarding = bForwarded;
243 return std::find_if(
m_oTos.begin(),
m_oTos.end(), [&pTo](
const tDestination& sTo)
noexcept
245 return sTo.pTo.Get() == pTo.Get();
255 if constexpr (std::is_base_of_v<ITriggerPipeSource, T> && std::is_base_of_v<ITriggerPipeItem, U>)
257 if (pFrom.
Get() !=
nullptr && pTo.
Get() !=
nullptr)
260 RETURN_IF_FAILED(bRoute ?
262 pFrom->UnregisterSubItem(pSubItem));
280 IFilterGraphDataPort,
281 IFilterGraphDataInPort>
285 std::atomic_bool m_bActive;
298 tResult InnerDisconnect()
override;
303 bool IsConnected()
const override;
305 tResult SetInactive()
override;
318 bool bForwarded)
override;
330 IFilterGraphDataPort,
331 IFilterGraphDataOutPort>
339 std::atomic_bool m_bActive;
351 tResult InnerConnect(
const iobject_ptr<ISampleStream>& pSampleStream);
355 tResult Connect(
const iobject_ptr<ISampleStream>& pSampleStream)
override;
358 tResult GetType(iobject_ptr<const IStreamType>& pStreamType)
const override;
360 bool IsConnected()
const override;
362 tResult SetInactive()
override;
365 tResult GetSampleStream(iobject_ptr<ISampleStream>& pSampleStream)
const override;
372 bool bForwarded)
override;
383 IFilterGraphInterfacePort,
384 named_graph_object<IFilterGraphInterfaceServerPort>>
425 IFilterGraphInterfacePort,
426 named_graph_object<IFilterGraphInterfaceClientPort>>
448 tResult InnerUnbind()
override;
465 public trigger_pipe_item<INamedGraphObject, IFilterGraphPort, IRunner, IFilterGraphRunnerPort>
493class cFilterGraphDataInPort :
498 IFilterGraphDataPort,
499 IFilterGraphDataInPort>
502 cFilterGraphDataInPort();
503 cFilterGraphDataInPort(
const char* strName);
504 ~cFilterGraphDataInPort()
override;
508 tResult InnerDisconnect()
override;
513 bool IsConnected()
const override;
515 tResult SetInactive()
override;
528 bool bForwarded)
override;
531 class cImplementation;
532 std::unique_ptr<cImplementation> m_pImplementation;
535class cFilterGraphDataOutPort :
540 IFilterGraphDataPort,
541 IFilterGraphDataOutPort>
544 cFilterGraphDataOutPort();
545 cFilterGraphDataOutPort(
const char* strName);
546 ~cFilterGraphDataOutPort()
override;
550 tResult InnerDisconnect()
override;
555 bool IsConnected()
const override;
557 tResult SetInactive()
override;
570 bool bForwarded)
override;
573 class cImplementation;
574 std::unique_ptr<cImplementation> m_pImplementation;
591 IFilterGraphInterfacePort,
592 named_graph_object<IFilterGraphInterfaceClientPort>>
605 tResult InnerUnbind()
override;
617 class cImplementation;
618 std::unique_ptr<cImplementation> m_pImplementation;
#define LOG_DETAIL(...)
Logs additional information.
Definition log.h:461
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:775
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
Definition result.h:44
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
@ Normal
Normal Priority.
Definition triggerpipe_intf.h:49
adtf::ucom::ant::iobject_ptr< T > iobject_ptr
used type for iobject_ptr
Definition filtergraphport.h:431
cFilterGraphClientPort()
CTOR.
virtual ~cFilterGraphClientPort() override
DTOR.
cFilterGraphClientPort(const char *strName)
cFilterGraphDataInPort()
CTOR.
tResult SetTriggerForwardingToChild(const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStream, bool bForwarded) override
tResult SetTriggerForwardingFromParent(bool bForwarded) override
cFilterGraphDataInPort(const char *strName)
virtual ~cFilterGraphDataInPort() override
DTOR.
tResult SetTriggerForwardingFromParent(bool bForwarded) override
tResult SetTriggerForwardingToChild(const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStream, bool bForwarded) override
cFilterGraphDataOutPort(const char *strName)
cFilterGraphDataOutPort()
CTOR.
virtual ~cFilterGraphDataOutPort() override
DTOR.
Definition filtergraphport.h:466
cFilterGraphRunnerPort(const char *strName)
virtual ~cFilterGraphRunnerPort() override
DTOR.
adtf::ucom::ant::iobject_ptr< T > iobject_ptr
used type for iobject_ptr
Definition filtergraphport.h:470
cFilterGraphRunnerPort()
CTOR.
Definition filtergraphport.h:385
cFilterGraphServerPort()
CTOR.
cFilterGraphServerPort(const char *strName)
adtf::ucom::ant::iobject_ptr< T > iobject_ptr
used type for iobject_ptr
Definition filtergraphport.h:389
virtual ~cFilterGraphServerPort() override
DTOR.
cFilterGraphClientPort()
CTOR.
Definition filtergraphport.h:500
tResult SetTriggerForwardingToChild(const ucom::ant::iobject_ptr< ant::ISampleStream > &pSampleStream, bool bForwarded) override
tResult SetTriggerForwardingFromParent(bool bForwarded) override
Definition filtergraphport.h:542
tResult SetTriggerForwardingFromParent(bool bForwarded) override
tResult SetTriggerForwardingToChild(const ucom::ant::iobject_ptr< ant::ISampleStream > &pSampleStream, bool bForwarded) override
Definition filtergraphport.h:593
cFilterGraphClientPort(const char *strName)
virtual ~cFilterGraphClientPort() override
DTOR.
cFilterGraphClientPort()
CTOR.
trigger_pipe_item()=default
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
Namespace for all internally used functionality implemented.
Definition filtergraphport.h:30
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
adtf_util::cString get_named_graph_object_full_name(const INamedGraphObject &oGraphObject)
Namespace for all functionality of the ADTF Streaming SDK provided since v3.5.
Definition filterbase.h:255
Namespace for all functionality of the ADTF Streaming SDK provided since v3.7.
Definition filtergraphport.h:580
Namespace for all functionality of the ADTF Streaming SDK provided since v3.16.
Definition filtergraphport.h:624
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
object_ptr< T > ucom_object_ptr_cast(object_ptr< T > oCasted)
Alias always bringing the latest version of ant::ucom_object_ptr_cast() into scope.
Definition object_ptr_utilities.h:135
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
Definition filtergraphport.h:40
bool bTriggerForwarding
whether the trigger has to be handed on to this destination.
Definition filtergraphport.h:44
adtf::ucom::object_ptr< U > pTo
the to reference.
Definition filtergraphport.h:42
Definition filtergraphport.h:36
tResult DisconnectRouting(const adtf::ucom::ant::iobject_ptr< T > &pFrom, const tDestination &sTo)
Definition filtergraphport.h:169
std::vector< tDestination > m_oTos
the to references.
Definition filtergraphport.h:50
tResult ResetFrom(const adtf::ucom::ant::iobject_ptr< T > &pFrom)
Definition filtergraphport.h:67
tResult AddTo(const adtf::ucom::ant::iobject_ptr< U > &pTo)
Definition filtergraphport.h:106
tResult SetTriggerForwardingToChild(const adtf::ucom::ant::iobject_ptr< U > &pTo, bool bForwarded)
Definition filtergraphport.h:207
~port_router()
DTOR.
Definition filtergraphport.h:58
tResult ConnectRouting(const adtf::ucom::ant::iobject_ptr< T > &pFrom, const tDestination &sTo)
Definition filtergraphport.h:147
tResult SetTriggerForwardingFromParent(bool bForwarded)
Definition filtergraphport.h:187
port_router()=default
CTOR.
bool m_bTriggerForwardingFromParent
Definition filtergraphport.h:53
adtf::ucom::object_ptr< T > m_pFrom
the from reference.
Definition filtergraphport.h:48