[matroska] r888 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-10-17 17:48:22 +0400 (Sun, 17 Oct 2004)
New Revision: 888

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
   trunk/DvdMenuXtractor/IFOFile.cpp
   trunk/DvdMenuXtractor/IFOFile.h
   trunk/DvdMenuXtractor/VobParser.cpp
Log:
compilation cleanings
allow opening of the title VOBs

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-17 10:39:43 UTC (rev 887)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-17 13:48:22 UTC (rev 888)
@@ -873,7 +873,7 @@
 	{
 		static unsigned char _PrivatePGC[] = {0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 		static unsigned char _PrivatePTT[] = {0x18, 0x00, 0x00};
-		uint64_t st_time = start_time, end_time;
+		uint64_t st_time = start_time;
 
 		XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- PGC PGC_%d type %s -->",pgc_num+1,GetPGCType(pgc_type).c_str()));
 		XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
@@ -954,7 +954,7 @@
 		nano_duration += uint64_t(BCD2D(dtime.minute)) * 60 * 1000000000;
 		nano_duration += uint64_t(BCD2D(dtime.second)) * 1000000000;
 
-		float fps;
+		double fps;
 		switch((dtime.frame_u & 0xc0) >> 6) 
 		{
 		case 1:
@@ -1047,10 +1047,7 @@
 			return;
 		}
 
-		CellListElem* cle;
-		CellsListType::Node *node;
 		const CellsListType *CellsList = IfoFile->GetCellsList();
-		cell_info_node* cin;
 
 		static unsigned char _PrivateFP[]  = {0x30, 0x00, 0x00, 0x00};
 		static unsigned char _PrivateVM[]  = {0x30, 0xC0, 0x00, 0x00};
@@ -1067,7 +1064,7 @@
 		XmlFile.AddLine("<!DOCTYPE Chapters SYSTEM \"matroskachapters.dtd\">");
 		XmlFile.AddLine("");
 
-		int lvl = 0, i,j;
+		int lvl = 0;
 		uint64_t timecode_startA = 0, timecode_endA = 0;
 
 		XmlFile.AddLine("<Chapters>");
@@ -1218,7 +1215,7 @@
 		m_lbStep->SetLabel(StepString);
 		m_txtDemuxLog->AppendText(StepString+"\n");
 		m_lbStep->Update();
-		for (int16_t title = 0; title < IfoFile->NumberOfTitles(); title++)
+		for (int16_t title = 0; title <= IfoFile->NumberOfTitles(); title++)
 		{
 			VobParser *aVobParser = BuildVobMap(title);
 			if (aVobParser != NULL)

Modified: trunk/DvdMenuXtractor/IFOFile.cpp
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.cpp	2004-10-17 10:39:43 UTC (rev 887)
+++ trunk/DvdMenuXtractor/IFOFile.cpp	2004-10-17 13:48:22 UTC (rev 888)
@@ -66,7 +66,7 @@
 
 IFOFile::~IFOFile()
 {
-	for (int i=0; i<m_ifos.GetCount(); i++)
+	for (unsigned int i=0; i<m_ifos.GetCount(); i++)
 		ifoClose(m_ifos.Item(i)->GetData());
 	if (m_dvd)
 	{
@@ -120,7 +120,7 @@
 
 // ----------------------------------------------------------------------------
 
-const pgci_ut_t *IFOFile::LanguageUnits(int title) const
+const pgci_ut_t *IFOFile::LanguageUnits(unsigned int title) const
 {
 	if (title < m_ifos.GetCount())
 	{
@@ -133,7 +133,7 @@
 
 // ----------------------------------------------------------------------------
 
-const vts_ptt_srpt_t *IFOFile::VtsTitles(int title) const
+const vts_ptt_srpt_t *IFOFile::VtsTitles(unsigned int title) const
 {
 	if (title && title < m_ifos.GetCount())
 	{
@@ -144,7 +144,7 @@
 
 // ----------------------------------------------------------------------------
 
-const pgcit_t *IFOFile::VtsPGCs(int title) const
+const pgcit_t *IFOFile::VtsPGCs(unsigned int title) const
 {
 	if (title && title < m_ifos.GetCount())
 	{
@@ -157,7 +157,7 @@
 
 const int16_t IFOFile::NumberOfTitles() const
 {
-	if (m_ifos.Item(0) && m_ifos.Item(0)->GetData()->vmgi_mat)
+	if (m_ifos.GetCount() && m_ifos.Item(0)->GetData()->vmgi_mat)
 		return m_ifos.Item(0)->GetData()->vmgi_mat->vmg_nr_of_title_sets;
 	return 0;
 }

Modified: trunk/DvdMenuXtractor/IFOFile.h
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.h	2004-10-17 10:39:43 UTC (rev 887)
+++ trunk/DvdMenuXtractor/IFOFile.h	2004-10-17 13:48:22 UTC (rev 888)
@@ -46,9 +46,9 @@
 	bool IsACandidateCell(const unsigned int vobid, const unsigned int cellid);
 	virtual ~IFOFile();
 	const pgc_t *FirstPlayPGC() const;
-	const pgci_ut_t *LanguageUnits(int title) const;
-	const vts_ptt_srpt_t *VtsTitles(int title) const;
-	const pgcit_t *VtsPGCs(int title) const;
+	const pgci_ut_t *LanguageUnits(unsigned int title) const;
+	const vts_ptt_srpt_t *VtsTitles(unsigned int title) const;
+	const pgcit_t *VtsPGCs(unsigned int title) const;
 	const int16_t NumberOfTitles() const;
 
 private:

Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp	2004-10-17 10:39:43 UTC (rev 887)
+++ trunk/DvdMenuXtractor/VobParser.cpp	2004-10-17 13:48:22 UTC (rev 888)
@@ -86,7 +86,9 @@
 	wxString FileName;
 	uint64_t fileSize = 0;
 
-	// handle all parts of this title (VIDEO_TS.vob or VTS_XX_YY.vob)
+	m_files.Clear();
+
+	// handle all parts of this title (VIDEO_TS.vob or VTS_XX_Y.vob)
 	if (title == 0)
 	{
 		FileName = wxString::Format("%sVIDEO_TS.VOB",dirname);
@@ -103,7 +105,7 @@
 	{
 		int i=0;
 		do {
-			FileName = wxString::Format("%sVTS_%02d_%02d.VOB",dirname,title,i++);
+			FileName = wxString::Format("%sVTS_%02d_%d.VOB",dirname,title,i++);
 			_file = fopen(FileName.c_str(),"rb");
 			if (_file != NULL)
 			{
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.