IltmmPlay::get_StreamCount 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(IltmmPlay *pPlay) 
{ 
   long StreamCount = 0; 
   /* Select the last video stream - rarely necessary, since there is usually only one video stream */ 
   pPlay->get_StreamCount(ltmmPlay_Stream_Video, &StreamCount); 
   if(StreamCount > 1) 
      pPlay->put_SelectedStream(ltmmPlay_Stream_Video, StreamCount - 1); 
   /* Select the last audio stream */ 
   pPlay->get_StreamCount(ltmmPlay_Stream_Audio, &StreamCount); 
   if(StreamCount > 1) 
      pPlay->put_SelectedStream(ltmmPlay_Stream_Audio, StreamCount - 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.