[matroska] r799 - in trunk/DvdMenuXtractor: . win32

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-09-13 17:51:46 +0400 (Mon, 13 Sep 2004)
New Revision: 799

Added:
   trunk/DvdMenuXtractor/win32/
   trunk/DvdMenuXtractor/win32/inttypes.h
Modified:
   trunk/DvdMenuXtractor/A52Decoder.h
   trunk/DvdMenuXtractor/DvdMenuXtractor.bkl
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
   trunk/DvdMenuXtractor/IFOFile.cpp
   trunk/DvdMenuXtractor/IFOFile.h
   trunk/DvdMenuXtractor/MPEG2Decoder.cpp
   trunk/DvdMenuXtractor/MPEG2Decoder.h
   trunk/DvdMenuXtractor/SUBDecoder.h
   trunk/DvdMenuXtractor/VobParser.h
   trunk/DvdMenuXtractor/makefile.vc
Log:
update the code according to the latest libdvdread (doesn't work for the moment)

Modified: trunk/DvdMenuXtractor/A52Decoder.h
===================================================================
--- trunk/DvdMenuXtractor/A52Decoder.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/A52Decoder.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -15,10 +15,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "inttypes.h"
-#if defined(WIN32)
-#include <windows.h> // for bitmap header
-#endif
+#include <inttypes.h>
 
 extern "C"
 {

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.bkl
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.bkl	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.bkl	2004-09-13 13:51:46 UTC (rev 799)
@@ -26,7 +26,28 @@
 		<if cond="BUILD=='debug'">__WXDEBUG__</if>
 	</set>
 	
-    <exe id="DvdMenuXtractor">
+	<subproject id="liba52">
+		<if cond="PLATFORM_WIN32=='1'">
+			<dir>a52dec/vc++</dir>
+		</if>
+		<if cond="PLATFORM_WIN32=='0'">
+			<dir>a52dec</dir>
+		</if>
+	</subproject>
+	
+	<subproject id="libmpeg2">
+		<if cond="PLATFORM_WIN32=='1'">
+			<dir>mpeg2dec/vc++</dir>
+		</if>
+		<if cond="PLATFORM_WIN32=='0'">
+			<dir>mpeg2dec</dir>
+		</if>
+	</subproject>
+	
+	<exe id="DvdMenuXtractor">
+		<depends>liba52</depends>
+		<depends>libmpeg2</depends>
+	
 		<debug-info>$(DEBUG_FLAG)</debug-info>
 		<debug-runtime-libs>$(DEBUG_FLAG)</debug-runtime-libs>
 		<optimize>$(OPTIMIZE)</optimize>
@@ -36,7 +57,7 @@
 
 		<app-type>gui</app-type>
 		<define>$(WX_FLAGS)</define>
-        <sources>A52Decoder.cpp DvdMenuXtractor.cpp IFOFile.cpp MPEG2Decoder.cpp MyWizard.cpp SUBDecoder.cpp VobParser.cpp base64.cpp spudec/spudec.c dvdread_win32/dvd_reader.c dvdread_win32/ifo_read.c dvdread_win32/iso_lang.c</sources>
+	        <sources>A52Decoder.cpp DvdMenuXtractor.cpp IFOFile.cpp MPEG2Decoder.cpp MyWizard.cpp SUBDecoder.cpp VobParser.cpp base64.cpp iso/iso_lang.c spudec/spudec.c</sources>
 		
 		<if cond="PLATFORM_WIN32=='1'">
 			<!-- Change these paths to your local wxWidget installation -->
@@ -46,7 +67,8 @@
 		
 		<include>mpeg2dec/include</include>
 		<include>a52dec/include</include>
-		<include>./</include>
+		<include>libdvdread</include>
+		<include>win32</include>
 		
 		<if cond="PLATFORM_WIN32=='1'">
 			<sys-lib>wxbase25$(DEBUG_SUFFIX)</sys-lib>
@@ -60,11 +82,13 @@
 			<sys-lib>ole32</sys-lib>
 			<sys-lib>rpcrt4</sys-lib>
 		</if>
+		<sys-lib>libdvdread</sys-lib>
 		<if cond="PLATFORM_WIN32=='1'">
 			<lib-path>F:\tmp\wxWindows-2.5.1\lib\vc_lib</lib-path>
 		</if>
 		<lib-path>a52dec/vc++</lib-path>
 		<lib-path>mpeg2dec/vc++</lib-path>
+		<lib-path>libdvdread/build</lib-path>
 
 	</exe>
 </makefile>

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-09-13 13:51:46 UTC (rev 799)
@@ -27,7 +27,7 @@
 #include "wx/config.h"
 #include "wx/fileconf.h"
 
-#include "inttypes.h"
+#include <inttypes.h>
 #include "MyWizard.h"
 #include "IFOFile.h"
 #include "VOBParser.h"
@@ -72,7 +72,6 @@
 // ----------------------------------------------------------------------------
 
 IFOFile* IfoFile = NULL;
-IFOFile* MovieFile = NULL;
 wxLogWindow* wxLogWin;
 const wxString APPLICATION_NAME = "DVDMenu-X-tractor";
 
@@ -278,12 +277,10 @@
         {
             delete IfoFile;
         }
-		if (MovieFile != NULL)
-			delete MovieFile;
+
         try
         {
             IfoFile = new IFOFile(m_edMenuIFOFilename->GetValue());
-			MovieFile = new IFOFile(m_edMovieIFOFilename->GetValue());
         }
         catch(IFOException&)
         {
@@ -723,8 +720,8 @@
 				FilenameBase = FilenameBase.Format("cell_V%03d_C%02d",
 					cle->vobid, cle->cellid);
 				m_txtDemuxLog->AppendText("Converting " + FilenameBase + ".ac3 to "+FilenameBase+".wav ...\n");
-				WAVWriter->SetFilename(wavDirectory+FilenameBase+".wav");
-				a52decoder->ProcessFile(ac3Directory+FilenameBase+".ac3");
+//				WAVWriter->SetFilename(wavDirectory+FilenameBase+".wav");
+//				a52decoder->ProcessFile(ac3Directory+FilenameBase+".ac3");
 				wxYield();
 			}
 			m_gaDemuxProgress->SetValue(i);
@@ -1023,21 +1020,21 @@
 		XmlFile.AddLine(IndentString(lvl)+"<ChapterTimeEnd>"+wxString::Format("%02d:%02d:%02d.%09d", hour, min, sec, nano)+"</ChapterTimeEnd>");
 	}
 	
-	uint64_t HandleLanguageUnit(int lvl, wxTextFile & XmlFile, uint64_t start_time, const IFOFile & _ifo)
+	uint64_t HandleLanguageUnit(int lvl, wxTextFile & XmlFile, uint64_t start_time, const IFOFile & _ifo, int title)
 	{
 		static unsigned char _PrivateLU[]  = {0x2A, 0x00, 0x00, 0x00};
 
 		uint64_t timecode_startB = start_time, timecode_endB = start_time;
-		for (int i=0 ;i<_ifo.LanguageUnits()->nr_of_lus; i++)
+		for (int i=0 ;i<_ifo.LanguageUnits(title)->nr_of_lus; i++)
 		{
 			XmlFile.AddLine(IndentString(lvl)+"<!-- Language Units -->");
 			XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
 				lvl++;
 				// the Language Unit for a given language
-				const pgci_lu_t &_LU = _ifo.LanguageUnits()->lu[i];
+				const pgci_lu_t &_LU = _ifo.LanguageUnits(title)->lu[i];
 				_PrivateLU[1] = _LU.lang_code >> 8;
 				_PrivateLU[2] = _LU.lang_code & 0xFF;
-				_PrivateLU[3] = _LU.zero_1;
+				_PrivateLU[3] = _LU.lang_extension;
 				XmlFile.AddLine(IndentString(lvl)+"<!-- language: "+char(_LU.lang_code>>8)+char(_LU.lang_code&0xFF)+" -->");
 
 				wxString _myUIDb = CreateUID();
@@ -1130,7 +1127,7 @@
 			timecode_startA = timecode_endA;
 			
 			// Language Units
-			if (IfoFile && IfoFile->FirstPlayPGC() && IfoFile->LanguageUnits() && IfoFile->LanguageUnits()->nr_of_lus)
+			if (IfoFile && IfoFile->FirstPlayPGC() && IfoFile->LanguageUnits(0) && IfoFile->LanguageUnits(0)->nr_of_lus)
 			{
 				XmlFile.AddLine("\n"+IndentString(lvl)+"<!-- Video Manager -->");
 				XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
@@ -1139,7 +1136,7 @@
 					XmlFile.AddLine(IndentString(lvl)+"<ChapterUID>"+_myUIDa+"</ChapterUID>");
 					XmlFile.AddLine(IndentString(lvl)+"<ChapterProcessPrivate>"+encodebase64(_PrivateVM,2)+"</ChapterProcessPrivate>");
 					
-					timecode_endA = HandleLanguageUnit(lvl, XmlFile, timecode_startA, *IfoFile);
+					timecode_endA = HandleLanguageUnit(lvl, XmlFile, timecode_startA, *IfoFile, 0);
 				
 					DisplayTime(lvl, XmlFile, timecode_startA, timecode_endA);
 					lvl--;
@@ -1149,7 +1146,7 @@
 			timecode_startA = timecode_endA;
 			
 			// Write the Video Title Set
-			if (MovieFile)
+//			if (MovieFile)
 			{
 				XmlFile.AddLine("\n"+IndentString(lvl)+"<!-- Video Title Set -->");
 				XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
@@ -1159,16 +1156,16 @@
 					XmlFile.AddLine(IndentString(lvl)+"<ChapterProcessPrivate>"+encodebase64(_PrivateVTS,2)+"</ChapterProcessPrivate>");
 				
 					// VTS Menu
-					if (MovieFile->LanguageUnits() && MovieFile->LanguageUnits()->nr_of_lus)
+					if (IfoFile->LanguageUnits(1) && IfoFile->LanguageUnits(1)->nr_of_lus)
 					{
-						timecode_endA = HandleLanguageUnit(lvl, XmlFile, timecode_startA, *MovieFile);
+						timecode_endA = HandleLanguageUnit(lvl, XmlFile, timecode_startA, *IfoFile, 1);
 					}
 
 					// VTS content
-					if (MovieFile->VtsTitles() && MovieFile->VtsPGCs())
+					if (IfoFile->VtsTitles() && IfoFile->VtsPGCs())
 					{
 						uint64_t timecode_startB = timecode_endA, timecode_endB = timecode_endA;
-						for (int i=0; i<MovieFile->VtsTitles()->nr_of_srpts; i++)
+						for (int i=0; i<IfoFile->VtsTitles()->nr_of_srpts; i++)
 						{
 							XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- Title #%d -->",i));
 							XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
@@ -1182,16 +1179,17 @@
 							
 								// add the PGC that match this PTT
 								uint64_t timecode_startC = timecode_startB, timecode_endC = timecode_startB;
-								for (int j=0; j<MovieFile->VtsPGCs()->nr_of_pgci_srp; j++)
+								for (int j=0; j<IfoFile->VtsPGCs()->nr_of_pgci_srp; j++)
 								{
-									if ((MovieFile->VtsPGCs()->pgci_srp[j].entry_id & 0x7F) == i+1)
+									if ((IfoFile->VtsPGCs()->pgci_srp[j].entry_id & 0x7F) == i+1)
 									{
 										XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
 											lvl++;
 											wxString _myUIDa = CreateUID();
 											XmlFile.AddLine(IndentString(lvl)+"<ChapterUID>"+_myUIDa+"</ChapterUID>");
 										
-											timecode_startC = OutputPGC(lvl, XmlFile, MovieFile->VtsPGCs()->pgci_srp[j].pgc, timecode_startC, j, 0);
+											timecode_startC = OutputPGC(lvl, XmlFile, 
+												IfoFile->VtsPGCs()->pgci_srp[j].pgc, timecode_startC, j, 0);
 										
 											lvl--;
 										XmlFile.AddLine(IndentString(lvl)+"</ChapterAtom>");

Modified: trunk/DvdMenuXtractor/IFOFile.cpp
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.cpp	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/IFOFile.cpp	2004-09-13 13:51:46 UTC (rev 799)
@@ -1,7 +1,7 @@
 // ----------------------------------------------------------------------------
 
 #include "IFOFile.h"
-#include "dvdread_win32/iso_lang.h"
+#include "iso/iso_lang.h"
 #include "wx/hashmap.h"
 
 // ----------------------------------------------------------------------------
@@ -40,11 +40,17 @@
 
 IFOFile::IFOFile(const wxString& filename)
 {	
-	m_ifo = ifoOpen(filename.c_str());
-	if(!m_ifo)
+	m_dvd = DVDOpen(filename.c_str());
+	if(!m_dvd)
 	{
 		throw IFOInvalidFileFormatException();
 	}
+	m_ifo_0 = ifoOpen(m_dvd,0);
+	m_ifo_1 = ifoOpen(m_dvd,1);
+	if (!m_ifo_0 || !m_ifo_1)
+	{
+		throw IFOInvalidFileFormatException();
+	}
 	ClearLanguageSelection();
 }
 
@@ -52,11 +58,19 @@
 
 IFOFile::~IFOFile()
 {
-	if(m_ifo)
+	if(m_ifo_0)
 	{
-		ifoClose(m_ifo);
+		ifoClose(m_ifo_0);
 	}
-	m_cellsList.DeleteContents(TRUE);
+	if (m_ifo_1)
+	{
+		ifoClose(m_ifo_1);
+	}
+	if (m_dvd)
+	{
+		DVDClose(m_dvd);
+	}
+	m_cellsList.DeleteContents(true);
 }
 
 // ----------------------------------------------------------------------------
@@ -65,9 +79,9 @@
 {
 	m_languageList.Clear();
 
-	for(int i=0; i < m_ifo->pgci_ut->nr_of_lus; i++)
+	for(int i=0; i < m_ifo_0->pgci_ut->nr_of_lus; i++)
 	{
-		pgci_lu_t* lu = &m_ifo->pgci_ut->lu[i];
+		pgci_lu_t* lu = &m_ifo_0->pgci_ut->lu[i];
 		m_languageList.Add(DecodeLanguage(lu->lang_code));
 	}
 
@@ -86,38 +100,45 @@
 
 void IFOFile::ClearLanguageSelection()
 {
-	for(int i = 0; i < m_ifo->pgci_ut->nr_of_lus; i++)
+	for(int i = 0; i < m_ifo_0->pgci_ut->nr_of_lus; i++)
 	{
 		m_SelectionTab[i] = 0;
 	}
 }
-
+
 // ----------------------------------------------------------------------------
 
 const pgc_t *IFOFile::FirstPlayPGC() const
-{
-	if (m_ifo)
-		return m_ifo->first_play_pgc;
+{
	if (m_ifo_0)
+		return m_ifo_0->first_play_pgc;
 	else
 		return NULL;
 }
 
 // ----------------------------------------------------------------------------
 
-const pgci_ut_t *IFOFile::LanguageUnits() const
+const pgci_ut_t *IFOFile::LanguageUnits(int title) const
 {
-	if (m_ifo)
-		return m_ifo->pgci_ut;
-	else
-		return NULL;
-}
+	if (title == 0)
+	{
+		if (m_ifo_0)
+			return m_ifo_0->pgci_ut;
+	}
+	else
+	{
+		if (m_ifo_1)
+			return m_ifo_1->pgci_ut;
+	}
+		
+	return NULL;
+}
 
 // ----------------------------------------------------------------------------
 
 const vts_ptt_srpt_t *IFOFile::VtsTitles() const
 {
-	if (m_ifo)
-		return m_ifo->vts_ptt_srpt;
+	if (m_ifo_1)
+		return m_ifo_1->vts_ptt_srpt;
 	else
 		return NULL;
 }
@@ -126,8 +147,8 @@
 
 const pgcit_t *IFOFile::VtsPGCs() const
 {
-	if (m_ifo)
-		return m_ifo->vts_pgcit;
+	if (m_ifo_1)
+		return m_ifo_1->vts_pgcit;
 	else
 		return NULL;
 }
@@ -157,11 +178,11 @@
 	CellsHashType CellsHash;
 	CellListElem* cle;
 
-	for(int i = 0; i < m_ifo->pgci_ut->nr_of_lus; i++)
+	for(int i = 0; i < m_ifo_0->pgci_ut->nr_of_lus; i++)
 	{
 		if(m_SelectionTab[i] == 1)
 		{
-			pgci_lu_t* lu = &m_ifo->pgci_ut->lu[i];
+			pgci_lu_t* lu = &m_ifo_0->pgci_ut->lu[i];
 
 			for(int j=0; j < lu->pgcit->nr_of_pgci_srp; j++)
 			{
@@ -229,4 +250,4 @@
 	return FALSE;
 }
 
-// ----------------------------------------------------------------------------
\ No newline at end of file
+// ----------------------------------------------------------------------------

Modified: trunk/DvdMenuXtractor/IFOFile.h
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/IFOFile.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -5,7 +5,7 @@
 // ----------------------------------------------------------------------------
 
 #include "wx/wx.h"
-#include "dvdread_win32/ifo_read.h"
+#include "dvdread/ifo_read.h"
 
 // ----------------------------------------------------------------------------
 /*
@@ -44,12 +44,14 @@
 	bool IsACandidateCell(const unsigned int vobid, const unsigned int cellid);
 	virtual ~IFOFile();
 	const pgc_t *FirstPlayPGC() const;
-	const pgci_ut_t *LanguageUnits() const;
+	const pgci_ut_t *LanguageUnits(int title) const;
 	const vts_ptt_srpt_t *VtsTitles() const;
 	const pgcit_t *VtsPGCs() const;
 
 private:
-	ifo_handle_t* m_ifo;
+	ifo_handle_t* m_ifo_0;
+	ifo_handle_t* m_ifo_1;
+	dvd_reader_t* m_dvd;
 	wxArrayString m_languageList;
 	CellsListType m_cellsList;
 	char m_SelectionTab[8];

Modified: trunk/DvdMenuXtractor/MPEG2Decoder.cpp
===================================================================
--- trunk/DvdMenuXtractor/MPEG2Decoder.cpp	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/MPEG2Decoder.cpp	2004-09-13 13:51:46 UTC (rev 799)
@@ -1,4 +1,7 @@
 #include "MPEG2Decoder.h"
+#if defined(WIN32)
+#include <windows.h>
+#endif
 
 #pragma comment(lib, "libmpeg2.lib")
 #pragma comment(lib, "libvo.lib")
@@ -73,7 +76,7 @@
 
 MPEG2Decoder::MPEG2Decoder(MPEG2DecOutput* out)
 {
-	m_mpeg2dec = mpeg2_init(0);
+	m_mpeg2dec = mpeg2_init();
 	m_info = mpeg2_info (m_mpeg2dec);
 	SetOutput(out);
 }
@@ -99,7 +102,7 @@
 				break;
 
 			case STATE_SEQUENCE:
-				mpeg2_convert(m_mpeg2dec, convert_bgr24, NULL);
+				mpeg2_convert(m_mpeg2dec, mpeg2convert_bgr24, NULL);
 				break;
 
 			case STATE_SLICE:
@@ -152,7 +155,7 @@
                 break;
 				
             case STATE_SEQUENCE:
-				mpeg2_convert (m_mpeg2dec, convert_bgr24, NULL);
+				mpeg2_convert (m_mpeg2dec, mpeg2convert_bgr24, NULL);
                 break;
 				
             case STATE_SLICE:

Modified: trunk/DvdMenuXtractor/MPEG2Decoder.h
===================================================================
--- trunk/DvdMenuXtractor/MPEG2Decoder.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/MPEG2Decoder.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -15,15 +15,12 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "inttypes.h"
-#if defined(WIN32)
-#include <windows.h> // for bitmap header
-#endif
+#include <inttypes.h>
 
 extern "C"
 {
 	#include <mpeg2.h>
-	#include <convert.h>
+	#include <mpeg2convert.h>
 }
 
 // ----------------------------------------------------------------------------

Modified: trunk/DvdMenuXtractor/SUBDecoder.h
===================================================================
--- trunk/DvdMenuXtractor/SUBDecoder.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/SUBDecoder.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -13,10 +13,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "inttypes.h"
-#if defined(WIN32)
-#include <windows.h> // for bitmap header
-#endif
+#include <inttypes.h>
 #include "spudec/spudec.h"
 
 #define SUB_READBUF_SIZE (65536)

Modified: trunk/DvdMenuXtractor/VobParser.h
===================================================================
--- trunk/DvdMenuXtractor/VobParser.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/VobParser.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
-#include "inttypes.h"
+#include <inttypes.h>
 
 #include "wx/wx.h"
 #include "wx/hashmap.h"

Modified: trunk/DvdMenuXtractor/makefile.vc
===================================================================
--- trunk/DvdMenuXtractor/makefile.vc	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/makefile.vc	2004-09-13 13:51:46 UTC (rev 799)
@@ -39,16 +39,18 @@
 
 ### Variables: ###
 
+MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
+	CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)"
 DVDMENUXTRACTOR_CFLAGS = /MD$(__DEBUG_FLAG_5) /DWIN32 $(__DEBUG_FLAG_2) \
 	/Fdbuild\DvdMenuXtractor.pdb $(____DEBUG_FLAG_4_p) $(__OPTIMIZE_6) \
 	/D_WINDOWS $(__WX_FLAGS_p) /IF:\tmp\wxWindows-2.5.1\include \
 	/IF:\tmp\wxWindows-2.5.1\lib\vc_lib\msw$(DEBUG_SUFFIX) /Impeg2dec\include \
-	/Ia52dec\include /I.\ $(CPPFLAGS) $(CFLAGS)
+	/Ia52dec\include /Ilibdvdread /Iwin32 $(CPPFLAGS) $(CFLAGS)
 DVDMENUXTRACTOR_CXXFLAGS = /MD$(__DEBUG_FLAG_5) /DWIN32 $(__DEBUG_FLAG_2) \
 	/Fdbuild\DvdMenuXtractor.pdb $(____DEBUG_FLAG_4_p) $(__OPTIMIZE_6) \
 	/D_WINDOWS $(__WX_FLAGS_p) /IF:\tmp\wxWindows-2.5.1\include \
 	/IF:\tmp\wxWindows-2.5.1\lib\vc_lib\msw$(DEBUG_SUFFIX) /Impeg2dec\include \
-	/Ia52dec\include /I.\ /GR /GX $(CPPFLAGS) $(CXXFLAGS)
+	/Ia52dec\include /Ilibdvdread /Iwin32 /GR /GX $(CPPFLAGS) $(CXXFLAGS)
 DVDMENUXTRACTOR_OBJECTS =  \
 	build\DvdMenuXtractor_DvdMenuXtractor.res \
 	build\DvdMenuXtractor_A52Decoder.obj \
@@ -59,10 +61,8 @@
 	build\DvdMenuXtractor_SUBDecoder.obj \
 	build\DvdMenuXtractor_VobParser.obj \
 	build\DvdMenuXtractor_base64.obj \
-	build\DvdMenuXtractor_spudec.obj \
-	build\DvdMenuXtractor_dvd_reader.obj \
-	build\DvdMenuXtractor_ifo_read.obj \
-	build\DvdMenuXtractor_iso_lang.obj
+	build\DvdMenuXtractor_iso_lang.obj \
+	build\DvdMenuXtractor_spudec.obj
 
 ### Conditionally set variables: ###
 
@@ -124,13 +124,29 @@
 clean: 
 	-if exist build\*.obj del build\*.obj
 	-if exist build\*.res del build\*.res
+	cd a52dec\vc++
+	$(MAKE) -f makefile.vc $(MAKEARGS) clean
+	cd $(MAKEDIR)
+	cd mpeg2dec\vc++
+	$(MAKE) -f makefile.vc $(MAKEARGS) clean
+	cd $(MAKEDIR)
 	-if exist build\DvdMenuXtractor.exe del build\DvdMenuXtractor.exe
 	-if exist build\DvdMenuXtractor.ilk del build\DvdMenuXtractor.ilk
 	-if exist build\DvdMenuXtractor.pdb del build\DvdMenuXtractor.pdb
 
-build\DvdMenuXtractor.exe: $(DVDMENUXTRACTOR_OBJECTS) build\DvdMenuXtractor_DvdMenuXtractor.res
-	link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_3) /SUBSYSTEM:WINDOWS /LIBPATH:F:\tmp\wxWindows-2.5.1\lib\vc_lib /LIBPATH:a52dec\vc++ /LIBPATH:mpeg2dec\vc++ @<<
-	$(DVDMENUXTRACTOR_OBJECTS)  wxbase25$(DEBUG_SUFFIX).lib wxmsw25$(DEBUG_SUFFIX)_core.lib user32.lib comdlg32.lib comctl32.lib shell32.lib gdi32.lib advapi32.lib ole32.lib rpcrt4.lib
+sub_liba52: 
+	cd a52dec\vc++
+	$(MAKE) -f makefile.vc $(MAKEARGS) all
+	cd $(MAKEDIR)
+
+sub_libmpeg2: 
+	cd mpeg2dec\vc++
+	$(MAKE) -f makefile.vc $(MAKEARGS) all
+	cd $(MAKEDIR)
+
+build\DvdMenuXtractor.exe: $(DVDMENUXTRACTOR_OBJECTS) sub_liba52 sub_libmpeg2 build\DvdMenuXtractor_DvdMenuXtractor.res
+	link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_3) /SUBSYSTEM:WINDOWS /LIBPATH:F:\tmp\wxWindows-2.5.1\lib\vc_lib /LIBPATH:a52dec\vc++ /LIBPATH:mpeg2dec\vc++ /LIBPATH:libdvdread\build @<<
+	$(DVDMENUXTRACTOR_OBJECTS)  wxbase25$(DEBUG_SUFFIX).lib wxmsw25$(DEBUG_SUFFIX)_core.lib user32.lib comdlg32.lib comctl32.lib shell32.lib gdi32.lib advapi32.lib ole32.lib rpcrt4.lib libdvdread.lib
 <<
 
 build\DvdMenuXtractor_DvdMenuXtractor.res: .\DvdMenuXtractor.rc
@@ -160,14 +176,8 @@
 build\DvdMenuXtractor_base64.obj: .\base64.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(DVDMENUXTRACTOR_CXXFLAGS) $**
 
-build\DvdMenuXtractor_spudec.obj: .\spudec\spudec.c
+build\DvdMenuXtractor_iso_lang.obj: .\iso\iso_lang.c
 	$(CC) /c /nologo /TC /Fo$@ $(DVDMENUXTRACTOR_CFLAGS) $**
 
-build\DvdMenuXtractor_dvd_reader.obj: .\dvdread_win32\dvd_reader.c
+build\DvdMenuXtractor_spudec.obj: .\spudec\spudec.c
 	$(CC) /c /nologo /TC /Fo$@ $(DVDMENUXTRACTOR_CFLAGS) $**
-
-build\DvdMenuXtractor_ifo_read.obj: .\dvdread_win32\ifo_read.c
-	$(CC) /c /nologo /TC /Fo$@ $(DVDMENUXTRACTOR_CFLAGS) $**
-
-build\DvdMenuXtractor_iso_lang.obj: .\dvdread_win32\iso_lang.c
-	$(CC) /c /nologo /TC /Fo$@ $(DVDMENUXTRACTOR_CFLAGS) $**

Added: trunk/DvdMenuXtractor/win32/inttypes.h
===================================================================
--- trunk/DvdMenuXtractor/win32/inttypes.h	2004-09-13 13:50:39 UTC (rev 798)
+++ trunk/DvdMenuXtractor/win32/inttypes.h	2004-09-13 13:51:46 UTC (rev 799)
@@ -0,0 +1,20 @@
+#ifndef _LOCAL_INTTYPES_H_
+#define _LOCAL_INTTYPES_H_
+
+
+#if defined(WIN32)
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned __int64 uint64_t;
+
+typedef unsigned int ssize_t;
+typedef __int64 int64_t;
+typedef int int32_t;
+typedef short int16_t;
+#else /* WIN32 */
+#include <inttypes.h>
+#endif /* WIN32 */
+
+#endif /* _LOCAL_INTTYPES_H_ */
+
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.