IltmmConvert::get_SourceStreamType Example for C++

This example will select the last video and audio streams. There is no error checking to make the example easier to understand.

void SelectLastProgram(IltmmConvert *pConvert) 
{ 
   long SourceStreamCount = 0; 
   /* Select the last video stream - rarely necessary, since there is usually only one video stream */ 
   pConvert->get_SourceStreamCount(ltmmConvert_Stream_Video, &SourceStreamCount); 
   if(SourceStreamCount > 1) 
      pConvert->put_SelectedSourceStream(ltmmConvert_Stream_Video, SourceStreamCount - 1); 
   /* Select the last audio stream */ 
   pConvert->get_SourceStreamCount(ltmmConvert_Stream_Audio, &SourceStreamCount); 
   if(SourceStreamCount > 1) 
      pConvert->put_SelectedSourceStream(ltmmConvert_Stream_Audio, SourceStreamCount - 1); 
} 

Help Version 22.0.2023.1.26
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.