Project

General

Profile

Actions

Support Request #11254

closed

Basic API questions about Sample Stream, Runner and getting the instance name

Added by hidden almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Customer:
AUDI
Department:
EF
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Topic:
ADTF::Common
FAQ Links:

Description

Supportanfrage

I have some question where I could not find concrete answers to them in the documentation.
May it would be a good change to extend a FAQ page from them.
Questions:

  1. What does a "sample stream" exactly do? which functionality does it have?
  2. Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?
  3. Is there a simple function to return a filter instance name (e.g. adtf2 OIGetInstanceName)?
    -- the GetName(base::ant::IString&& ) returns an error code, so I have to save the filter name as member variable

Lösung

What does a "sample stream" exactly do? which functionality does it have?

ADTF 3.x differs between Control Flow (Runner Pipe) and Streaming (Data Pipe).
The connection between two data pins to transport data (Samples) is a Sample Stream, which handles the data queue, so that reader could access the data, it is not the job of a filter to distribute and hold the data.
Please have a look here:

Note: There is a typo in the text -> The shown SampleStream is connected to 1 writer and 2 readers... as there are always only single inputs as restriction in any components in ADTF.

Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?

It is the visualization how things work regarding triggers, there is also possibilty to manipulate it.
But we are planning to hide these data triggers or better visualize the inner connection.
But the understanding is very important to differ, imagine you are having a mixed triggered filter and the guy who designs the session has to know the purpose and options given by the programer.

If you pass tTrue (which is the default) for bDataInTrigger in your CreateInputPin call, a Runner that calls the Process/ProcessInput Methods will be created for you and thus be shown within the CE. If you do not want to act on data triggers, just pass tFalse.
passing False, will not influence the reader in any way. Just to be sure: please keep it mind that you should not perform any long running operations in an external sample queue and must not forward or create any samples on outpus within your Push() implementation. That's what Runners are for!

If a filter should be data triggered or time triggered is fully dependent on the use case and cannot be answered globally.

Is there a simple function to return a filter instance name (e.g. adtf2 OIGetInstanceName)?
-- the GetName(base::ant::IString&& ) returns an error code, so I have to save the filter name as member variable

Only the Session Manager knows the instance name so he is your provider.
Please have a look here:

You have to use and get it by a property:

property_variable<cString> m_strName = "$(THIS_OBJECT_NAME)" 

Another convinience option to retrieve the full name of a graph object/Filter instance use the adtf::streaming::ant::get_named_graph_object_full_name() function: https://support.digitalwerk.net/adtf/v3/adtf_html/namespaceadtf_1_1streaming_1_1ant.html#ae0fe96ba02c9da6f7072f9447055c7a2

Please note, that both the Macro-Property and the get_named_graph_object_full_name() function will not work within the Constructor of your Filter, but in any function afterwards (i.e. Init())


Related issues

Related to Public Support - Support Request #11618: Receiving name of current filter instanceClosedActions
Actions

Also available in: Atom PDF