Author: robux4
Date: 2005-01-06 22:23:10 +0300 (Thu, 06 Jan 2005)
New Revision: 1017
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/IFOFile.cpp
trunk/DvdMenuXtractor/IFOFile.h
Log:
DMX: use the STL instead of the inferior wxWidget stuff
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2005-01-06 14:42:05 UTC (rev 1016)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2005-01-06 19:23:10 UTC (rev 1017)
@@ -636,13 +636,13 @@
size_t _stream;
// decide which audio streams to process
- if (_audioTracks.GetCount())
+ if (_audioTracks.size())
{
- for (_stream=0; _stream<_audioTracks.GetCount();_stream++)
+ for (_stream=0; _stream<_audioTracks.size();_stream++)
{
wxString _langName;
wxString MtxTempString;
- audio_attr_t * _attr = _audioTracks.Item(_stream)->GetData();
+ const audio_attr_t * _attr = _audioTracks[_stream];
// get the possible ID for this track for this Cell/PGC
uint8_t _ID = IfoFile->GetAudioId(_stream, title, language);
@@ -659,7 +659,7 @@
MtxTempString += wxString::Format("%c%c", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
}
MtxTempString += " --timecodes 0:" + outputDirectory+newFilename+_langName;
- switch (_audioTracks.Item(_stream)->GetData()->audio_format)
+ switch (_audioTracks[_stream]->audio_format)
{
case 0:
MtxTempString += "_ac3.tmc " + outputDirectory+newFilename+_langName + ".ac3";
@@ -698,9 +698,9 @@
}
}
- if (_subTracks.GetCount())
+ if (_subTracks.size())
{
- for (_stream=0; _stream<_subTracks.GetCount();_stream++)
+ for (_stream=0; _stream<_subTracks.size();_stream++)
{
// get the possible IDs for this track for this Cell/PGC
IdArray _IDs = IfoFile->GetSubsId(_stream, title, language);
@@ -709,7 +709,7 @@
wxString _langName;
wxString MtxTempString;
- subp_attr_t * _attr = _subTracks.Item(_stream)->GetData();
+ const subp_attr_t * _attr = _subTracks[_stream];
MtxTempString = " --track-name 0:\"sub-";
if (_attr->lang_code == 0)
{
Modified: trunk/DvdMenuXtractor/IFOFile.cpp
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.cpp 2005-01-06 14:42:05 UTC (rev 1016)
+++ trunk/DvdMenuXtractor/IFOFile.cpp 2005-01-06 19:23:10 UTC (rev 1017)
@@ -11,8 +11,6 @@
WX_DEFINE_LIST(CellsListType);
WX_DEFINE_LIST(IfoHandles);
-WX_DEFINE_LIST(AudioTrackList);
-WX_DEFINE_LIST(SubtitleTrackList);
WX_DEFINE_OBJARRAY(IdArray);
// ----------------------------------------------------------------------------
@@ -453,9 +451,9 @@
{
const vmgi_mat_t &vmgi_mat = *m_handle->vmgi_mat;
if (vmgi_mat.nr_of_vmgm_audio_streams)
- m_langAudio.Append(&vmgi_mat.vmgm_audio_attr);
+ m_langAudio.push_back(&vmgi_mat.vmgm_audio_attr);
if (vmgi_mat.nr_of_vmgm_subp_streams)
- m_langSubs.Append(&vmgi_mat.vmgm_subp_attr);
+ m_langSubs.push_back(&vmgi_mat.vmgm_subp_attr);
}
// _todo_ handle the list of menu cells with their ID and sectors
@@ -472,15 +470,15 @@
{
const vtsi_mat_t & vtsi_mat = *m_handle->vtsi_mat;
if (vtsi_mat.nr_of_vtsm_audio_streams)
- m_langAudio.Append(&vtsi_mat.vtsm_audio_attr);
+ m_langAudio.push_back(&vtsi_mat.vtsm_audio_attr);
if (vtsi_mat.nr_of_vtsm_subp_streams)
- m_langSubs.Append(&vtsi_mat.vtsm_subp_attr);
+ m_langSubs.push_back(&vtsi_mat.vtsm_subp_attr);
uint8_t _stream;
for (_stream=0; _stream < vtsi_mat.nr_of_vts_audio_streams; _stream++)
- m_Audio.Append(&vtsi_mat.vts_audio_attr[_stream]);
+ m_Audio.push_back(&vtsi_mat.vts_audio_attr[_stream]);
for (_stream=0; _stream < vtsi_mat.nr_of_vts_subp_streams; _stream++)
- m_Subs.Append(&vtsi_mat.vts_subp_attr[_stream]);
+ m_Subs.push_back(&vtsi_mat.vts_subp_attr[_stream]);
}
// _todo_ handle the list of menu cells with their ID and sectors
Modified: trunk/DvdMenuXtractor/IFOFile.h
===================================================================
--- trunk/DvdMenuXtractor/IFOFile.h 2005-01-06 14:42:05 UTC (rev 1016)
+++ trunk/DvdMenuXtractor/IFOFile.h 2005-01-06 19:23:10 UTC (rev 1017)
@@ -4,6 +4,8 @@
// ----------------------------------------------------------------------------
+#include <vector>
+
#include "wx/wx.h"
#include "dvdread/ifo_read.h"
#include "VobParser.h"
@@ -18,8 +20,8 @@
WX_DECLARE_LIST(CellListElem, CellsListType);
-WX_DECLARE_LIST(audio_attr_t, AudioTrackList);
-WX_DECLARE_LIST(subp_attr_t, SubtitleTrackList);
+typedef std::vector<const audio_attr_t*> AudioTrackList;
+typedef std::vector<const subp_attr_t*> SubtitleTrackList;
WX_DECLARE_OBJARRAY(uint8_t, IdArray);
class IfoContent
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.