473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DVD programming question


Hi.

I wrote a DVD parser in Visual C# 2005 and I am not getting accurate log file results.

The parser simply extracts bytes based on a beginning and ending offset from an XML file. The beginning and ending offsets are from a log file produced from a commercial DVD Extractor program.

When the extracted VOB file is created, the new log file does not show accurate information.

The original log file segment is below:

[00:00:00:00 0 11 1
00:00:00:15 59 11 1
00:00:01:00 127 11 1
00:00:00:00 196 12 1
00:00:00:15 345 12 1
00:00:00:00 516 13 1
...]

The XML node is below:

<LogFileInfo TitleNumber="11" BegOffset="0" EndOffset="401408">G:\DVD\SwitchOver output\...\VIDEO_TS\VIDEO_TS.vob</LogFileInfo>

The log file offset value is in multiples of blocks of 2048 bytes.

192 blocks * 2048 bytes/block = 401408 bytes

The newly created log file is below:

[00:00:00:00 0 11 1
00:00:00:15 51 11 1
00:00:01:00 105 11 1
00:00:00:00 159 12 1
00:00:00:15]
Why is the beginning offset of title number 12 present in this log file? (offset 196 should start title number 12, not offset 159!)

The file IO code segment is as follows:

while (true)
{
byte[] bytes = GetBytesFromFile(fs1, r1, begOffset, endOffset, bytesRead, length);

bytesRead += bytes.Length;

// Write bytes to file
if (bytes != null) StoreBytes(bytes);

//reached end of file
if (bytes == null || bytesRead == length)
{
Console.WriteLine("reached end of reading.");
break;
}
...
}

Your help would be appreciated.

Thanks,
William Johnston
May 15 '07 #1
0 952

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rdsteph | last post by:
I am having a lot of fun using the pyGoogle module ( http://pygoogle.sourceforge.net/ ) that uses the Google API. It is about as easy to use as I can imagine, and it is a lot nicer than using my...
12
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now...
10
by: Rohit | last post by:
I need some ideas on how to write a program that could -- Read an MS Access database and grab information say Vehicle year, vehicle make -- Make a call to a website and enter the information...
3
by: user | last post by:
Hi all, At the outset, I regret having to post this slightly OT post here. However, I strongly feel that people in this group would be the best to advise me on my predicament. I am working as...
7
by: Jesse B. | last post by:
I've been learning how to program with C, and I can't find any info about GUI programming with C. I'm almost done with O'reilly's Practical programming with C, and would like to mess around with...
2
by: Ed_P | last post by:
Hello I just wanted to get the opinions of those of you who have experience developing C# applications and programming in general. I currently am learning the basics of programming (choosing C#...
9
by: tjones | last post by:
Hi, I am guessing this is *THE* nntp newsgroup for C#? I was hoping someone could point me in the right direction. Id like to find employment in the IT industry as a programmer again. My...
42
by: Kevin Spencer | last post by:
Is it just me, or am I really observing a trend away from analysis and probem-solving amongst programmers? Let me be more specific: It seems that every day, in greater numbers, people are coming...
11
by: arnuld | last post by:
hello all, 1st of all, i searched last 12 years archives of comp.lang.c++ because i have some problems. i got some help but not satisfied as i did not get solution specific to my problem. In the...
23
by: Dexter | last post by:
My site is home to series of quizzes ranging from Accounting, Business, Math to programming languages. These are multiple choice type questions and you get a score card at end. For C language, ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.