[matroska] r817 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-09-18 12:42:24 +0400 (Sat, 18 Sep 2004)
New Revision: 817

Modified:
   trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
Log:
correct timecode for multi-angle cells

Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-09-16 16:42:11 UTC (rev 816)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp	2004-09-18 08:42:24 UTC (rev 817)
@@ -847,12 +847,12 @@
 		for (int cell_num = entry_cell_num; cell_num<next_program_entry_cell_num; cell_num++)
 		{
 			// Output cells
+			const cell_position_t & position = pgc->cell_position[cell_num-1];
+			const cell_playback_t & cell = pgc->cell_playback[cell_num-1];
 
-			XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- Program %sCell CN#%d -->",(cell_num==entry_cell_num)?"Entry ":"", cell_num));
+			XmlFile.AddLine(IndentString(lvl)+wxString::Format("<!-- Program %sCell CN#%d %s-->",(cell_num==entry_cell_num)?"Entry ":"", cell_num, cell.block_mode?"(multi-angle) ":""));
 			XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
 				lvl++;
-				const cell_position_t & position = pgc->cell_position[cell_num-1];
-				const cell_playback_t & cell = pgc->cell_playback[cell_num-1];
 				wxString _myUID = CreateUID();
 				XmlFile.AddLine(IndentString(lvl)+"<ChapterUID>"+_myUID+"</ChapterUID>");
 			
@@ -862,11 +862,16 @@
 				XmlFile.AddLine(IndentString(lvl)+"<ChapterProcessPrivate>"+encodebase64(_PrivateCN,4)+"</ChapterProcessPrivate>");
 
 				//_TODO_: handle the vobID/cellID to determine the real timecode of the cells !
-				//_TODO_: handle the multi-angle programs
-
-				end_time = st_time + DvdTimecodeToNano(cell.playback_time);
+
+				if (cell.block_mode == 0 || cell.block_mode == 1) // start cell
+				{
+					end_time = st_time + DvdTimecodeToNano(cell.playback_time);
+				}
 				DisplayTime(lvl, XmlFile, st_time, end_time);
-				st_time = end_time;
+				if (cell.block_mode == 0 || cell.block_mode == 3) // end cell
+				{
+					st_time = end_time;
+				}
 				lvl--;
 			XmlFile.AddLine(IndentString(lvl)+"</ChapterAtom>");
 		}
@@ -907,8 +912,6 @@
 		// PGC commands
 		AddCommands(lvl, XmlFile, pgc->command_tbl);
 
-		//_TODO_: handle the multi-angles in the title
-
 		// Handle the Programs/Cells in the PGC
 		for (int i=0; i< pgc->nr_of_programs; i++)
 		{
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.