[matroska] r891 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-10-18 17:15:16 +0400 (Mon, 18 Oct 2004)
New Revision: 891

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
   trunk/DvdMenuXtractor/IFOFile.cpp
   trunk/DvdMenuXtractor/IFOFile.h
Log:
handling of each IFO file for each title set to extract the data from the VOB

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-17 15:24:05 UTC (rev 890)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-18 13:15:16 UTC (rev 891)
@@ -358,7 +358,7 @@
         CellListElem* cle;
         CellsListType::Node *node;
         unsigned int i;
-        const CellsListType *CellsList = IfoFile->GetCellsList();
+        const CellsListType *CellsList = IfoFile->GetCellsList(0);
 
         m_lstcMenuCell->DeleteAllItems();
 
@@ -453,7 +453,7 @@
             CellsListType::Node *node;
             unsigned int i;
             unsigned int frameaccu = 0;
-            const CellsListType *CellsList = IfoFile->GetCellsList();
+            const CellsListType *CellsList = IfoFile->GetCellsList(0);
 
             m_lstcMenuCell->DeleteAllItems();
 
@@ -532,7 +532,7 @@
     {
         CompositeDemuxWriter *demuxer = NULL;
         wxString newFilename;
-		const CellsListType *CellsList = IfoFile->GetCellsList();
+		const CellsListType *CellsList = IfoFile->GetCellsList(title);
 
 		aVobParser.Reset();
 		
@@ -582,7 +582,7 @@
 		wxString FilenameBase;
 		CellListElem* cle;
 		CellsListType::Node *node;
-		const CellsListType *CellsList = IfoFile->GetCellsList();
+		const CellsListType *CellsList = IfoFile->GetCellsList(title);
 		int i;			
 		wxFileConfig *pConfig = (wxFileConfig *)wxConfigBase::Get();
 
@@ -616,7 +616,7 @@
 		wxString FilenameBase;
 		CellListElem* cle;
 		CellsListType::Node *node;
-		const CellsListType *CellsList = IfoFile->GetCellsList();
+		const CellsListType *CellsList = IfoFile->GetCellsList(title);
 		int i;			
 		wxFileConfig *pConfig = (wxFileConfig *)wxConfigBase::Get();
 
@@ -651,7 +651,7 @@
 		wxString FilenameBase;
 		CellListElem* cle;
 		CellsListType::Node *node;
-		const CellsListType *CellsList = IfoFile->GetCellsList();
+		const CellsListType *CellsList = IfoFile->GetCellsList(title);
 		int i;			
 		wxFileConfig *pConfig = (wxFileConfig *)wxConfigBase::Get();
 		
@@ -1022,8 +1022,6 @@
 			return;
 		}
 
-		const CellsListType *CellsList = IfoFile->GetCellsList();
-
 		static unsigned char _PrivateFP[]  = {0x30, 0x00, 0x00, 0x00};
 		static unsigned char _PrivateVM[]  = {0x30, 0xC0, 0x00, 0x00};
 		static unsigned char _PrivateVTS[] = {0x30, 0x80, 0x00, 0x00};

Modified: trunk/DvdMenuXtractor/IFOFile.cpp
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.cpp	2004-10-17 15:24:05 UTC (rev 890)
+++ trunk/DvdMenuXtractor/IFOFile.cpp	2004-10-18 13:15:16 UTC (rev 891)
@@ -183,16 +183,21 @@
 
 // ----------------------------------------------------------------------------
 
-const CellsListType* IFOFile::GetCellsList()
+const CellsListType* IFOFile::GetCellsList(unsigned int title)
 {
 	CellsHashType CellsHash;
 	CellListElem* cle;
 
-	for(int i = 0; i < m_ifos.Item(0)->GetData()->pgci_ut->nr_of_lus; i++)
+	if (title >= m_ifos.GetCount())
+		return NULL;
+	
+	ifo_handle_t *_ifo = m_ifos.Item(title)->GetData(); 
+	
+	for(int i = 0; i < _ifo->pgci_ut->nr_of_lus; i++)
 	{
 //		if(m_SelectionTab[i] == 1)
 		{
-			pgci_lu_t* lu = &m_ifos.Item(0)->GetData()->pgci_ut->lu[i];
+			pgci_lu_t* lu = &_ifo->pgci_ut->lu[i];
 
 			for(int j=0; j < lu->pgcit->nr_of_pgci_srp; j++)
 			{

Modified: trunk/DvdMenuXtractor/IFOFile.h
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.h	2004-10-17 15:24:05 UTC (rev 890)
+++ trunk/DvdMenuXtractor/IFOFile.h	2004-10-18 13:15:16 UTC (rev 891)
@@ -42,7 +42,7 @@
 	const wxArrayString& GetLanguageList();
 	void AddLanguageToSelection(const int languageNumber);
 	void ClearLanguageSelection();
-	const CellsListType* GetCellsList();
+	const CellsListType* GetCellsList(unsigned int title);
 	bool IsACandidateCell(const unsigned int vobid, const unsigned int cellid);
 	virtual ~IFOFile();
 	const pgc_t *FirstPlayPGC() const;
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.