[matroska] r935 - trunk/DvdMenuXtractor
[email protected] Thu, 28 Oct 2004 03:25:29 +0400 (MSD)
Newsgroups
gmane.comp.multimedia.matroska.cvs
Message-ID
<[email protected] >
Author: robux4
Date: 2004-10-28 03:25:28 +0400 (Thu, 28 Oct 2004)
New Revision: 935
Modified:
trunk/DvdMenuXtractor/VobParser.cpp
trunk/DvdMenuXtractor/VobParser.h
Log:
the subs extraction should be OK now (compatible)
Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp 2004-10-27 20:40:13 UTC (rev 934)
+++ trunk/DvdMenuXtractor/VobParser.cpp 2004-10-27 23:25:28 UTC (rev 935)
@@ -811,7 +811,7 @@
// ----------------------------------------------------------------------------
-void SubDemuxWriter::WriteTimecodeInfo(int32_t delay, wxString & debug)
+void SubDemuxWriter::WriteTimecodeInfo(int32_t delay, uint64_t filepos, wxString & debug)
{
if (!m_TimecodeFile)
{
@@ -859,7 +859,15 @@
"# alt: ", 1, 112, m_TimecodeFile);
fprintf(m_TimecodeFile, "%s\n\n", DecodeLanguage(m_language));
}
- fwrite(debug.c_str(), 1, debug.length(), m_TimecodeFile);
+ bool sign = delay < 0;
+ delay = sign?-delay:delay;
+ int millisecond = delay % 1000;
+ delay /= 1000;
+ int second = delay % 60;
+ delay /= 60;
+ int minute = delay % 60;
+ delay /= 60;
+ fprintf(m_TimecodeFile, "timestamp: %s%02d:%02d:%02d:%03d, filepos: %09x\n", sign?"-":"", delay,minute,second,millisecond,filepos);
}
// ============================================================================
Modified: trunk/DvdMenuXtractor/VobParser.h
===================================================================
--- trunk/DvdMenuXtractor/VobParser.h 2004-10-27 20:40:13 UTC (rev 934)
+++ trunk/DvdMenuXtractor/VobParser.h 2004-10-27 23:25:28 UTC (rev 935)
@@ -195,8 +195,8 @@
m_filename += m_fileExtension;
m_file = fopen(m_filename.c_str(),"wb");
}
+ WriteTimecodeInfo(delay, ftell(m_file), debug);
fwrite(buff, 1, size, m_file);
- WriteTimecodeInfo(delay, debug);
}
protected:
wxString m_Filename;
@@ -204,7 +204,7 @@
FILE* m_file;
FILE* m_TimecodeFile;
- virtual void WriteTimecodeInfo(int32_t delay, wxString & debug)
+ virtual void WriteTimecodeInfo(int32_t delay, uint64_t filepos, wxString & debug)
{
if (!m_TimecodeFile)
{
@@ -304,7 +304,7 @@
Write(buff,size, delay, debug);
}
protected:
- void WriteTimecodeInfo(int32_t delay, wxString & debug);
+ void WriteTimecodeInfo(int32_t delay, uint64_t filepos, wxString & debug);
private:
uint16_t m_width;
uint16_t m_height;