|
|
Sort of worked out some functions, but one is not working properly. any comments or help appreciated.
The one im having problems with is ifoGetPGCICells
as it passes a structure down Byref, which holds the chapter, start_lba etc.
the value's I get back are just rubbish, so i suspect something is getting overwritten or my understanding of that call is all wrong.Here are the definitions ive processed so for
Public Declare Function ifoOpen Lib quot;C:\temp\vstrip.dllquot; (ByVal v_Filename As String, ByVal v_Flags As Integer) As Integer Public Declare Function ifoClose Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer) As Boolean
Public Declare Function ifoGetVideoDesc Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer) As String Public Declare Function ifoGetNumAudio Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer) As Integer Public Declare Function ifoGetNumSubPic Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer) As Integer
Public Declare Function ifoGetAudioDesc Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer, ByVal v_Ptr As Integer) As String Public Declare Function ifoGetSubPicDesc Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer, ByVal v_Ptr As Integer) As String Public Declare Function ifoGetNumPGCI Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer) As Integer Public Declare Function ifoGetPGCIInfo Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer, ByVal v_ptr As Integer, ByRef v_len As TitleTime) As Integer Public Declare Function ifoGetPGCICells Lib quot;C:\temp\vstrip.dllquot; (ByVal v_IFO_handle As Integer, ByVal v_ptr As Integer, ByRef v_cells As t_vs_vobcellid) As Boolean
Public Structure TIFOProgramChain Dim NumCells As Integer Dim Length As Double Dim Cells As t_vs_vobcellid End Structure
Public Structure TitleTime Dim s1 As Byte Dim s2 As Byte Dim s3 As Byte Dim s4 As Byte End Structure
Public Structure t_vs_vobcellid Dim start_lba, end_lba As Integer Dim vob_id As Integer Dim cell_id As Byte Dim angle As Byte Dim chapter As Byte Dim time As TitleTime End Structure
-------------------------------- Code on form ------------------ filename = quot;E:\VIDEO_TS\VTS_01_0.IFOquot; ifo_hnd = ifoOpen(filename, 0) ' nka - check what flags are lblDVD.Text = ifoGetVideoDesc(ifo_hnd)
For i = 0 To ifoGetNumAudio(ifo_hnd)If ifoGetAudioDesc(ifo_hnd, i) lt;gt; quot;quot; Then ListBox1.Items.Add(ifoGetAudioDesc(ifo_hnd, i))End If Next
For i = 0 To ifoGetNumSubPic(ifo_hnd)If ifoGetSubPicDesc(ifo_hnd, i) lt;gt; quot;quot; Then ListBox2.Items.Add(ifoGetSubPicDesc(ifo_hnd, i))End If Next
For i = 0 To numIFOchains - 1numCells = ifoGetPGCIInfo(ifo_hnd, i, sLen)tottime = Format$(sLen.s1, quot;##00quot;) amp; quot;:quot; amp; Format$(sLen.s2, quot;##00quot;) amp; quot;:quot; amp; Format$(sLen.s3, quot;##00quot;) amp; quot;:quot; amp; Format$(sLen.s4, quot;##00quot;)txt = Str(i) amp; quot;.quot; amp; quot;Length: quot; amp; tottime amp; quot; in quot; amp; Trim(Str(numCells)) amp; quot; cell(s)quot;TreeView1.Nodes.Add(txt)
------- at this point i start to call the ifoGetPGCICells function..Cheers
just never got round to it. Did you kind of self convert the vstrip source from 'c'? Or did you look at other examples? I tried once, a few years back, but just got it all in a mess.
just never got round to it. Did you kind of self convert the vstrip source from 'c'? Or did you look at other examples? I tried once, a few years back, but just got it all in a mess.
I translated much of it from the vstrip gui. written in Delphi.
Still can't see whats going wrong though.
I even put strict type conversions in.ie.
delphi cardinal type mapped to VB.net uInt16 type..
still no joy.. the first chapter it reads has the correct values, from then on.. its junk in the vars.
. |
|