ADTF Qt5
Loading...
Searching...
No Matches
adtf::javascript::scripting::cStreamTypeWrapper Class Reference

#include <types.h>

Inherits QObject.

Public Member Functions

Q_INVOKABLE void setProperty (const QString &strName, const QJSValue &oValue)
 
Q_INVOKABLE QList< QString > getSubStreams ()
 
Q_INVOKABLE QObject * getSubStreamType (const QString &strSubStream)
 

Properties

QVariantMap properties
 Returns the properties of the stream type.
 
QString stream_meta_type
 Returns the stream meta type of the stream type.
 

Detailed Description

A wrapper for stream types.

Member Function Documentation

◆ getSubStreams()

Q_INVOKABLE QList< QString > adtf::javascript::scripting::cStreamTypeWrapper::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 * adtf::javascript::scripting::cStreamTypeWrapper::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 adtf::javascript::scripting::cStreamTypeWrapper::setProperty ( const QString & strName,
const QJSValue & oValue )

Set a property to a given value.

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

The documentation for this class was generated from the following file: