[matroska] r899 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-10-19 23:19:18 +0400 (Tue, 19 Oct 2004)
New Revision: 899

Modified:
   trunk/DvdMenuXtractor/VobParser.cpp
   trunk/DvdMenuXtractor/VobParser.h
Log:
fix the directory detection problem

Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp	2004-10-19 13:58:21 UTC (rev 898)
+++ trunk/DvdMenuXtractor/VobParser.cpp	2004-10-19 19:19:18 UTC (rev 899)
@@ -7,6 +7,7 @@
 #include <assert.h>
 
 #include "wx/listimpl.cpp"
+#include <wx/dir.h>
 WX_DEFINE_LIST(ButtonsListType);
 
 // ----------------------------------------------------------------------------
@@ -75,23 +76,22 @@
 
 // ----------------------------------------------------------------------------
 
-VobParser::VobParser(const char* dirname, int16_t title, boolean menu)
+VobParser::VobParser(const char* dirname, int16_t title, bool menu)
 	:m_title(title)
 	,m_demuxer(NULL)
 	,m_dvdhandle(NULL)
 	,m_stream(NULL)
-	,m_readingmenu(menu)
 {
-	dvd_file_t *_file;
-
 	m_pktcount = 0;
 
+	wxDir _tmpDirName(dirname);
+
 	// handle all parts of this title (VIDEO_TS.vob or VTS_XX_Y.vob)
-	m_dvdhandle = DVDOpen(dirname);
+	m_dvdhandle = DVDOpen(_tmpDirName.GetName().c_str());
 
 	if (m_dvdhandle)
 	{
-		if (m_readingmenu)
+		if (menu)
 			m_stream = DVDOpenFile(m_dvdhandle, title, DVD_READ_MENU_VOBS);
 		else
 			m_stream = DVDOpenFile(m_dvdhandle, title, DVD_READ_TITLE_VOBS);
@@ -676,7 +676,6 @@
 	m_index = 0;
 	m_pktindex = 0;
 	DVDFileSeek(m_stream,0);
-	m_readingmenu = true;
 	if (m_demuxer)
 		delete m_demuxer;
 	m_demuxer = NULL;

Modified: trunk/DvdMenuXtractor/VobParser.h
===================================================================
--- trunk/DvdMenuXtractor/VobParser.h	2004-10-19 13:58:21 UTC (rev 898)
+++ trunk/DvdMenuXtractor/VobParser.h	2004-10-19 19:19:18 UTC (rev 899)
@@ -524,7 +524,7 @@
 class VobParser  
 {
 public:
-	VobParser(const char* dirname, int16_t title, boolean menu);
+	VobParser(const char* dirname, int16_t title, bool menu);
 	void Reset();
 	bool ParseNextPacket();
 	uint32_t GetPacketCount() const;
@@ -568,7 +568,6 @@
 private:
 	dvd_reader_t *m_dvdhandle;
 	dvd_file_t *m_stream;
-	boolean m_readingmenu;
 	uint8_t m_buff[DVD_VIDEO_LB_LEN];
 	uint32_t m_index;
 	uint32_t m_pktindex;
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.