Project

General

Profile

Actions

Support Request #7981

closed

How to get SampleTypeName

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

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

Description

Supportanfrage

Sorry, I did not find any function that can readback "strSampleTypeName". Please help how to get this value.

The only workaround seems to me to have same pin name and sample type name and it is not good.

        // Set typing for output pin
          ucom::cObjectPtr<adtf::IMediaType> pType = NULL;
          RETURN_IF_FAILED(m_oOutputEnvironment.GetMediaType(&pType));
          ucom::cObjectPtr<adtf::IMediaTypeDescription> pTypeDescription = NULL;
          if(IS_OK(pType->GetInterface(IID_ADTF_MEDIA_TYPE_DESCRIPTION, (tVoid**)&pTypeDescription)))
          {
            //if you are not sure your description works! 
            //react on this return value!
            RETURN_IF_FAILED(pTypeDescription->SetMediaSampleDescription("tVehicleModelEnvironment",        //strTypeName,
                                                                         strMyDescription.GetPtr(),
                                                                         IMediaDescription::MDF_DDL020000));
          }

(I will be on vacation till 11.8. so no response needed sooner)

Lösung

Just hit pTypeDescription->GetMediaSampleName to retreive SampleTypeName

For an example please have a look at Demo Qt Media Description Display Filter to adapt for your use case.


Files

VehicleModelOutputBehaviour.cpp (34.1 KB) VehicleModelOutputBehaviour.cpp Please note MediaSampleDescription from source hidden, 2019-08-12 11:39
Actions

Also available in: Atom PDF