[matroska] r1272 - in trunk/DvdMenuXtractor: . libdvdread/dvdread libdvdread/win32 vobparser

[email protected] Mon, 5 Feb 2007 13:34:40 +0300 (MSK)
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: smssms
Date: 2007-02-05 13:33:32 +0300 (Mon, 05 Feb 2007)
New Revision: 1272

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.proj
   trunk/DvdMenuXtractor/chaptermanager.cpp
   trunk/DvdMenuXtractor/config.h
   trunk/DvdMenuXtractor/dmx.cpp
   trunk/DvdMenuXtractor/dmxwizard.cpp
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.c
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.h
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.h
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.c
   trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.h
   trunk/DvdMenuXtractor/libdvdread/win32/gtchar.h
   trunk/DvdMenuXtractor/libdvdread/win32/posix.h
   trunk/DvdMenuXtractor/libdvdread/win32/win32.proj
   trunk/DvdMenuXtractor/outputreader.cpp
   trunk/DvdMenuXtractor/outputreader.h
   trunk/DvdMenuXtractor/vobparser/IFOContent.cpp
   trunk/DvdMenuXtractor/vobparser/IFOFile.cpp
   trunk/DvdMenuXtractor/vobparser/VobParser.cpp
   trunk/DvdMenuXtractor/vobparser/VobParser.h
Log:
1. UNICODE support
2. Minor fixes

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/DvdMenuXtractor.proj	2007-01-28 17:12:55 UTC (r=
ev 1271)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.proj	2007-02-05 10:33:32 UTC (r=
ev 1272)
@@ -40,7 +40,7 @@
   LIBS_DEBUG(COMPILER_MSVC && !CONFIG_STATIC) QtCored4.lib
   LIBS_DEBUG(COMPILER_MSVC && !CONFIG_STATIC) QtGuid4.lib
   LIBS_DEBUG(COMPILER_MSVC && !CONFIG_STATIC) QtNetworkd4.lib
-  LIBS_DEBUG(COMPILER_MSVC && !CONFIG_STATIC) QtXml4.lib
+  LIBS_DEBUG(COMPILER_MSVC && !CONFIG_STATIC) QtXmld4.lib
   LIBS(COMPILER_GCC) qtmain
   LIBS(COMPILER_GCC && CONFIG_STATIC) QtNetwork
   LIBS(COMPILER_GCC && CONFIG_STATIC) QtGui

Modified: trunk/DvdMenuXtractor/chaptermanager.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/chaptermanager.cpp	2007-01-28 17:12:55 UTC (rev=
 1271)
+++ trunk/DvdMenuXtractor/chaptermanager.cpp	2007-02-05 10:33:32 UTC (rev=
 1272)
@@ -411,7 +411,7 @@
 		_PrivateLU[2] =3D _LU.lang_code & 0xFF;
 		_PrivateLU[3] =3D _LU.lang_extension;
=20
-		chapterAtomElement.appendChild(document.createComment("Language: " + Q=
String(_LU.lang_code >> 8) + QString(_LU.lang_code & 0xFF)));=09
+		chapterAtomElement.appendChild(document.createComment(QString("Languag=
e: %1%2").arg(QChar(_LU.lang_code >> 8)).arg(QChar(_LU.lang_code & 0xFF))=
));
 		chapterAtomElement.appendChild(CreateDOMElement(document, "ChapterUID"=
, Utilities::CreateUID()));
=20
 		AddCodecPrivateData(document, chapterAtomElement, _PrivateLU, 4);
@@ -423,7 +423,7 @@
 		chapterAtomElement.appendChild(chapterDisplayElement);
=20
 		chapterStringElement =3D document.createElement("ChapterString");
-		chapterStringElement.appendChild(document.createTextNode("Language Uni=
t for " + QString(_LU.lang_code >> 8) + QString(_LU.lang_code & 0xFF) ));
+		chapterStringElement.appendChild(document.createTextNode(QString("Lang=
uage Unit for %1%2").arg(QChar(_LU.lang_code >> 8)).arg(QChar(_LU.lang_co=
de & 0xFF))));
 		chapterDisplayElement.appendChild(chapterStringElement);
=20
 		if (_LU.pgcit)
@@ -558,7 +558,7 @@
 	else
 		next_program_entry_cell_num =3D pgc->program_map[program_number+1];
=20
-	parent.appendChild(document.createComment("Program PGN#" + QString("%1"=
).arg(program_number + 1) + " in this PGC"));
+	parent.appendChild(document.createComment(QString("Program PGN# %1 in t=
his PGC").arg(program_number + 1)));
=20
 	QDomElement chapterAtomElement =3D document.createElement("ChapterAtom"=
);
 	parent.appendChild(chapterAtomElement);
@@ -589,7 +589,7 @@
=20
 			if (ptts->ptt[pppt_nr].pgcn =3D=3D pgc_num+1 && ptts->ptt[pppt_nr].pg=
n =3D=3D program_number+1)
 			{
-				chapterAtomElement.appendChild(document.createComment(QString("Chapt=
er PTT#%1 [%2.%3]").arg(QString::number(pppt_nr+1)).arg(pgc_num+1, 2, 10,=
 QChar('0')).arg(program_number+1, 2, 10, QChar('0'))));
+				chapterAtomElement.appendChild(document.createComment(QString("Chapt=
er PTT#%1 [%2.%3]").arg(pppt_nr+1).arg(pgc_num+1, 2, 10, QChar('0')).arg(=
program_number+1, 2, 10, QChar('0'))));
 			=09
 				chapterAtomElement =3D document.createElement("ChapterAtom");
 				chapterAtomParent.appendChild(chapterAtomElement);
@@ -597,7 +597,7 @@
 				chapterAtomElement.appendChild(document.createComment("Enter your te=
xt here"));
=20
 				QDomElement chapterDisplayElement =3D document.createElement("Chapte=
rDisplay");
-				chapterDisplayElement.appendChild(CreateDOMElement(document, "Chapte=
rString", QString("Your Name Here For Chapter #%1.%2").arg(QString::numbe=
r(title), QString::number(pppt_nr + 1))));
+				chapterDisplayElement.appendChild(CreateDOMElement(document, "Chapte=
rString", QString("Your Name Here For Chapter #%1.%2").arg(title).arg(ppp=
t_nr + 1)));
 				chapterAtomElement.appendChild(chapterDisplayElement);
=20
 				QString _myUID =3D Utilities::CreateUID();

Modified: trunk/DvdMenuXtractor/config.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/config.h	2007-01-28 17:12:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/config.h	2007-02-05 10:33:32 UTC (rev 1272)
@@ -1,5 +1,5 @@
 #define CONFIG_STATIC
-//#define CONFIG_UNICODE not because dvdread is not unicode safe
+#define CONFIG_UNICODE
 //#define CONFIG_MULTITHREAD
 //#define CONFIG_MSVCRT
=20

Modified: trunk/DvdMenuXtractor/dmx.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx.cpp	2007-01-28 17:12:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/dmx.cpp	2007-02-05 10:33:32 UTC (rev 1272)
@@ -229,6 +229,9 @@
 		langSuffix =3D QString("_%1_%2%3").arg(QString::number(_ID), QString(_=
attr->lang_code >> 8), QString(_attr->lang_code & 0xFF));
 	}
=20
+#ifdef UNICODE
+	const wchar_t *name =3D 0; // this is used for QString <=3D> wchar_t* c=
onversion
+#endif
 	QString muxArguments;
 	QString fullPrefix (destinationPath_ + QDir::separator() + filename + l=
angSuffix);
=20
@@ -237,7 +240,12 @@
 	case 0:
 		muxArguments =3D muxArgumentsFormat.arg(filename + langSuffix, lang, f=
ullPrefix, "ac3");
 	=09
-		_muxer =3D new AC3DemuxWriter(fullPrefix.toAscii().constData(), 0x80 +=
 _ID);
+#ifdef UNICODE
+		name =3D reinterpret_cast<const wchar_t*>(fullPrefix.utf16());
+		_muxer =3D new AC3DemuxWriter(name, 0x80 + _ID);
+#else
+		_muxer =3D new AC3DemuxWriter(qPrintable(fullPrefix), 0x80 + _ID);
+#endif
 		if (!demuxer.AddDemuxer(SUBSTREAM_AC3_LOW + _ID, _muxer, muxArguments)=
)
 			delete _muxer;
 		break;
@@ -246,7 +254,12 @@
 	case 3:
 		muxArguments =3D muxArgumentsFormat.arg(filename + langSuffix, lang, f=
ullPrefix, "mpa");
 	=09
-		_muxer =3D new MPADemuxWriter(fullPrefix.toAscii().data(), 0xC0 + _ID)=
;
+#ifdef UNICODE
+		name =3D reinterpret_cast<const wchar_t*>(fullPrefix.utf16());
+		_muxer =3D new MPADemuxWriter(name, 0xC0 + _ID);
+#else
+		_muxer =3D new MPADemuxWriter(qPrintable(fullPrefix), 0xC0 + _ID);
+#endif
 		if (!demuxer.AddDemuxer(AUDIO_STREAM + _ID, _muxer, muxArguments))
 			delete _muxer;
 		break;
@@ -254,16 +267,24 @@
 	case 4:
 		// TODO possibly other LPCM formats ?
 		muxArguments =3D muxArgumentsFormat.arg(filename + langSuffix, lang, f=
ullPrefix, "wav");
-	=09
-		_muxer =3D new LPCMDemuxWriter(fullPrefix.toAscii().data(), 0xA0 + _ID=
, 48000, 16, 2);
+#ifdef UNICODE
+		name =3D reinterpret_cast<const wchar_t*>(fullPrefix.utf16());
+		_muxer =3D new LPCMDemuxWriter(name, 0xA0 + _ID, 48000, 16, 2);
+#else
+		_muxer =3D new LPCMDemuxWriter(qPrintable(fullPrefix), 0xA0 + _ID, 480=
00, 16, 2);
+#endif
 		if (!demuxer.AddDemuxer(SUBSTREAM_PCM_LOW + _ID, _muxer, muxArguments)=
)
 			delete _muxer;
 		break;
=20
 	case 6:
 		muxArguments =3D muxArgumentsFormat.arg(filename + langSuffix, lang, f=
ullPrefix, "dts");
-	=09
-		_muxer =3D new DTSDemuxWriter(fullPrefix.toAscii().data(), 0x88 + _ID)=
;
+#ifdef UNICODE
+		name =3D reinterpret_cast<const wchar_t*>(fullPrefix.utf16());
+		_muxer =3D new DTSDemuxWriter(name, 0x88 + _ID);
+#else
+		_muxer =3D new DTSDemuxWriter(qPrintable(fullPrefix), 0x88 + _ID);
+#endif
 		if (!demuxer.AddDemuxer(SUBSTREAM_DTS_LOW + _ID, _muxer, muxArguments)=
)
 			delete _muxer;
 		break;
@@ -303,7 +324,13 @@
 			langSuffix =3D QString("_%1_%2%3").arg(QString::number(_IDs.at(_IDidx=
)), QString(_attr->lang_code >> 8), QString(_attr->lang_code & 0xFF));	=09
 		}
=20
-		_muxer =3D new SubDemuxWriter(QString(prefix + langSuffix).toAscii().d=
ata(), 0x20 + _IDs.at(_IDidx), _width, _height, _palette, _attr->lang_cod=
e, _attr->lang_extension =3D=3D 9);
+#ifdef UNICODE
+		QString str (prefix + langSuffix);
+		const wchar_t *name =3D reinterpret_cast<const wchar_t*>(str.utf16());
+		_muxer =3D new SubDemuxWriter(name, 0x20 + _IDs.at(_IDidx), _width, _h=
eight, _palette, _attr->lang_code, _attr->lang_extension =3D=3D 9);
+#else
+		_muxer =3D new SubDemuxWriter(qPrintable(QString(prefix + langSuffix))=
, 0x20 + _IDs.at(_IDidx), _width, _height, _palette, _attr->lang_code, _a=
ttr->lang_extension =3D=3D 9);
+#endif
 		if (!demuxer.AddDemuxer(SUBSTREAM_SUB_LOW + _IDs.at(_IDidx), _muxer, s=
ubMuxArgumentsFormat.arg(filename + langSuffix, lang, prefix + langSuffix=
 + ".idx")))
 			delete _muxer;
 	}
@@ -325,6 +352,9 @@
 		QString filename;
 		QString muxCommand;
=20
+#ifdef UNICODE
+		const wchar_t *name =3D 0; // used for QString to wchar_t* conversions
+#endif
 		// init filename
 		if (title =3D=3D 0)
 			filename =3D "VMG";
@@ -356,7 +386,12 @@
=20
 			if ((selectionIndex < 0) || (selection_[selectionIndex].isVideoEnable=
d()))
 			{
-				Writer *_muxer =3D new VideoDemuxWriter(prefix.toAscii().constData()=
, _fps);
+#ifdef UNICODE
+				name =3D reinterpret_cast<const wchar_t*>(prefix.utf16());
+				Writer *_muxer =3D new VideoDemuxWriter(name, _fps);
+#else
+				Writer *_muxer =3D new VideoDemuxWriter(qPrintable(prefix), _fps);
+#endif
 				if (!demuxer.AddDemuxer(VIDEO_STREAM, _muxer, demuxArguments.arg(pre=
fix)))
 					delete _muxer;
 			}
@@ -406,7 +441,12 @@
 				}
=20
 				// create a possible button demuxer too
-				Writer *_muxer =3D new BtnDemuxWriter(prefix.toAscii().data(), _widt=
h, _height);
+#ifdef UNICODE
+				name =3D reinterpret_cast<const wchar_t*>(prefix.utf16());
+				Writer *_muxer =3D new BtnDemuxWriter(name, _width, _height);
+#else
+				Writer *_muxer =3D new BtnDemuxWriter(qPrintable(prefix), _width, _h=
eight);
+#endif
 				if (!demuxer.AddDemuxer(SUBSTREAM_PCI, _muxer, btnMuxArgumentsFormat=
.arg(filename, prefix)))
 					delete _muxer;
 			}
@@ -472,9 +512,9 @@
 	=09
 #if !defined(WIN32)
 		QString shellString ("#!/bin/sh\n\n");
-		muxBatchFile.write(shellString.toAscii());
+		muxBatchFile.write(shellString.toUtf8());
 #endif
-		muxBatchFile.write(muxCommand.toAscii());
+		muxBatchFile.write(muxCommand.toUtf8());
 		muxBatchFile.close();
=20
 		printf("Done demuxing %s\n", qPrintable(filename));

Modified: trunk/DvdMenuXtractor/dmxwizard.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmxwizard.cpp	2007-01-28 17:12:55 UTC (rev 1271=
)
+++ trunk/DvdMenuXtractor/dmxwizard.cpp	2007-02-05 10:33:32 UTC (rev 1272=
)
@@ -67,7 +67,7 @@
 		ui.outputPathEdit->setPalette(palette);
 	=09
 		ui.warningImageLabel->show();
-		ui.warningInfoLabel->setText(tr("Specified path already exists"));
+		ui.warningInfoLabel->setText(tr("Specified path already exists. Conten=
ts will be overwritten"));
 	}
=20
 	// show error info if needed

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.c	2007-01-28 17:12=
:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.c	2007-02-05 10:33=
:32 UTC (rev 1272)
@@ -42,7 +42,7 @@
 #include "dvdread_internal.h"
=20
 /* The function pointers that is the exported interface of this file. */
-dvd_input_t (*dvdinput_open)  (const char *);
+dvd_input_t (*dvdinput_open)  (const TCHAR *);
 int         (*dvdinput_close) (dvd_input_t);
 int         (*dvdinput_seek)  (dvd_input_t, int);
 int         (*dvdinput_title) (dvd_input_t, int);=20
@@ -69,7 +69,7 @@
 #include <dlfcn.h>
 #endif
 typedef struct dvdcss_s *dvdcss_handle;
-static dvdcss_handle (*DVDcss_open)  (const char *);
+static dvdcss_handle (*DVDcss_open)  (const TCHAR *);
 static int           (*DVDcss_close) (dvdcss_handle);
 static int           (*DVDcss_seek)  (dvdcss_handle, int, int);
 static int           (*DVDcss_title) (dvdcss_handle, int);=20
@@ -90,7 +90,7 @@
 /**
  * initialize and open a DVD device or file.
  */
-static dvd_input_t css_open(const char *target)
+static dvd_input_t css_open(const TCHAR *target)
 {
   dvd_input_t dev;
    =20
@@ -173,7 +173,7 @@
 /**
  * initialize and open a DVD device or file.
  */
-static dvd_input_t file_open(const char *target)
+static dvd_input_t file_open(const TCHAR *target)
 {
   dvd_input_t dev;
   char *use_odirect;
@@ -195,7 +195,7 @@
  =20
   /* Open the device */
 #if defined(_CRT_NONSTDC_DEPRECATE)
-  dev->fd =3D _open(target, oflags);
+  dev->fd =3D _topen(target, oflags);
 #else
   dev->fd =3D open(target, oflags);
 #endif
@@ -376,7 +376,7 @@
 #else
 #define U_S
 #endif
-    DVDcss_open =3D (dvdcss_handle (*)(const char*))
+    DVDcss_open =3D (dvdcss_handle (*)(const TCHAR*))
       dlsym(dvdcss_library, U_S "dvdcss_open");
     DVDcss_close =3D (int (*)(dvdcss_handle))
       dlsym(dvdcss_library, U_S "dvdcss_close");

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.h	2007-01-28 17:12=
:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_input.h	2007-02-05 10:33=
:32 UTC (rev 1272)
@@ -33,7 +33,7 @@
 /**
  * Pointers which will be filled either the input methods functions.
  */
-extern dvd_input_t (*dvdinput_open)  (const char *);
+extern dvd_input_t (*dvdinput_open)  (const TCHAR *);
 extern int         (*dvdinput_close) (dvd_input_t);
 extern int         (*dvdinput_seek)  (dvd_input_t, int);
 extern int         (*dvdinput_title) (dvd_input_t, int);=20

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c	2007-01-28 17:1=
2:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c	2007-02-05 10:3=
3:32 UTC (rev 1272)
@@ -23,6 +23,7 @@
=20
 #if defined(WIN32)
 #include "posix.h"
+#include "gtchar.h"
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -74,7 +75,7 @@
   dvd_input_t dev;
=20
   /* Information required for a directory path drive. */
-  char *path_root;
+  TCHAR *path_root;
  =20
   /* Filesystem cache */
   int udfcache_level; /* 0 - turned off, 1 - on */
@@ -209,7 +210,7 @@
 {
   struct timeval all_s, all_e;
   struct timeval t_s, t_e;
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
   uint32_t start, len;
   int title;
        =20
@@ -228,9 +229,9 @@
   for( title =3D 0; title < 100; title++ ) {
     gettimeofday( &t_s, NULL );
     if( title =3D=3D 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+      _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.VOB") );
     } else {
-      sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, 0 );
     }
     start =3D UDFFindFile( dvd, filename, &len );
     if( start !=3D 0 && len !=3D 0 ) {
@@ -254,7 +255,7 @@
     if( title =3D=3D 0 ) continue;
            =20
     gettimeofday( &t_s, NULL );
-    sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
+    _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, 1 );
     start =3D UDFFindFile( dvd, filename, &len );
     if( start =3D=3D 0 || len =3D=3D 0 ) break;
            =20
@@ -294,7 +295,7 @@
  * Checks if the root directory in the udf image file can be found.
  * If not it assumes this isn't a valid udf image and returns NULL
  */
-static dvd_reader_t *DVDOpenImageFile( const char *location, int have_cs=
s )
+static dvd_reader_t *DVDOpenImageFile( const TCHAR *location, int have_c=
ss )
 {
   dvd_reader_t *dvd;
   dvd_input_t dev;
@@ -338,7 +339,7 @@
   dvd->css_title =3D 0;
  =20
   /* sanity check, is it a valid UDF image, can we find the root dir */
-  if(!UDFFindFile(dvd, "/", NULL)) {
+  if(!UDFFindFile(dvd, _T("/"), NULL)) {
     dvdinput_close(dvd->dev);
     if(dvd->udfcache) {
       FreeUDFCache(dvd, dvd->udfcache);
@@ -354,7 +355,7 @@
   return dvd;
 }
=20
-static dvd_reader_t *DVDOpenPath( const char *path_root )
+static dvd_reader_t *DVDOpenPath( const TCHAR *path_root )
 {
   dvd_reader_t *dvd;
=20
@@ -365,11 +366,8 @@
   dvd->verbose =3D get_verbose();
   dvd->isImageFile =3D 0;
   dvd->dev =3D 0;
-#if defined(_CRT_NONSTDC_DEPRECATE)
-  dvd->path_root =3D _strdup( path_root );
-#else
-  dvd->path_root =3D strdup( path_root );
-#endif
+=20
+  dvd->path_root =3D _tcsdup( path_root );=20
   if(!dvd->path_root) {
     free(dvd);
     return 0;
@@ -441,11 +439,11 @@
 #endif
=20
=20
-dvd_reader_t *DVDOpen( const char *path )
+dvd_reader_t *DVDOpen( const TCHAR *path )
 {
-  struct stat fileinfo;
+  struct _stat fileinfo;
   int ret, have_css;
-  char *dev_name =3D NULL;
+  TCHAR *dev_name =3D NULL;
   int internal_errno =3D 0;
   int verbose;
=20
@@ -466,7 +464,7 @@
   //else
 #endif
     {
-      ret =3D stat( path, &fileinfo );
+      ret =3D _tstat( path, &fileinfo );
       if( ret < 0 ) {
         int tmp_errno =3D errno;
         /* If we can't stat the file, give up */
@@ -495,7 +493,7 @@
 #elif defined(SYS_BSD)
     dev_name =3D bsd_block2char( path );
 #elif defined(_CRT_NONSTDC_DEPRECATE)
-	dev_name =3D _strdup( path );
+	dev_name =3D _tcsdup( path );
 #else
     dev_name =3D strdup( path );
 #endif
@@ -505,7 +503,7 @@
     return dvd;
   } else if( S_ISDIR( fileinfo.st_mode ) ) {
     dvd_reader_t *auth_drive =3D 0;
-    char *path_copy;
+    TCHAR *path_copy;
 #if defined(SYS_BSD)
     struct fstab* fe;
 #elif defined(__sun) || defined(__linux__)
@@ -514,7 +512,7 @@
=20
     /* XXX: We should scream real loud here. */
 #if defined(_CRT_NONSTDC_DEPRECATE)
-	if( !(path_copy =3D _strdup( path ) ) ) return 0;
+	if( !(path_copy =3D _tcsdup( path ) ) ) return 0;
 #else
     if( !(path_copy =3D strdup( path ) ) ) return 0;
 #endif
@@ -557,16 +555,16 @@
      * is the mountpoint for a DVD-ROM which we can use instead.
      */
=20
-    if( strlen( path_copy ) > 1 ) {
-      if( path_copy[ strlen( path_copy ) - 1 ] =3D=3D '/' ) {
-        path_copy[ strlen( path_copy ) - 1 ] =3D '\0';
+    if( _tcslen( path_copy ) > 1 ) {
+      if( path_copy[ _tcslen( path_copy ) - 1 ] =3D=3D '/' ) {
+        path_copy[ _tcslen( path_copy ) - 1 ] =3D '\0';
       }
     }
=20
-    if( strlen( path_copy ) >=3D 9 ) {
-      if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),=20
-                       "/video_ts" ) ) {
-        path_copy[ strlen( path_copy ) - 9 ] =3D '\0';
+    if( _tcslen( path_copy ) >=3D 9 ) {
+      if( !_tcsicmp( &(path_copy[ _tcslen( path_copy ) - 9 ]),=20
+                       _T("/video_ts") ) ) {
+        path_copy[ _tcslen( path_copy ) - 9 ] =3D '\0';
         if(path_copy[0] =3D=3D '\0') {
           path_copy[0] =3D '/';
           path_copy[1] =3D '\0';
@@ -706,7 +704,7 @@
 /**
  * Open an unencrypted file on a DVD image file.
  */
-static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename )
+static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, TCHAR *filename )
 {
   uint32_t start, len;
   dvd_file_t *dvd_file;
@@ -732,35 +730,35 @@
  *     or -1 on file not found.
  *     or -2 on path not found.
  */
-static int findDirFile( const char *path, const char *file, char *filena=
me )=20
+static int findDirFile( const TCHAR *path, const TCHAR *file, TCHAR *fil=
ename )=20
 {
-  DIR *dir;
-  struct dirent *ent;
+  _TDIR *dir;
+  struct _tdirent *ent;
=20
-  dir =3D opendir( path );
+  dir =3D _topendir( path );
   if( !dir ) return -2;
=20
-  while( ( ent =3D readdir( dir ) ) !=3D NULL ) {
-    if( !strcasecmp( ent->d_name, file ) ) {
-      sprintf( filename, "%s%s%s", path,
-               ( ( path[ strlen( path ) - 1 ] =3D=3D '/' ) ? "" : "/" ),
+  while( ( ent =3D _treaddir( dir ) ) !=3D NULL ) {
+    if( !_tcsicmp( ent->d_name, file ) ) {
+      _stprintf( filename, _T("%s%s%s"), path,
+               ( ( path[ _tcslen( path ) - 1 ] =3D=3D '/' ) ? _T("") : _=
T("/") ),
                ent->d_name );
-      closedir(dir);
+      _tclosedir(dir);
       return 0;
     }
   }
-  closedir(dir);
+  _tclosedir(dir);
   return -1;
 }
=20
-static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filen=
ame )
+static int findDVDFile( dvd_reader_t *dvd, const TCHAR *file, TCHAR *fil=
ename )
 {
-  char video_path[ PATH_MAX + 1 ];
-  const char *nodirfile;
+  TCHAR video_path[ PATH_MAX + 1 ];
+  const TCHAR *nodirfile;
   int ret;
=20
   /* Strip off the directory for our search */
-  if( !strncasecmp( "/VIDEO_TS/", file, 10 ) ) {
+  if( !_tcsnicmp( _T("/VIDEO_TS/"), file, 10 ) ) {
     nodirfile =3D &(file[ 10 ]);
   } else {
     nodirfile =3D file;
@@ -769,11 +767,11 @@
   ret =3D findDirFile( dvd->path_root, nodirfile, filename );
   if( ret < 0 ) {
     /* Try also with adding the path, just in case. */
-    sprintf( video_path, "%s/VIDEO_TS/", dvd->path_root );
+    _stprintf( video_path, _T("%s/VIDEO_TS/"), dvd->path_root );
     ret =3D findDirFile( video_path, nodirfile, filename );
     if( ret < 0 ) {
       /* Try with the path, but in lower case. */
-      sprintf( video_path, "%s/video_ts/", dvd->path_root );
+      _stprintf( video_path, _T("%s/video_ts/"), dvd->path_root );
       ret =3D findDirFile( video_path, nodirfile, filename );
       if( ret < 0 ) {
         return 0;
@@ -787,11 +785,11 @@
 /**
  * Open an unencrypted file from a DVD directory tree.
  */
-static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename )
+static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, TCHAR *filename )
 {
-  char full_path[ PATH_MAX + 1 ];
+  TCHAR full_path[ PATH_MAX + 1 ];
   dvd_file_t *dvd_file;
-  struct stat fileinfo;
+  struct _stat fileinfo;
   dvd_input_t dev;
=20
   /* Get the full path of the file. */
@@ -809,7 +807,7 @@
   memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) );
   dvd_file->filesize =3D 0;
=20
-  if( stat( full_path, &fileinfo ) < 0 ) {
+  if( _tstat( full_path, &fileinfo ) < 0 ) {
     if(dvd->verbose >=3D 1) {
       fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
     }
@@ -825,14 +823,14 @@
=20
 static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *dvd, int title, int menu=
 )
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
   uint32_t start, len;
   dvd_file_t *dvd_file;
=20
   if( title =3D=3D 0 ) {
-    sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+    _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.VOB") );
   } else {
-    sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 =
);
+    _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, menu ? =
0 : 1 );
   }
   start =3D UDFFindFile( dvd, filename, &len );
   if( start =3D=3D 0 ) return 0;
@@ -852,7 +850,7 @@
     int cur;
=20
     for( cur =3D 2; cur < 10; cur++ ) {
-      sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, cur )=
;
       if( !UDFFindFile( dvd, filename, &len ) ) break;
       dvd_file->filesize +=3D len / DVD_VIDEO_LB_LEN;
     }
@@ -874,9 +872,9 @@
=20
 static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int men=
u )
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
-  char full_path[ PATH_MAX + 1 ];
-  struct stat fileinfo;
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR full_path[ PATH_MAX + 1 ];
+  struct _stat fileinfo;
   dvd_file_t *dvd_file;
   int i;
=20
@@ -894,9 +892,9 @@
     dvd_input_t dev;
=20
     if( title =3D=3D 0 ) {
-      sprintf( filename, "VIDEO_TS.VOB" );
+      _stprintf( filename, _T("VIDEO_TS.VOB") );
     } else {
-      sprintf( filename, "VTS_%02i_0.VOB", title );
+      _stprintf( filename, _T("VTS_%02i_0.VOB"), title );
     }
     if( !findDVDFile( dvd, filename, full_path ) ) {
       free( dvd_file );
@@ -909,7 +907,7 @@
       return 0;
     }
=20
-    if( stat( full_path, &fileinfo ) < 0 ) {
+    if( _tstat( full_path, &fileinfo ) < 0 ) {
       if(dvd->verbose >=3D 1) {
         fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
       }
@@ -924,12 +922,12 @@
   } else {
     for( i =3D 0; i < 9; ++i ) {
=20
-      sprintf( filename, "VTS_%02i_%i.VOB", title, i + 1 );
+      _stprintf( filename, _T("VTS_%02i_%i.VOB"), title, i + 1 );
       if( !findDVDFile( dvd, filename, full_path ) ) {
         break;
       }
=20
-      if( stat( full_path, &fileinfo ) < 0 ) {
+      if( _tstat( full_path, &fileinfo ) < 0 ) {
         if(dvd->verbose >=3D 1) {
           fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
         }
@@ -953,7 +951,7 @@
 dvd_file_t *DVDOpenFile( dvd_reader_t *dvd, int titlenum,=20
                          dvd_read_domain_t domain )
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
+	TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
    =20
   /* Check arguments. */
   if( dvd =3D=3D NULL || titlenum < 0 ) {
@@ -964,16 +962,16 @@
   switch( domain ) {
   case DVD_READ_INFO_FILE:
     if( titlenum =3D=3D 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
+      _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.IFO") );
     } else {
-      sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02i_0.IFO"), titlenum );
     }
     break;
   case DVD_READ_INFO_BACKUP_FILE:
     if( titlenum =3D=3D 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
+      _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.BUP") );
     } else {
-      sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02i_0.BUP"), titlenum );
     }
     break;
   case DVD_READ_MENU_VOBS:
@@ -1029,7 +1027,7 @@
 static int DVDFileStatVOBUDF(dvd_reader_t *dvd, int title,=20
                              int menu, dvd_stat_t *statbuf)
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
   uint32_t size;
   off_t tot_size;
   off_t parts_size[9];
@@ -1037,9 +1035,9 @@
   int n;
 =20
   if( title =3D=3D 0 ) {
-    sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+    _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.VOB") );
   } else {
-    sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 =
);
+    _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, menu ? =
0 : 1 );
   }
   if(!UDFFindFile( dvd, filename, &size )) {
     return -1;
@@ -1052,7 +1050,7 @@
     int cur;
=20
     for( cur =3D 2; cur < 10; cur++ ) {
-      sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02d_%d.VOB"), title, cur )=
;
       if( !UDFFindFile( dvd, filename, &size ) ) {
         break;
       }
@@ -1074,9 +1072,9 @@
 static int DVDFileStatVOBPath( dvd_reader_t *dvd, int title,
                                        int menu, dvd_stat_t *statbuf )
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
-  char full_path[ PATH_MAX + 1 ];
-  struct stat fileinfo;
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR full_path[ PATH_MAX + 1 ];
+  struct _stat fileinfo;
   off_t tot_size;
   off_t parts_size[9];
   int nr_parts =3D 0;
@@ -1085,15 +1083,15 @@
 =20
    =20
   if( title =3D=3D 0 ) {
-    sprintf( filename, "VIDEO_TS.VOB" );
+    _stprintf( filename, _T("VIDEO_TS.VOB") );
   } else {
-    sprintf( filename, "VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
+    _stprintf( filename, _T("VTS_%02d_%d.VOB"), title, menu ? 0 : 1 );
   }
   if( !findDVDFile( dvd, filename, full_path ) ) {
     return -1;
   }
  =20
-  if( stat( full_path, &fileinfo ) < 0 ) {
+  if( _tstat( full_path, &fileinfo ) < 0 ) {
     if(dvd->verbose >=3D 1) {
       fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
     }
@@ -1110,12 +1108,12 @@
    =20
     for( cur =3D 2; cur < 10; cur++ ) {
=20
-      sprintf( filename, "VTS_%02d_%d.VOB", title, cur );
+      _stprintf( filename, _T("VTS_%02d_%d.VOB"), title, cur );
       if( !findDVDFile( dvd, filename, full_path ) ) {
         break;
       }
=20
-      if( stat( full_path, &fileinfo ) < 0 ) {
+      if( _tstat( full_path, &fileinfo ) < 0 ) {
         if(dvd->verbose >=3D 1) {
           fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
         }
@@ -1140,9 +1138,9 @@
 int DVDFileStat(dvd_reader_t *dvd, int titlenum,=20
                 dvd_read_domain_t domain, dvd_stat_t *statbuf)
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
-  char full_path[ PATH_MAX + 1 ];
-  struct stat fileinfo;
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR full_path[ PATH_MAX + 1 ];
+  struct _stat fileinfo;
   uint32_t size;
=20
   /* Check arguments. */
@@ -1154,16 +1152,16 @@
   switch( domain ) {
   case DVD_READ_INFO_FILE:
     if( titlenum =3D=3D 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
+      _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.IFO") );
     } else {
-      sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02i_0.IFO"), titlenum );
     }
     break;
   case DVD_READ_INFO_BACKUP_FILE:
     if( titlenum =3D=3D 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
+      _stprintf( filename, _T("/VIDEO_TS/VIDEO_TS.BUP") );
     } else {
-      sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
+      _stprintf( filename, _T("/VIDEO_TS/VTS_%02i_0.BUP"), titlenum );
     }
     break;
   case DVD_READ_MENU_VOBS:
@@ -1200,7 +1198,7 @@
     }
   } else {
     if( findDVDFile( dvd, filename, full_path ) )  {
-      if( stat( full_path, &fileinfo ) < 0 ) {
+      if( _tstat( full_path, &fileinfo ) < 0 ) {
         if(dvd->verbose >=3D 1) {
           fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
         }
@@ -1602,7 +1600,7 @@
=20
=20
 int DVDUDFVolumeInfo( dvd_reader_t *dvd,
-                      char *volid, unsigned int volid_size,
+                      TCHAR *volid, unsigned int volid_size,
                       unsigned char *volsetid, unsigned int volsetid_siz=
e )
 {
   int ret;

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.h	2007-01-28 17:1=
2:55 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.h	2007-02-05 10:3=
3:32 UTC (rev 1272)
@@ -25,6 +25,7 @@
 #include <inttypes.h>	// include local inttypes for WIN32
 #include <sys/types.h>
 #ifdef _WIN32
+#include "gtchar.h"
 typedef SSIZE_T ssize_t;
 #endif
=20
@@ -97,7 +98,7 @@
  * The current working directory is global to all threads,
  * so using chdir/getcwd in another thread could give unexpected results=
.
  */
-dvd_reader_t *DVDOpen( const char * );
+dvd_reader_t *DVDOpen( const TCHAR * );
=20
 /**
  * Closes and cleans up the DVD reader object.
@@ -301,7 +302,7 @@
  * @param volsetid_size At most volsetid_size bytes will be copied to vo=
lsetid.
  * @return 0 on success, -1 on error.
  */
-int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
+int DVDUDFVolumeInfo( dvd_reader_t *, TCHAR *, unsigned int,
                       unsigned char *, unsigned int );
=20
 /**

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.c	2007-01-28 17:12:5=
5 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.c	2007-02-05 10:33:3=
2 UTC (rev 1272)
@@ -237,10 +237,10 @@
=20
 struct Partition {
   int valid;
-  char VolumeDesc[128];
+  TCHAR VolumeDesc[128];
   uint16_t Flags;
   uint16_t Number;
-  char Contents[32];
+  TCHAR Contents[32];
   uint32_t AccessType;
   uint32_t Start;
   uint32_t Length;
@@ -498,7 +498,7 @@
 /* This is wrong with regard to endianess */
 #define GETN(p, n, target) memcpy(target, &data[p], n)
=20
-static int Unicodedecode( uint8_t *data, int len, char *target )=20
+static int Unicodedecode( uint8_t *data, int len, TCHAR *target )=20
 {
   int p =3D 1, i =3D 0;
=20
@@ -569,7 +569,7 @@
=20
=20
 static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Numbe=
r,
-                         char *Contents, uint32_t *Start, uint32_t *Leng=
th )
+                         TCHAR *Contents, uint32_t *Start, uint32_t *Len=
gth )
 {
   *Flags =3D GETN2(20);
   *Number =3D GETN2(22);
@@ -583,7 +583,7 @@
  * Reads the volume descriptor and checks the parameters.  Returns 0 on =
OK, 1
  * on error.
  */
-static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor )
+static int UDFLogVolume( uint8_t *data, TCHAR *VolumeDescriptor )
 {
   uint32_t lbsize, MT_L, N_PM;
   Unicodedecode(&data[84], 128, VolumeDescriptor);
@@ -633,7 +633,7 @@
 }
=20
 static int UDFFileIdentifier( uint8_t *data, uint8_t *FileCharacteristic=
s,
-                              char *FileName, struct AD *FileICB )
+                              TCHAR *FileName, struct AD *FileICB )
 {
   uint8_t L_FI;
   uint16_t L_IU;
@@ -703,11 +703,11 @@
  * FileICB: Location of ICB of the found file
  * return 1 on success, 0 on error;
  */
-static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileNa=
me,
+static int UDFScanDir( dvd_reader_t *device, struct AD Dir, TCHAR *FileN=
ame,
                        struct Partition *partition, struct AD *FileICB,
                        int cache_file_info)=20
 {
-  char filename[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR filename[ MAX_UDF_FILE_NAME_LEN ];
   uint8_t *directory;
   uint32_t lbnum;
   uint16_t TagID;
@@ -754,7 +754,7 @@
           uint8_t tmpFiletype;
           struct AD tmpFile;
            =20
-          if( !strcasecmp( FileName, filename ) ) {
+          if( !_tcsicmp( FileName, filename ) ) {
             *FileICB =3D tmpICB;
             found =3D 1;
              =20
@@ -762,7 +762,7 @@
           UDFMapICB(device, tmpICB, &tmpFiletype,
                     partition, &tmpFile);
         } else {
-          if( !strcasecmp( FileName, filename ) ) {
+          if( !_tcsicmp( FileName, filename ) ) {
             *FileICB =3D tmpICB;
             return 1;
           }
@@ -804,7 +804,7 @@
     if( TagID =3D=3D 257 ) {
       p +=3D UDFFileIdentifier( &directory[ p ], &filechar,
                               filename, FileICB );
-      if( !strcasecmp( FileName, filename ) ) {
+      if( !_tcsicmp( FileName, filename ) ) {
         dvdalign_lbfree(device, directory);
         return 1;
       }
@@ -967,7 +967,7 @@
   return part->valid;
 }
=20
-uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
+uint32_t UDFFindFile( dvd_reader_t *device, TCHAR *filename,
                       uint32_t *filesize )
 {
   uint8_t *LogBlock;
@@ -975,15 +975,15 @@
   uint16_t TagID;
   struct Partition partition;
   struct AD RootICB, File, ICB;
-  char tokenline[ MAX_UDF_FILE_NAME_LEN ];
-  char *token;
+  TCHAR tokenline[ MAX_UDF_FILE_NAME_LEN ];
+  TCHAR *token;
   uint8_t filetype;
  =20
   if(filesize) {
     *filesize =3D 0;
   }
   tokenline[0] =3D '\0';
-  strcat( tokenline, filename );
+  _tcscat( tokenline, filename );
=20
    =20
   if(!(GetUDFCache(device, PartitionCache, 0, &partition) &&
@@ -1036,7 +1036,7 @@
   {
     int cache_file_info =3D 0;
     /* Tokenize filepath */
-    token =3D strtok(tokenline, "/");
+    token =3D _tcstok(tokenline, _T("/"));
    =20
     while( token !=3D NULL ) {
      =20
@@ -1047,10 +1047,10 @@
       if( !UDFMapICB( device, ICB, &filetype, &partition, &File ) ) {
         return 0;
       }
-      if(!strcmp(token, "VIDEO_TS")) {
+      if(!_tcscmp(token, _T("VIDEO_TS"))) {
         cache_file_info =3D 1;
       }
-      token =3D strtok( NULL, "/" );
+      token =3D _tcstok( NULL, _T("/") );
     }
   }=20
=20
@@ -1168,7 +1168,7 @@
  * volid_size, size of the buffer volid points to
  * returns the size of buffer needed for all data
  */
-int UDFGetVolumeIdentifier(dvd_reader_t *device, char *volid,
+int UDFGetVolumeIdentifier(dvd_reader_t *device, TCHAR *volid,
                            unsigned int volid_size)
 {
   struct pvd_t pvd;

Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.h	2007-01-28 17:12:5=
5 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_udf.h	2007-02-05 10:33:3=
2 UTC (rev 1272)
@@ -53,11 +53,11 @@
  * This implementation relies on that the file size is less than 2^32
  * A DVD file can at most be 2^30 (-2048 ?).
  */
-uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t *si=
ze );
+uint32_t UDFFindFile( dvd_reader_t *device, TCHAR *filename, uint32_t *s=
ize );
  =20
 void FreeUDFCache(dvd_reader_t *device, void *cache);
 int UDFGetVolumeIdentifier(dvd_reader_t *device,
-                           char *volid, unsigned int volid_size);
+                           TCHAR *volid, unsigned int volid_size);
 int UDFGetVolumeSetIdentifier(dvd_reader_t *device,
                               uint8_t *volsetid, unsigned int volsetid_s=
ize);
 #ifdef __cplusplus

Modified: trunk/DvdMenuXtractor/libdvdread/win32/gtchar.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/win32/gtchar.h	2007-01-28 17:12:55 U=
TC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/win32/gtchar.h	2007-02-05 10:33:32 U=
TC (rev 1272)
@@ -80,6 +80,7 @@
 /*
  * Unicode functions
  */
+#define _tstat		_wstat
 #define	_tprintf	wprintf
 #define	_ftprintf	fwprintf
 #define	_stprintf	swprintf
@@ -249,7 +250,7 @@
 /*
  * Non-unicode (standard) functions
  */
-
+#define _tstat		_stat
 #define	_tprintf	printf
 #define _ftprintf	fprintf
 #define	_stprintf	sprintf

Modified: trunk/DvdMenuXtractor/libdvdread/win32/posix.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/win32/posix.h	2007-01-28 17:12:55 UT=
C (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/win32/posix.h	2007-02-05 10:33:32 UT=
C (rev 1272)
@@ -27,8 +27,6 @@
 #endif
=20
 #include <stdlib.h>
-#define strcasecmp(x,y)     stricmp(x,y)
-#define strncasecmp(x,y,z)  strnicmp(x,y,z)
=20
 #define PATH_MAX _MAX_PATH
=20

Modified: trunk/DvdMenuXtractor/libdvdread/win32/win32.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/libdvdread/win32/win32.proj	2007-01-28 17:12:55=
 UTC (rev 1271)
+++ trunk/DvdMenuXtractor/libdvdread/win32/win32.proj	2007-02-05 10:33:32=
 UTC (rev 1272)
@@ -3,6 +3,7 @@
 GROUP posixmsvc
 {
   SOURCE dirent.c
+  DEFINE _CRT_NON_CONFORMING_SWPRINTFS
=20
   HEADER dirent.h
   HEADER gtchar.h

Modified: trunk/DvdMenuXtractor/outputreader.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/outputreader.cpp	2007-01-28 17:12:55 UTC (rev 1=
271)
+++ trunk/DvdMenuXtractor/outputreader.cpp	2007-02-05 10:33:32 UTC (rev 1=
272)
@@ -3,7 +3,6 @@
 #include <fcntl.h>
 #include <fstream>
 #include <QWidget>
-#include <QTextStream>
 #include <QTimerEvent>
 #include "outputreader.h"
=20

Modified: trunk/DvdMenuXtractor/outputreader.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/outputreader.h	2007-01-28 17:12:55 UTC (rev 127=
1)
+++ trunk/DvdMenuXtractor/outputreader.h	2007-02-05 10:33:32 UTC (rev 127=
2)
@@ -4,6 +4,7 @@
 #ifndef OUTPUTREADER_H
 #define OUTPUTREADER_H
=20
+#include <stdio.h>
 #include <QObject>
 #include <QBasicTimer>
=20

Modified: trunk/DvdMenuXtractor/vobparser/IFOContent.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/vobparser/IFOContent.cpp	2007-01-28 17:12:55 UT=
C (rev 1271)
+++ trunk/DvdMenuXtractor/vobparser/IFOContent.cpp	2007-02-05 10:33:32 UT=
C (rev 1272)
@@ -169,9 +169,9 @@
 						if (cle->isStill)
 						{
 							if (srp.pgc->cell_playback[k].still_time =3D=3D 0xFF) {
-							  qWarning(QString("Still cell (%1.%2) detected with infinite dur=
ation !").arg(QString::number(vob_id), QString::number(cell_id)).toAscii(=
));
+							  qWarning(qPrintable(QString("Still cell (%1.%2) detected with i=
nfinite duration !").arg(vob_id).arg(cell_id)));
 							} else {
-							  qWarning(QString("Still cell (%1.%2) detected. Assuming there i=
s just one frame.").arg(QString::number(vob_id), QString::number(cell_id)=
).toAscii());
+							  qWarning(qPrintable(QString("Still cell (%1.%2) detected. Assum=
ing there is just one frame.").arg(vob_id).arg(cell_id)));
 								cle->nb_frames =3D 1; // maybe not true ?
 								cle->frame_dur =3D srp.pgc->cell_playback[k].still_time * 1000.0=
 / cle->nb_frames;
 							}

Modified: trunk/DvdMenuXtractor/vobparser/IFOFile.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/vobparser/IFOFile.cpp	2007-01-28 17:12:55 UTC (=
rev 1271)
+++ trunk/DvdMenuXtractor/vobparser/IFOFile.cpp	2007-02-05 10:33:32 UTC (=
rev 1272)
@@ -5,7 +5,12 @@
 // ---------------------------------------------------------------------=
-------
 IFOFile::IFOFile(const QString& filename)
 {=09
+#ifdef UNICODE
+	const wchar_t *name =3D reinterpret_cast<const wchar_t*>(filename.utf16=
());
+	m_dvd =3D DVDOpen(name);
+#else
 	m_dvd =3D DVDOpen(qPrintable(filename));
+#endif
 =09
 	if(!m_dvd) {
 		throw IFOInvalidFileFormatException();
@@ -29,7 +34,7 @@
 				m_ifos.append(new IFOContent(m_dvd,i));
 			}
 			catch (...)	{
-			  qCritical(QString("Cannot open VTS_%1_X.IFO").arg(i).toAscii());
+			  qCritical(qPrintable(QString("Cannot open VTS_%1_X.IFO").arg(i)));
 			}
 		}
 	}

Modified: trunk/DvdMenuXtractor/vobparser/VobParser.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/vobparser/VobParser.cpp	2007-01-28 17:12:55 UTC=
 (rev 1271)
+++ trunk/DvdMenuXtractor/vobparser/VobParser.cpp	2007-02-05 10:33:32 UTC=
 (rev 1272)
@@ -98,7 +98,12 @@
 	QFileInfo _tmpDirName(dirname);
=20
 	// handle all parts of this title (VIDEO_TS.vob or VTS_XX_Y.vob)
+#ifdef UNICODE
+	const wchar_t *name =3D reinterpret_cast<const wchar_t*>(_tmpDirName.ca=
nonicalFilePath().utf16());
+	m_dvdhandle =3D DVDOpen(name);
+#else
 	m_dvdhandle =3D DVDOpen(qPrintable(_tmpDirName.canonicalPath()));
+#endif
=20
 	if (m_dvdhandle)
 	{
@@ -772,9 +777,14 @@
=20
 	if (!m_TimecodeFile)
 	{
-		QString m_filename =3D m_Filename;
+		QString m_filename (m_Filename);
 		m_filename +=3D ".idx";
+#ifdef UNICODE
+		const wchar_t* name =3D reinterpret_cast<const wchar_t*>(m_filename.ut=
f16());
+		m_TimecodeFile =3D _tfopen(name, _T("w"));
+#else
 		m_TimecodeFile =3D fopen(qPrintable(m_filename),"w");
+#endif
 		fwrite("# VobSub index file, v7 (do not modify this line!)\n#\n", 1, 5=
3, m_TimecodeFile);
 		fwrite("# Settings\n\n# Original frame size\nsize: ", 1, 40, m_Timecod=
eFile);
 		fprintf(m_TimecodeFile, "%dx%d\n\n", m_width, m_height);

Modified: trunk/DvdMenuXtractor/vobparser/VobParser.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/vobparser/VobParser.h	2007-01-28 17:12:55 UTC (=
rev 1271)
+++ trunk/DvdMenuXtractor/vobparser/VobParser.h	2007-02-05 10:33:32 UTC (=
rev 1272)
@@ -204,13 +204,18 @@
 class Writer : public Demuxer
 {
 public:
-	Writer(const char* filenamePrefix, const char* extension, double fps)
+	Writer(const TCHAR* filenamePrefix, const TCHAR* extension, double fps)
 		:m_file(NULL)
 		,m_TimecodeFile(NULL)
 		,m_fps(fps)
 	{
+#ifdef UNICODE
+		m_Filename =3D QString::fromUtf16(reinterpret_cast<const ushort*>(file=
namePrefix));
+		m_fileExtension =3D QString::fromUtf16(reinterpret_cast<const ushort*>=
(extension));
+#else
 		m_Filename =3D filenamePrefix;
 		m_fileExtension =3D extension;
+#endif
 	}
=20
 	virtual ~Writer()
@@ -239,11 +244,13 @@
 	{
 		if (!m_TimecodeFile)
 		{
-			QString m_filename =3D m_Filename;
-			m_filename +=3D "_";
-			m_filename +=3D m_fileExtension;
-			m_filename +=3D ".tmc";
-			m_TimecodeFile =3D fopen(m_filename.toAscii().data(),"w");
+			QString m_filename =3D QString("%1_%2.tmc").arg(m_Filename).arg(m_fil=
eExtension);
+#ifdef UNICODE
+			const wchar_t *name =3D reinterpret_cast<const wchar_t*>(m_filename.u=
tf16());
+			m_TimecodeFile =3D _tfopen(name, _T("w"));
+#else
+			m_TimecodeFile =3D fopen(qPrintable(m_filename),"w");
+#endif
 			fwrite("# timecode format v3\n", 1, 21, m_TimecodeFile);
 			fprintf(m_TimecodeFile, "assume %lf\n", m_fps);
 		}
@@ -254,10 +261,13 @@
 	{
 		if(!m_file)
 		{
-			QString m_filename =3D m_Filename;
-			m_filename +=3D ".";
-			m_filename +=3D  m_fileExtension;
-			m_file =3D fopen(m_filename.toAscii().data(),"wb");
+			QString m_filename =3D QString("%1.%2").arg(m_Filename).arg(m_fileExt=
ension);
+#ifdef UNICODE
+			const wchar_t *name =3D reinterpret_cast<const wchar_t*>(m_filename.u=
tf16());
+			m_file =3D _tfopen(name, _T("wb"));
+#else
+			m_file =3D fopen(qPrintable(m_filename),"wb");
+#endif
 		}
 		return m_file;
 	}
@@ -276,8 +286,8 @@
 class VideoDemuxWriter : public Writer
 {
 public:
-	VideoDemuxWriter(const char* filenamePrefix, double fps)
-		:Writer(filenamePrefix,"m2v", fps)=20
+	VideoDemuxWriter(const TCHAR* filenamePrefix, double fps)
+		:Writer(filenamePrefix, _T("m2v"), fps)=20
 		,m_end_timecode(0)
 		,m_last_start_timecode(0)
 		,m_last_end_timecode(0)
@@ -303,8 +313,8 @@
 class AC3DemuxWriter : public Writer
 {
 public:
-	AC3DemuxWriter(const char* filenamePrefix, const uint8_t streamID)
-		:Writer(filenamePrefix, "ac3", 0.0)
+	AC3DemuxWriter(const TCHAR* filenamePrefix, const uint8_t streamID)
+		:Writer(filenamePrefix, _T("ac3"), 0.0)
 		,m_streamID(streamID)
 		,m_end_timecode(0)
 		,m_last_start_timecode(0)
@@ -331,8 +341,8 @@
 class DTSDemuxWriter : public Writer
 {
 public:
-	DTSDemuxWriter(const char* filenamePrefix, const uint8_t streamID)
-		:Writer(filenamePrefix,"dts",0.0)
+	DTSDemuxWriter(const TCHAR* filenamePrefix, const uint8_t streamID)
+		:Writer(filenamePrefix, _T("dts"),0.0)
 		,m_streamID(streamID)
 		,m_end_timecode(0)
 		,m_last_start_timecode(0)
@@ -359,8 +369,8 @@
 class WavWriter : public Writer
 {
 	public:
-		WavWriter(const char* filenamePrefix, double fps, uint32_t sample_rate=
, uint8_t bit_depth, uint8_t channel_nb)
-			:Writer(filenamePrefix, "wav", fps)
+		WavWriter(const TCHAR* filenamePrefix, double fps, uint32_t sample_rat=
e, uint8_t bit_depth, uint8_t channel_nb)
+			:Writer(filenamePrefix, _T("wav"), fps)
 			,m_sample_rate(sample_rate)
 			,m_bit_depth(bit_depth)
 			,m_channel_nb(channel_nb)
@@ -376,7 +386,7 @@
 class LPCMDemuxWriter : public WavWriter
 {
 public:
-	LPCMDemuxWriter(const char* filenamePrefix, const uint8_t streamID, uin=
t32_t sample_rate, uint8_t bit_depth, uint8_t channel_nb)
+	LPCMDemuxWriter(const TCHAR* filenamePrefix, const uint8_t streamID, ui=
nt32_t sample_rate, uint8_t bit_depth, uint8_t channel_nb)
 		:WavWriter(filenamePrefix,0.0, sample_rate, bit_depth, channel_nb)
 		,m_streamID(streamID)
 		,m_end_timecode(0)
@@ -404,8 +414,8 @@
 class MPADemuxWriter : public Writer
 {
 public:
-	MPADemuxWriter(const char* filenamePrefix, const uint8_t streamID) :
-	  Writer(filenamePrefix,"mpa",0.0), m_streamID(streamID) {}
+	MPADemuxWriter(const TCHAR* filenamePrefix, const uint8_t streamID) :
+	  Writer(filenamePrefix, _T("mpa"),0.0), m_streamID(streamID) {}
 	void ProcessStream(uint8_t* buff, uint32_t size, uint32_t start_time, u=
int32_t end_time, const QString& debug)
 	{
 		Write(buff,size, start_time, end_time, debug);
@@ -422,8 +432,8 @@
 class SubDemuxWriter : public Writer
 {
 public:
-	SubDemuxWriter(const char* filenamePrefix, const uint8_t streamID, uint=
16_t width, uint16_t height, const uint32_t * palette, uint16_t language,=
 bool forced)
-		:Writer(filenamePrefix, "sub",0.0)
+	SubDemuxWriter(const TCHAR* filenamePrefix, const uint8_t streamID, uin=
t16_t width, uint16_t height, const uint32_t * palette, uint16_t language=
, bool forced)
+		:Writer(filenamePrefix, _T("sub"),0.0)
 		,m_width(width)
 		,m_height(height)
 		,m_forced(forced)
@@ -454,8 +464,8 @@
 class BtnDemuxWriter : public Writer
 {
 public:
-	BtnDemuxWriter(const char* filenamePrefix, uint16_t width, uint16_t hei=
ght)
-		:Writer(filenamePrefix, "btn",0.0)
+	BtnDemuxWriter(const TCHAR* filenamePrefix, uint16_t width, uint16_t he=
ight)
+		:Writer(filenamePrefix, _T("btn"),0.0)
 		,m_width(width)
 		,m_height(height)
 		,m_end_timecode(0)