Author: robux4
Date: 2004-09-19 01:03:05 +0400 (Sun, 19 Sep 2004)
New Revision: 829
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/MyWizard.cpp
trunk/DvdMenuXtractor/MyWizard.h
Log:
fixes for gcc and cleaning
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-18 19:50:32 UTC (rev 828)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-18 21:03:05 UTC (rev 829)
@@ -1,34 +1,24 @@
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
-#include <time.h>
#if defined(WIN32)
#include <wx/wxprec.h>
#endif
+#include "MyWizard.h"
+#include <time.h>
+
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
-#if !defined(WX_PRECOMP)
-#include <wx/wx.h>
-#endif
+#include <wx/button.h>
+#include <wx/fileconf.h>
+#include <wx/filename.h>
+#include <wx/listctrl.h>
-#include "wx/wizard.h"
-#include "wx/textctrl.h"
-#include "wx/button.h"
-#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"
-#include "wx/fileconf.h"
-
#include <inttypes.h>
-#include "MyWizard.h"
#include "IFOFile.h"
#include "VOBParser.h"
#include "MPEG2Decoder.h"
@@ -520,15 +510,15 @@
m_OperationInProgress = FALSE;
}
- ~wxMyWizardPage4()
- {
- if(m_VobParser)
- {
- delete m_VobParser;
- }
- }
-
-
+ ~wxMyWizardPage4()
+ {
+ if(m_VobParser)
+ {
+ delete m_VobParser;
+ }
+ }
+
+
void BuildVobMap(void)
{
wxFileConfig *pConfig = (wxFileConfig *)wxConfigBase::Get();
@@ -637,8 +627,8 @@
FilenameBase = FilenameBase.Format("cell_V%03d_C%02d",
cle->vobid, cle->cellid);
m_txtDemuxLog->AppendText("Converting " + FilenameBase + ".m2v to "+FilenameBase+".bmp ...\n");
- BMPWriter->SetFilename(bmpDirectory+FilenameBase+".bmp");
- mpeg2decoder->ProcessFile(m2vDirectory+FilenameBase+".m2v");
+// BMPWriter->SetFilename(bmpDirectory+FilenameBase+".bmp");
+// mpeg2decoder->ProcessFile(m2vDirectory+FilenameBase+".m2v");
wxYield();
}
m_gaDemuxProgress->SetValue(i);
@@ -736,7 +726,7 @@
inline wxString CreateUID()
{
- return wxString::Format("%d", rand() | (rand() << 16) );
+ return wxString::Format("%u", uint32_t(rand() | (rand() << 16)) );
}
void AddCommands(int lvl, wxTextFile & XmlFile, const pgc_command_tbl_t * command_tbl)
@@ -854,10 +844,10 @@
const cell_position_t & position = pgc->cell_position[cell_num-1];
const cell_playback_t & cell = pgc->cell_playback[cell_num-1];
- if (cell.block_mode != 0 && cell.block_mode != 3)
- continue;
-
- if (cell.block_mode) // multi-angle
+ if (cell.block_mode != 0 && cell.block_mode != 3)
+ continue;
+
+ if (cell.block_mode) // multi-angle
XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- Program %sCell CN#%d (%d angles) -->",(cell_num==entry_cell_num)?"Entry ":"", cell_num, cell_num - entry_cell_num + 1));
else
XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- Program %sCell CN#%d -->",(cell_num==entry_cell_num)?"Entry ":"", cell_num));
@@ -873,8 +863,8 @@
XmlFile.AddLine(IndentString(lvl)+"<ChapterProcessPrivate>"+encodebase64(_PrivateCN,5)+"</ChapterProcessPrivate>");
//_TODO_: handle the vobID/cellID to determine the real timecode of the cells !
- // -> no, done when extracting the content streams, using the same timecode base
-
+ // -> no, done when extracting the content streams, using the same timecode base
+
end_time = st_time + DvdTimecodeToNano(cell.playback_time);
DisplayTime(lvl, XmlFile, st_time, end_time);
st_time = end_time;
@@ -895,7 +885,7 @@
static unsigned char _PrivatePTT[] = {0x18, 0x00, 0x00};
uint64_t st_time = start_time, end_time;
- XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- PGC PGC_%d type %s -->",pgc_num+1,GetPGCType(pgc_type)));
+ XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- PGC PGC_%d type %s -->",pgc_num+1,GetPGCType(pgc_type).c_str()));
XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
lvl++;
wxString _myUID = CreateUID();
Modified: trunk/DvdMenuXtractor/MyWizard.cpp
===================================================================
--- trunk/DvdMenuXtractor/MyWizard.cpp 2004-09-18 19:50:32 UTC (rev 828)
+++ trunk/DvdMenuXtractor/MyWizard.cpp 2004-09-18 21:03:05 UTC (rev 829)
@@ -1,11 +1,8 @@
#include <wx/wx.h>
-#include "wx/intl.h"
-#include "wx/statbmp.h"
-#include "wx/button.h"
-#include "wx/statline.h"
-#include "wx/wizard.h"
-#include "wx/stattext.h"
-#include "wx/sizer.h"
+#include <wx/intl.h>
+#include <wx/statline.h>
+#include <wx/wizard.h>
+#include <wx/sizer.h>
#include "MyWizard.h"
Modified: trunk/DvdMenuXtractor/MyWizard.h
===================================================================
--- trunk/DvdMenuXtractor/MyWizard.h 2004-09-18 19:50:32 UTC (rev 828)
+++ trunk/DvdMenuXtractor/MyWizard.h 2004-09-18 21:03:05 UTC (rev 829)
@@ -3,6 +3,12 @@
#define __MY_WX_WIZARD__
// ----------------------------------------------------------------------------
+#include <wx/button.h>
+#include <wx/config.h>
+#include <wx/dialog.h>
+#include <wx/stattext.h>
+#include <wx/statbmp.h>
+
class wxMyWizard;
#define DEFAULT_COMMON_STYLE (wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE)
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.