void SetDVDSettingsExample (void){// Create the converter objectIltmmConvert* pConvert;IUnknown* punk;IltmmDVDSource* pDVDSource;HRESULT hr = CoCreateInstance(&CLSID_ltmmConvert, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmConvert, (void**) &pConvert);if(FAILED(hr)){return;}// Force the DVD source to be usedIltmmConvert_put_UseDVDSource(pConvert, VARIANT_TRUE);// Set the source DVD imageIltmmConvert_put_SourceFile(pConvert, MAKE_MEDIA_PATH("VIDEO_TS.IFO"));IltmmConvert_put_TargetFile(pConvert, MAKE_MEDIA_PATH("DVDImage.avi"));// Get the DVD source interfaceIltmmConvert_GetSubObject(pConvert, ltmmConvert_Object_SourceFilter, &punk);if (punk){IUnknown_QueryInterface(punk, &IID_IltmmDVDSource, (void**)&pDVDSource);if (pDVDSource){IltmmDVDTitle *pTitle;long lCount;long lVal;VARIANT_BOOL vbVal;double dVal;BSTR strPlayList;int i;// Select the mian title in the dicsIltmmDVDSource_get_Selected (pDVDSource, &lVal);if (lVal != ltmmDVDSource_Main_Selected)IltmmDVDSource_put_Selected(pDVDSource, ltmmDVDSource_Main_Selected);// Get the disc durationIltmmDVDSource_get_TotalDuration(pDVDSource, &dVal);// Do something with the value// Get the selected title durationIltmmDVDSource_get_SelectedDuration(pDVDSource, &dVal);// Do something with the value// Get the play list settingsIltmmDVDSource_get_PlayList(pDVDSource, &strPlayList);// You can save this to a file and restore the settings later// Restore the playlist settingsIltmmDVDSource_put_PlayList(pDVDSource, strPlayList);// Free the stringSysFreeString(strPlayList);// Get the title count in the discIltmmDVDSource_get_TitleCount(pDVDSource, &lCount);for (i = 0; i < lCount; i++){// Get the title interfaceIltmmDVDSource_GetTitle(pDVDSource, i, &pTitle);if (pTitle){// Get the X aspectIltmmDVDTitle_get_AspectX(pTitle, &lVal);// Do something with the value// Get the Y aspectIltmmDVDTitle_get_AspectY(pTitle, &lVal);// Do something with the value// Get if the title is a film mode or camera modeIltmmDVDTitle_get_IsFilmMode(pTitle, &vbVal);// Do something with the value// Get if there is user data in line 21, field 1IltmmDVDTitle_get_Line21Field1InGOP(pTitle, &vbVal);// Do something with the value// Get if there is user data in line 21, field 2IltmmDVDTitle_get_Line21Field2InGOP(pTitle, &vbVal);// Do something with the value// Get the compressionIltmmDVDTitle_get_Compression(pTitle, &lVal);// Do something with the value// Get the X source resolutionIltmmDVDTitle_get_SourceResolutionX(pTitle, &lVal);// Do something with the value// Get the Y source resolutionIltmmDVDTitle_get_SourceResolutionY(pTitle, &lVal);// Do something with the value// Get the Frame HeightIltmmDVDTitle_get_FrameHeight(pTitle, &lVal);// Do something with the value// Get the Frame RateIltmmDVDTitle_get_FrameRate(pTitle, &lVal);// Do something with the value// Get if the source is letter boxedIltmmDVDTitle_get_IsSourceLetterboxed(pTitle, &vbVal);// Do something with the value// Get if the picture can be shown as letterboxIltmmDVDTitle_get_LetterboxPermitted(pTitle, &vbVal);// Do something with the value// Get if the picture can be shown as pan-scanIltmmDVDTitle_get_PanscanPermitted(pTitle, &vbVal);// Do something with the value// Get the title durationIltmmDVDTitle_get_TotalDuration(pTitle, &dVal);// Do something with the value// Select all title chaptersIltmmDVDTitle_get_Selected(pTitle, &lVal);if (lVal != ltmmDVDSource_Selected)IltmmDVDTitle_put_Selected(pTitle, ltmmDVDSource_Selected);// Get the selected chapter durationIltmmDVDTitle_get_SelectedDuration(pTitle, &dVal);// Do something with the value// Get the audio stream count in the titleIltmmDVDTitle_get_AudioStreamCount(pTitle, &lVal);if (lVal > 0){IltmmDVDAudioStream* pAudioStream;// Select the first audio streamIltmmDVDTitle_get_SelectedAudioStream(pTitle, &lVal);if (lVal == -1)IltmmDVDTitle_put_SelectedAudioStream(pTitle, 0);// Get the first audio streamIltmmDVDTitle_GetAudioStream(pTitle, 0, &pAudioStream);if (pAudioStream){// Select the audio streamIltmmDVDAudioStream_get_Selected(pAudioStream, &vbVal);if (vbVal == VARIANT_FALSE)IltmmDVDAudioStream_put_Selected(pAudioStream, VARIANT_TRUE);// Get the application modeIltmmDVDAudioStream_get_AppMode(pAudioStream, &lVal);// Do something with the value// Get the application mode dataIltmmDVDAudioStream_get_AppModeData(pAudioStream, &lVal);// Do something with the value// Get the auido formatIltmmDVDAudioStream_get_AudioFormat(pAudioStream, &lVal);// Do something with the value// Get the number of channelsIltmmDVDAudioStream_get_Channels(pAudioStream, &lVal);// Do something with the value// Get the frequencyIltmmDVDAudioStream_get_Frequency(pAudioStream, &lVal);// Do something with the value// Get the languageIltmmDVDAudioStream_get_Language(pAudioStream, &lVal);// Do something with the value// Get the language extensionIltmmDVDAudioStream_get_LanguageExtension(pAudioStream, &lVal);// Do something with the value// Get the quantizationIltmmDVDAudioStream_get_Quantization(pAudioStream, &lVal);// Do something with the value// Free the pointerIltmmDVDAudioStream_Release(pAudioStream);}}// Get the subpicture stream countIltmmDVDTitle_get_SubpictureStreamCount(pTitle, &lVal);if (lVal > 0){IltmmDVDSubpictureStream* pSubpictureStream;// Select the first subpicture streamIltmmDVDTitle_get_SelectedSubpictureStream(pTitle, &lVal);if (lVal == -1)IltmmDVDTitle_put_SelectedSubpictureStream(pTitle, 0);// Get the first subpicture streamIltmmDVDTitle_GetSubpictureStream(pTitle, 0, &pSubpictureStream);if (pSubpictureStream){// Select the subpicture streamIltmmDVDSubpictureStream_get_Selected(pSubpictureStream, &vbVal);if (vbVal == VARIANT_FALSE)IltmmDVDSubpictureStream_put_Selected(pSubpictureStream, VARIANT_TRUE);// Get the coding modeIltmmDVDSubpictureStream_get_CodingMode(pSubpictureStream, &lVal);// Do something with the value// Get the langaugeIltmmDVDSubpictureStream_get_Language(pSubpictureStream, &lVal);// Do something with the value// Get the language extensionIltmmDVDSubpictureStream_get_LanguageExtension(pSubpictureStream, &lVal);// Do something with the value// Get the typeIltmmDVDSubpictureStream_get_Type(pSubpictureStream, &lVal);// Do something with the value// Free the pointerIltmmDVDSubpictureStream_Release(pSubpictureStream);}}// Get the chapter countIltmmDVDTitle_get_ChapterCount(pTitle, &lVal);if (lVal > 0){// Get the first chapterIltmmDVDChapter* pChapter;IltmmDVDTitle_GetChapter(pTitle, 0, &pChapter);// Get the chapter durationIltmmDVDChapter_get_Duration(pChapter, &dVal);// Get if the chapter is selectedIltmmDVDChapter_get_Selected(pChapter, &vbVal);if (vbVal == VARIANT_FALSE)IltmmDVDChapter_put_Selected(pChapter, VARIANT_TRUE);// Free the pointerIltmmDVDChapter_Release(pChapter);}IltmmDVDTitle_Release(pTitle);}}IltmmDVDSource_Release(pDVDSource);}IUnknown_Release(punk);}IltmmConvert_Release(pConvert);}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
