Private Sub SetDVDSettings()
Dim pDVDSource As ltmmDVDSource
Dim pTitle As ltmmDVDTitle
Dim pChapter As ltmmDVDChapter
Dim pSubpictureStream As ltmmDVDSubpictureStream
Dim pAudioStream As ltmmDVDAudioStream
Dim lCount As Long
Dim lVal As Long
Dim vbVal As Boolean
Dim dVal As Double
Dim strPlayList As String
' force to use the DVD source
ltmmConvertCtrl1.UseDVDSource = True
' Set the source DVD image
ltmmConvertCtrl1.SourceFile = "C:\DVDImage\VIDEO_TS\VIDEO_TS.IFO"
ltmmConvertCtrl1.TargetFile = "C:\DVDImage.avi"
' Get the DVD source interface
Set pDVDSource = ltmmConvertCtrl1.GetSubObject (ltmmConvert_Object_SourceFilter)
' Select the mian title in the dics
If pDVDSource.Selected <> ltmmDVDSource_Main_Selected Then
pDVDSource.Selected = ltmmDVDSource_Main_Selected
End If
' Get the disc duration
dVal = pDVDSource.TotalDuration
' Do something with the value
' Get the selected title duration
dVal = pDVDSource.SelectedDuration
' Do something with the value
' Get the play list settings
strPlayList = pDVDSource.PlayList
' You can save this to a file and restore the settings later
' Restore the playlist settings
pDVDSource.PlayList = strPlayList
' Get the title count in the disc
lCount = pDVDSource.TitleCount
For i = 0 To lCount - 1
' Get the title interface
Set pTitle = pDVDSource.GetTitle (i)
' Get the X aspect
lVal = pTitle.AspectX
' Do something with the value
' Get the Y aspect
lVal = pTitle. AspectY
' Do something with the value
' Get if the title is a film mode or camera mode
vbVal = pTitle.IsFilmMode
' Do something with the value
' Get if there is a user data in line 21, field 1
vbVal = pTitle.Line21Field1InGOP
' Do something with the value
' Get if there is a user data in line 21, field 2
vbVal = pTitle.Line21Field2InGOP
' Do something with the value
' Get the compression
lVal = pTitle.Compression
' Do something with the value
' Get the X source resolution
lVal = pTitle.SourceResolutionX
' Do something with the value
' Get the Y source resolution
lVal = pTitle.SourceResolutionY
' Do something with the value
' Get the Frame Height
lVal = pTitle.FrameHeight
' Do something with the value
' Get the Frame Rate
lVal = pTitle.FrameRate
' Do something with the value
' Get if the source is a letter boxed
vbVal = pTitle.IsSourceLetterboxed
' Do something with the value
' Get if the picture can be shown as letterbox
vbVal = pTitle.LetterboxPermitted
' Do something with the value
' Get if the picture can be shown as pan-scan
vbVal = pTitle.PanscanPermitted
' Do something with the value
' Get the title duration
dVal = pTitle.TotalDuration
' Do something with the value
' Select all title chapters
If pTitle.Selected <> ltmmDVDSource_Selected Then
pTitle.Selected = ltmmDVDSource_Selected
End If
' Get the selected chapter duration
dVal = pTitle.SelectedDuration
' Do something with the value
' Get the audio stream count in the title
If pTitle.AudioStreamCount > 0 Then
' Select the first audio stream
If pTitle.SelectedAudioStream = -1 Then
pTitle.SelectedAudioStream = 0
End If
' Get the first audio stream
Set pAudioStream = pTitle.GetAudioStream (0)
' Select the audio stream
If pAudioStream.Selected = False Then
pAudioStream.Selected = True
End If
' Get the application mode
lVal = pAudioStream.AppMode
' Do something with the value
' Get the application mode data
lVal = pAudioStream.AppModeData
' Do something with the value
' Get the auido format
lVal = pAudioStream.AudioFormat
' Do something with the value
' Get the number of channels
lVal = pAudioStream.Channels
' Do something with the value
' Get the frequency
lVal = pAudioStream.Frequency
' Do something with the value
' Get the language
lVal = pAudioStream.Language
' Do something with the value
' Get the language extension
lVal = pAudioStream.LanguageExtension
' Do something with the value
' Get the quantization
lVal = pAudioStream.Quantization
' Do something with the value
' Free the pointer
Set pAudioStream = Nothing
' Get the subpicture stream count
If pTitle.SubpictureStreamCount > 0 Then
' Select the first subpicture stream
If pTitle.SelectedSubpictureStream = -1 Then
pTitle.SelectedSubpictureStream = 0
End If
' Get the first subpicture stream
Set pSubpictureStream = pTitle.GetSubpictureStream (0)
' Select the subpicture stream
If pSubpictureStream.Selected = False Then
pSubpictureStream.Selected = True
End If
' Get the coding mode
lVal = pSubpictureStream.CodingMode
' Do something with the value
' Get the langauge
lVal = pSubpictureStream.Language
' Do something with the value
' Get the language extension
lVal = pSubpictureStream.LanguageExtension
' Do something with the value
' Get the type
lVal = pSubpictureStream.Type
' Do something with the value
' Free the pointer
Set pSubpictureStream = Nothing
End If
' Get the chapter count
If pTitle.ChapterCount > 0 Then
' Get the first chapter
Set pChapter = pTitle.GetChapter (0)
' Get the chapter duration
dVal = pChapter.Duration
' do something with the value
' Get if the chapter is selected
If pChapter.Selected = False Then
pChapter.Selected = True
End If
' Free the pointer
Set pChapter = Nothing
End If
End If
Set pTitle = Nothing
Next i
' Free the pointer
Set pDVDSource = Nothing
End Sub