ADTF
cStreamTypeWrapper

A wrapper for stream types. More...

Inheritance diagram for cStreamTypeWrapper:
[legend]

Public Member Functions

Q_INVOKABLE void setProperty (const QString &strName, const QJSValue &oValue)
 Set a property to a given value. More...
 
Q_INVOKABLE QList< QString > getSubStreams ()
 Returns a list of all substreams. More...
 
Q_INVOKABLE QObject * getSubStreamType (const QString &strSubStream)
 Return an StreamType from the stream type if found, otherwise return null. More...
 

Properties

QVariantMap properties
 
QString stream_meta_type
 

Private Attributes

ucom::object_ptr< adtf::streaming::IStreamTypem_pType
 
QJSEngine & m_oEngine
 

Detailed Description

Member Function Documentation

◆ getSubStreams()

Q_INVOKABLE QList<QString> getSubStreams ( )

Returns a list of all substreams.

Example Usage

var reader = filter.createInputPin("input")
reader.streamTypeChanged.connect(function(type)
{
var substreams = type.getSubStreams()
if(substreams.length > 0)
{
var name = substreams[0]
var type = type.getSubStreamType(name)
console.log(name)
console.log(type.stream_meta_type)
}
})
Returns
List of substreams. Empty list if no substream is present

◆ getSubStreamType()

Q_INVOKABLE QObject* getSubStreamType ( const QString &  strSubStream)

Return an StreamType from the stream type if found, otherwise return null.

Example Usage

var reader = filter.createInputPin("input")
reader.streamTypeChanged.connect(function(type)
{
var substreams = type.getSubStreams()
if(substreams.length > 0)
{
var name = substreams[0]
var type = type.getSubStreamType(name)
console.log(name)
console.log(type.stream_meta_type)
}
})
Parameters
strSubStreamSubstream to get StreamType for
Returns
Substream StreamType (see adtf::javascript::scripting::cStreamTypeWrapper)

◆ setProperty()

Q_INVOKABLE void setProperty ( const QString &  strName,
const QJSValue &  oValue 
)

Set a property to a given value.

Parameters
[in]strNameThe Property name.
[in]oValueThe value to set.