Author: robux4
Date: 2004-09-11 17:03:30 +0400 (Sat, 11 Sep 2004)
New Revision: 778
Modified:
trunk/DvdMenuXtractor/A52Decoder.cpp
trunk/DvdMenuXtractor/A52Decoder.h
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/MPEG2Decoder.cpp
trunk/DvdMenuXtractor/MPEG2Decoder.h
trunk/DvdMenuXtractor/MyWizard.cpp
trunk/DvdMenuXtractor/SUBDecoder.h
trunk/DvdMenuXtractor/mpeg2dec/libvo/yuv2rgb.c
trunk/DvdMenuXtractor/spudec/spudec.c
Log:
Allow compilation under unices
Modified: trunk/DvdMenuXtractor/A52Decoder.cpp
===================================================================
--- trunk/DvdMenuXtractor/A52Decoder.cpp 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/A52Decoder.cpp 2004-09-11 13:03:30 UTC (rev 778)
@@ -52,7 +52,7 @@
total_size += size;
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
@@ -70,7 +70,7 @@
store (wav_header + 24, 48000);
store (wav_header + 28, 48000 * 4);
fwrite (wav_header, sizeof (wav_header), 1, WAVFile);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
@@ -231,4 +231,4 @@
fclose(inputFile);
}
-// ----------------------------------------------------------------------------
\ No newline at end of file
+// ----------------------------------------------------------------------------
Modified: trunk/DvdMenuXtractor/A52Decoder.h
===================================================================
--- trunk/DvdMenuXtractor/A52Decoder.h 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/A52Decoder.h 2004-09-11 13:03:30 UTC (rev 778)
@@ -16,7 +16,9 @@
#include <stdio.h>
#include <string.h>
#include "inttypes.h"
+#if defined(WIN32)
#include <windows.h> // for bitmap header
+#endif
extern "C"
{
@@ -31,7 +33,7 @@
public:
virtual bool ProcessSample(const uint32_t size, const uint8_t * buf)
{
- return TRUE;
+ return true;
}
};
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-11 13:03:30 UTC (rev 778)
@@ -1,7 +1,9 @@
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include <time.h>
-#include "wx/wxprec.h"
+#if defined(WIN32)
+#include <wx/wxprec.h>
+#endif
#ifdef __BORLANDC__
#pragma hdrstop
@@ -9,8 +11,8 @@
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
+#if !defined(WX_PRECOMP)
+#include <wx/wx.h>
#endif
#include "wx/wizard.h"
@@ -19,6 +21,7 @@
#include "wx/dialog.h"
#include "wx/statbmp.h"
#include "wx/statline.h"
+#include "wx/stattext.h"
#include "wx/listctrl.h"
#include "wx/filename.h"
#include "wx/config.h"
@@ -1286,7 +1289,11 @@
class DvdMenuXtractorWizard : public wxMyWizard
{
public:
+#if defined(WIN32)
DvdMenuXtractorWizard() : wxMyWizard(NULL, -1, APPLICATION_NAME, wxBITMAP(mainlogo))
+#else
+ DvdMenuXtractorWizard() : wxMyWizard(NULL, -1, APPLICATION_NAME)
+#endif
{
wxMyWizard::ShowCustomButton1();
wxMyWizard::SetCustomButton1Text("Show &logs");
@@ -1335,7 +1342,9 @@
wizard = new DvdMenuXtractorWizard();
+#if defined(WIN32)
wizard->SetIcon( wxICON(mainicon) );
+#endif
// Look at wxLogDialog also ?
wxFrame* logFrame = new wxFrame(wizard,-1,"Log window");
@@ -1345,7 +1354,9 @@
wxLogWin->GetFrame()->SetSize(wizardSize.GetWidth()+100,
wizardSize.GetHeight()-100);
wxLogWin->GetFrame()->CentreOnScreen();
+#if defined(WIN32)
wxLogWin->GetFrame()->SetIcon( wxICON(mainicon) );
+#endif
wxMyWizardPage1 *page1 = new wxMyWizardPage1(wizard->GetMainPanel());
wxMyWizardPage2 *page2 = new wxMyWizardPage2(wizard->GetMainPanel());
Modified: trunk/DvdMenuXtractor/MPEG2Decoder.cpp
===================================================================
--- trunk/DvdMenuXtractor/MPEG2Decoder.cpp 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/MPEG2Decoder.cpp 2004-09-11 13:03:30 UTC (rev 778)
@@ -17,6 +17,7 @@
{
FILE * BMPFile;
uint32_t allHeaderSize, dataSize, lineSize;
+#if defined(WIN32)
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
@@ -24,7 +25,7 @@
BMPFile = fopen (m_filename, "wb");
if(BMPFile == NULL)
{
- return FALSE;
+ return false;
}
allHeaderSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
@@ -57,7 +58,8 @@
}
fclose(BMPFile);
- return TRUE;
+#endif
+ return true;
}
void BitmapMPEG2DecWriter::SetFilename(const char* filename)
@@ -177,4 +179,4 @@
fclose(inputFile);
}
-// ----------------------------------------------------------------------------
\ No newline at end of file
+// ----------------------------------------------------------------------------
Modified: trunk/DvdMenuXtractor/MPEG2Decoder.h
===================================================================
--- trunk/DvdMenuXtractor/MPEG2Decoder.h 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/MPEG2Decoder.h 2004-09-11 13:03:30 UTC (rev 778)
@@ -16,7 +16,9 @@
#include <stdio.h>
#include <string.h>
#include "inttypes.h"
+#if defined(WIN32)
#include <windows.h> // for bitmap header
+#endif
extern "C"
{
@@ -31,7 +33,7 @@
public:
virtual bool ProcessImage(const int width, const int height, const uint8_t * buf)
{
- return TRUE;
+ return true;
}
};
Modified: trunk/DvdMenuXtractor/MyWizard.cpp
===================================================================
--- trunk/DvdMenuXtractor/MyWizard.cpp 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/MyWizard.cpp 2004-09-11 13:03:30 UTC (rev 778)
@@ -1,3 +1,4 @@
+#include <wx/wx.h>
#include "wx/intl.h"
#include "wx/statbmp.h"
#include "wx/button.h"
Modified: trunk/DvdMenuXtractor/SUBDecoder.h
===================================================================
--- trunk/DvdMenuXtractor/SUBDecoder.h 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/SUBDecoder.h 2004-09-11 13:03:30 UTC (rev 778)
@@ -14,7 +14,9 @@
#include <stdio.h>
#include <string.h>
#include "inttypes.h"
+#if defined(WIN32)
#include <windows.h> // for bitmap header
+#endif
#include "spudec/spudec.h"
#define SUB_READBUF_SIZE (65536)
@@ -26,7 +28,7 @@
public:
virtual bool ProcessImage(const int width, const int height, const uint8_t * buf)
{
- return TRUE;
+ return true;
}
};
Modified: trunk/DvdMenuXtractor/mpeg2dec/libvo/yuv2rgb.c
===================================================================
--- trunk/DvdMenuXtractor/mpeg2dec/libvo/yuv2rgb.c 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/mpeg2dec/libvo/yuv2rgb.c 2004-09-11 13:03:30 UTC (rev 778)
@@ -31,7 +31,9 @@
#include "convert_internal.h"
#include "mm_accel.h"
+#if defined(WIN32)
#define fprintf myfprintf
+#endif
static uint32_t accel = 0;
static uint32_t matrix_coefficients = 6;
Modified: trunk/DvdMenuXtractor/spudec/spudec.c
===================================================================
--- trunk/DvdMenuXtractor/spudec/spudec.c 2004-09-10 12:17:40 UTC (rev 777)
+++ trunk/DvdMenuXtractor/spudec/spudec.c 2004-09-11 13:03:30 UTC (rev 778)
@@ -35,7 +35,9 @@
#include <ppm.h>
#endif
+#if defined(WIN32)
#include <windows.h> // for bitmap header
+#endif
// read a big endian 16 bit value
static unsigned int get_be16(const unsigned char *p)
@@ -248,6 +250,7 @@
unsigned int width;
unsigned int height;
unsigned int allHeaderSize, dataSize, lineSize;
+#if defined(WIN32)
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
@@ -301,7 +304,7 @@
}
fclose(out_file);
-
+#endif
}
@@ -770,4 +773,4 @@
unsigned int spudec_get_title_num(spudec_handle_t* this)
{
return this->title_num;
-}
\ No newline at end of file
+}
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.