[matroska] r912 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-10-24 16:38:41 +0400 (Sun, 24 Oct 2004)
New Revision: 912

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
   trunk/DvdMenuXtractor/VobParser.cpp
Log:
change the name of the audio dir
fix a bug in the audio stream ID detection

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-24 12:25:25 UTC (rev 911)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-10-24 12:38:41 UTC (rev 912)
@@ -65,7 +65,7 @@
 IFOFile* IfoFile = NULL;
 wxLogWindow* wxLogWin;
 wxString m2vDirectory;
-wxString ac3Directory;
+wxString audioDirectory;
 wxString subDirectory;
 wxString bmpDirectory;
 wxString wavDirectory;
@@ -587,20 +587,20 @@
 								switch (_audioTracks.Item(_stream)->GetData()->audio_format)
 								{
 								case 0:
-									demuxer->AddDemuxer(new AC3DemuxWriter(ac3Directory+newFilename+_langName, 0x80 + _stream));
+									demuxer->AddDemuxer(new AC3DemuxWriter(audioDirectory+newFilename+_langName, 0x80 + _stream));
 									break;
 
 								case 2:
 								case 3:
-									demuxer->AddDemuxer(new MPADemuxWriter(ac3Directory+newFilename+_langName, 0xC0 + _stream));
+									demuxer->AddDemuxer(new MPADemuxWriter(audioDirectory+newFilename+_langName, 0xC0 + _stream));
 									break;
 
 								case 4:
-									demuxer->AddDemuxer(new LPCMDemuxWriter(ac3Directory+newFilename+_langName, 0xA0 + _stream));
+									demuxer->AddDemuxer(new LPCMDemuxWriter(audioDirectory+newFilename+_langName, 0xA0 + _stream));
 									break;
 
 								case 6:
-									demuxer->AddDemuxer(new DTSDemuxWriter(ac3Directory+newFilename+_langName, 0x88 + _stream));
+									demuxer->AddDemuxer(new DTSDemuxWriter(audioDirectory+newFilename+_langName, 0x88 + _stream));
 									break;
 
 								default:
@@ -709,7 +709,7 @@
 				FilenameBase = CellName(title, cle->vobid, cle->cellid, language);
 				m_txtDemuxLog->AppendText("Converting " + FilenameBase + ".ac3 to "+FilenameBase+".wav ...\n");
 				WAVWriter->SetFilename(wavDirectory+FilenameBase+".wav");
-				a52decoder->ProcessFile(ac3Directory+FilenameBase+".ac3");
+				a52decoder->ProcessFile(audioDirectory+FilenameBase+".ac3");
 				wxYield();
 			}
 			m_gaDemuxProgress->SetValue(i);
@@ -1260,8 +1260,8 @@
         m2vDirectory = pConfig->Read("OutputDirectory","")+ "m2v" + wxFILE_SEP_PATH;
         wxMkdir(m2vDirectory);
         // Create ac3 directory
-        ac3Directory = pConfig->Read("OutputDirectory","")+ "ac3" + wxFILE_SEP_PATH;
-        wxMkdir(ac3Directory);
+        audioDirectory = pConfig->Read("OutputDirectory","")+ "audio" + wxFILE_SEP_PATH;
+        wxMkdir(audioDirectory);
         // Create sub directory
         subDirectory = pConfig->Read("OutputDirectory","")+ "sub" + wxFILE_SEP_PATH;
         wxMkdir(subDirectory);

Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp	2004-10-24 12:25:25 UTC (rev 911)
+++ trunk/DvdMenuXtractor/VobParser.cpp	2004-10-24 12:38:41 UTC (rev 912)
@@ -167,8 +167,6 @@
 		int stuffing_nb = GetNext8Bits() & 0x07;
 		SkipNBytes(stuffing_nb);
 		
-		DebugLog("%06d) ", m_pktindex);
-		
 		uint32_t _Header = GetNext32Bits();
 		uint8_t _StreamID;
 		if ((_Header & VOB_SLICE) == VOB_SLICE)
@@ -643,7 +641,7 @@
 	ParsePESHeaderData();
 	uint8_t substreamID = GetNext8Bits();
 
-	if(substreamID >= SUBSTREAM_SUB_LOW && substreamID <= SUBSTREAM_SUB_HIGH)
+	if(substreamID >= SUBSTREAM_SUB_LOW && substreamID < SUBSTREAM_SUB_HIGH)
 	{
 		DebugLog("Subtitles streamID = 0x%X\n", substreamID);
 		if(m_demuxer)
@@ -652,7 +650,7 @@
 			m_demuxer->ProcessSubStream(&m_buff[m_index], subDataLen, substreamID);
 		}
 	}
-	else if(substreamID >= SUBSTREAM_AC3_LOW && substreamID <= SUBSTREAM_AC3_HIGH)
+	else if(substreamID >= SUBSTREAM_AC3_LOW && substreamID < SUBSTREAM_AC3_HIGH)
 	{
 		DebugLog("AC3 streamID = 0x%X\n", substreamID);
 		// Skip frame header number
@@ -665,7 +663,7 @@
 			m_demuxer->ProcessAC3Stream(&m_buff[m_index], ac3DataLen, substreamID);
 		}
 	}
-	else if(substreamID >= SUBSTREAM_DTS_LOW && substreamID <= SUBSTREAM_DTS_HIGH)
+	else if(substreamID >= SUBSTREAM_DTS_LOW && substreamID < SUBSTREAM_DTS_HIGH)
 	{
 		DebugLog("DTS streamID = 0x%X\n", substreamID);
 		// Skip frame header number
@@ -678,7 +676,7 @@
 			m_demuxer->ProcessDTSStream(&m_buff[m_index], ac3DataLen, substreamID);
 		}
 	}
-	else if(substreamID >= SUBSTREAM_PCM_LOW && substreamID <= SUBSTREAM_PCM_HIGH)
+	else if(substreamID >= SUBSTREAM_PCM_LOW && substreamID < SUBSTREAM_PCM_HIGH)
 	{
 		DebugLog("LPCM streamID = 0x%X\n", substreamID);
 		// Skip unknown data
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.