ADTF no mediadescription for struct type " error

时间:2019-04-08 14:06:28

标签: c++ adtf

Explanation:

My ADTF-Filter gets as input two double values and its output is a struct. The struct contains a few double values.

typedef struct {
    double ValueX; 
    double ValueY; 
    double ValueZ; 
} tStruct;

My problem:

I wanted to see my values in "Signal View" But I'm getting this error:

warning | 00:00:15:015 | Media Description Service: No Media Description found for struct type '' on pin 'Filter/ValueX/'. This pin will not be available in SignalView! | media_description_signal_provider.cpp(158) | 12736/8516 | C:\tools\ADTF\2.14.2\bin\adtf_devenv.exe | OK | No error | cMediaManager_plugin

What I have tried

I played around a bit with the MediaDescription Editor and tried to see how it is done in the examples given by adtf. But nothing is working so far.

1 个答案:

答案 0 :(得分:1)

警告(无错误)准确描述了所缺少的内容:您正在使用结构的输出引脚上没有设置“媒体描述”。

我猜您在Init方法中使用的是这样的内容:

m_oOutputPin.Create("output", cObjectPtr<IMediaType>(new cMediaType(0, 0)), static_cast<IPinEventSink*> (this));

因此,您必须使用结构扩展媒体类型的创建:

m_oOutputPin.Create("output", cObjectPtr<IMediaType>(new cMediaType(0, 0, 0, "tStruct")), static_cast<IPinEventSink*> (this));

然后将根据您的结构对其进行设置和生成。

还可以查看示例https://support.digitalwerk.net/adtf/v2/adtf_sdk_html_docs/page_demo_media_desc_coder.html和结构tSimpleStruct_BE