Author: robux4
Date: 2004-09-23 22:53:00 +0400 (Thu, 23 Sep 2004)
New Revision: 836
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/VobParser.cpp
Log:
output one XML per DVD domain (one with FP+VMG and one for each VTS)
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-23 15:06:15 UTC (rev 835)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-23 18:53:00 UTC (rev 836)
@@ -1060,7 +1060,6 @@
CellListElem* cle;
CellsListType::Node *node;
const CellsListType *CellsList = IfoFile->GetCellsList();
-// CellMap& cell_map = m_VobParser->GetVobMap();
cell_info_node* cin;
static unsigned char _PrivateFP[] = {0x30, 0x00, 0x00, 0x00};
@@ -1068,10 +1067,10 @@
static unsigned char _PrivateVTS[] = {0x30, 0x80, 0x00, 0x00};
static unsigned char _PrivateTT[] = {0x28, 0x00, 0x00};
- wxString line;
+ wxString line, editionUID = CreateUID();
wxFileConfig *pConfig = (wxFileConfig *)wxConfigBase::Get();
// Get sub directory
- wxString Filename = pConfig->Read("OutputDirectory","") + "menu.xml";
+ wxString Filename = pConfig->Read("OutputDirectory","") + "menuVMG.xml";
wxTextFile XmlFile(Filename);
XmlFile.Create();
XmlFile.AddLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
@@ -1085,7 +1084,7 @@
lvl++;
XmlFile.AddLine(IndentString(lvl)+"<EditionEntry>");
lvl++;
- XmlFile.AddLine(IndentString(lvl)+"<EditionUID>"+CreateUID()+"</EditionUID>");
+ XmlFile.AddLine(IndentString(lvl)+"<EditionUID>"+editionUID+"</EditionUID>");
XmlFile.AddLine(IndentString(lvl)+"<EditionProcessed>1</EditionProcessed>"); // DVD style menu
// Write the first play PGC
@@ -1130,13 +1129,32 @@
lvl--;
XmlFile.AddLine(IndentString(lvl)+"</ChapterAtom>");
}
+ lvl--;
+ XmlFile.AddLine(IndentString(lvl)+"</EditionEntry>");
+ lvl--;
+ XmlFile.AddLine("</Chapters>");
+ XmlFile.Write();
+ // Write the Video Title Set
+ for (int title=1; title <= IfoFile->NumberOfTitles(); title++)
+ {
timecode_startA = timecode_endA;
- // Write the Video Title Set
- for (int title=1; title <= IfoFile->NumberOfTitles(); title++)
- {
- XmlFile.AddLine("\n"+IndentString(lvl)+"<!-- Video Title Set -->");
+ wxString Filename = pConfig->Read("OutputDirectory","") + wxString::Format("menuVTS%02d.xml", title);
+ wxTextFile XmlFile(Filename);
+ XmlFile.Create();
+ XmlFile.AddLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ XmlFile.AddLine("<!DOCTYPE Chapters SYSTEM \"matroskachapters.dtd\">");
+ XmlFile.AddLine("");
+
+ XmlFile.AddLine("<Chapters>");
+ lvl++;
+ XmlFile.AddLine(IndentString(lvl)+"<EditionEntry>");
+ lvl++;
+ XmlFile.AddLine(IndentString(lvl)+"<EditionUID>"+editionUID+"</EditionUID>");
+ XmlFile.AddLine(IndentString(lvl)+"<EditionProcessed>1</EditionProcessed>"); // DVD style menu
+
+ XmlFile.AddLine(IndentString(lvl)+"<!-- Video Title Set -->");
XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
lvl++;
wxString _myUIDa = CreateUID();
@@ -1190,14 +1208,13 @@
DisplayTime(lvl, XmlFile, timecode_startA, timecode_endA);
lvl--;
XmlFile.AddLine(IndentString(lvl)+"</ChapterAtom>");
- timecode_startA = timecode_endA;
- }
- lvl--;
- XmlFile.AddLine(IndentString(lvl)+"</EditionEntry>");
- lvl--;
- XmlFile.AddLine("</Chapters>");
- XmlFile.Write();
+ lvl--;
+ XmlFile.AddLine(IndentString(lvl)+"</EditionEntry>");
+ lvl--;
+ XmlFile.AddLine("</Chapters>");
+ XmlFile.Write();
+ }
}
virtual void AfterShow(void)
Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp 2004-09-23 15:06:15 UTC (rev 835)
+++ trunk/DvdMenuXtractor/VobParser.cpp 2004-09-23 18:53:00 UTC (rev 836)
@@ -69,7 +69,6 @@
#else
#define inc_lvl()
#define dec_lvl()
-//void DebugLog(const char *fmt,...) { }
#define DebugLog myfprintf
#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.