[matroska] r1023 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2005-01-09 18:15:21 +0300 (Sun, 09 Jan 2005)
New Revision: 1023

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
   trunk/DvdMenuXtractor/README.txt
Log:
DMX: make sure the directories exist before proceeding

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2005-01-09 09:50:26 UTC (rev 1022)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2005-01-09 15:15:21 UTC (rev 1023)
@@ -71,7 +71,7 @@
 wxString outputDirectory;
 wxString mtxDirectory;
 const wxString APPLICATION_NAME = "DVDMenuXtractor: DMX - a fair-use tool";
-const wxString APPLICATION_VERSION = "0.8.1";
+const wxString APPLICATION_VERSION = "0.8.2";
 
 // ----------------------------------------------------------------------------
 
@@ -261,9 +261,26 @@
 
         SaveSettings();
 
-        return OpenIfoFile();
+        return (OpenIfoFile() && OutputExists());
     }
 
+	bool OutputExists()
+	{
+		wxFileName _DirName(m_edOutDir->GetValue());
+		if (!_DirName.DirExists())
+		{
+			wxLogError("Cannot use output directory '%s'", _DirName.GetPath(wxPATH_GET_VOLUME));
+			return false;
+		}
+		else
+		{
+			outputDirectory = wxConfigBase::Get()->Read(OutputDirSaved,"");
+			mtxDirectory = wxConfigBase::Get()->Read(MtxDirSaved,"");
+
+			return true;
+		}
+	}
+
     bool OpenIfoFile()
     {
         if(IfoFile != NULL)
@@ -279,6 +296,7 @@
         catch(IFOException&)
         {
             // TODO : More verbose
+			wxLogError("Cannot use input directory");
             return FALSE;
         }
         return TRUE;
@@ -1360,9 +1378,6 @@
 
 		m_txtDemuxLog->AppendText("Creating output directories\n");
 
-		outputDirectory = wxConfigBase::Get()->Read(OutputDirSaved,"");
-		mtxDirectory = wxConfigBase::Get()->Read(MtxDirSaved,"");
-
 		bool language = true;
 		for (int16_t title = 0; title <= IfoFile->NumberOfTitles(); title++)
 		{

Modified: trunk/DvdMenuXtractor/README.txt
===================================================================
--- trunk/DvdMenuXtractor/README.txt	2005-01-09 09:50:26 UTC (rev 1022)
+++ trunk/DvdMenuXtractor/README.txt	2005-01-09 15:15:21 UTC (rev 1023)
@@ -1,8 +1,5 @@
 TODO :
-* rework the cell<->timecode mapping to allow a cell to be used in different titles
-* support infinite still frames in the chapter XML file
 * make use of the cancel buttons
-* store the palette for subs
 * verify (and fix) the frame and cluster timecodes from mkvmerge
 * generate the d2v file ?
 * allow skipping DVD parts when extracting (VMG, VTSM, VTS)
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.