View Full Version : FileOP.dll in VobSub
mario_a
8th June 2002, 10:53
Hi,
Along with the VobSplit download is distributed a file called FileOp.dll.This DLL contains 2 functions:
1) GetFileSizeFactorPerCent
2) SplitFile
Could someone give me the prototypes ( function declarations) of these
functions, so I can use the DLL.
Thanx in advance,
Mario
Darksoul71
8th June 2002, 14:53
Hi,
try to contact the author of Vobsplit and ask him for the specs.
But I would be suprised if he really answers. I asked him for the Vobsplit code a while ago because I wanted to do a modified version of Vobsplit that splits a VOB automaticly into 2-5 parts for MiniDVD authoring instead of the not very usefull dragbar stuff.
cu,
D$
mario_a
10th June 2002, 12:04
Hi DarkSoul,
I assume u never got any reply from the author of VobSplit :-(
I have mailed him, but after what u said, i am not too expectant of a reply.
Do u know of any other source code for splitting vobs that is available anywhere?
Thanx for your time,
Mario
Darksoul71
10th June 2002, 16:25
Hi !
Stupid me :D
I forgot to mention. Of course I never got answer by the author of Vobsplit. Thatīs why Iīm somewhat frustrated.
I had a discussion with Derrow (the author of Ifoedit) about Vobsplitig. Basicly (from the point of splitting the VOB) you have to split in 2048 byte blocks. But whatīs important: if you start a new VOB it has to start with a "navigation pack". You can find out if a 2k block is a navigation pack quite easily (if you talked to Derrow ;)):
You have to check the 17th byte. It has to be a 0xBB, if the 2k block is a navigation pack.
This are some code snippets Derrow has sent me. I hope that itīs ok if I post them:
if(buffer[17]==0xBB &&
(m_iOutLba+bswap_32(*(u_int*)(buffer+1039)) >
m_iVobSplitSize)) )
int CIfoEditDlg::WriteVob(unsigned char *buffer)
{
CString strVts;
CString curVtsName;
CString curVtsPath;
if(!m_fpout || m_iOutLba>m_iVobSplitSize ||
(buffer[17]==0xBB &&
(m_iOutLba+bswap_32(*(u_int*)(buffer+1039)) >
m_iVobSplitSize)) )
{
if(m_fpout)
_close(m_fpout);
curVtsName=m_VobOutname.Mid(m_VobOutname.ReverseFind('\\')+1);
curVtsPath=m_VobOutname.Left(m_VobOutname.ReverseFind('\\')+1);
strVts.Format("%s_%d.VOB",curVtsName.Left(6),m_iOutVob++);
m_VobOutPathname=curVtsPath+strVts;
m_fpout = _open(curVtsPath+strVts, _O_BINARY |
_O_WRONLY | _O_CREAT | _O_SEQUENTIAL | _O_TRUNC,
_S_IWRITE);
if(m_fpout<=0)
{
AfxMessageBox("Failed to open for writing:
"+curVtsPath+strVts);
return FALSE;
}
m_iOutLba=0;
}
if(_write(m_fpout, buffer, 2048)!=2048)
return FALSE;
m_iOutLba++;
CheckVobuList(buffer);
return TRUE;
}
Hope this helps somewhat. Basicly youīve just to read and write 2k blocks. For each new VOB file youīve to check for the navigation pack stuff. Quite easy, but:
a) The internal structure of the VOB gets damaged (at least I think so because Derrow told me that something has to be corrected. I dunno too much on this because the internal VOB structure is still a mistery to me :D)
b) IFOEdit supports splitting to a custom file size. So itīs not needed to really write a tool like VOBSplit again.
cu,
D$
mario_a
18th June 2002, 05:40
Hey DarkSoul,
Thanx for the excellent tip ! I have been able to split a VOB file successfully.
Your help is really appreciated.
Thanks once again,
Mario
Darksoul71
18th June 2002, 06:46
Hi Mario !
Your thank you should go out to Derrow, the programmer of IfoEdit. It was his idea. :D
-D$
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.