Author: robux4
Date: 2004-09-18 13:07:20 +0400 (Sat, 18 Sep 2004)
New Revision: 819
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
Log:
only store the last cell of a multi-angle program, the other ones don't matter in the chapters
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-18 08:45:21 UTC (rev 818)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-09-18 09:07:20 UTC (rev 819)
@@ -824,7 +824,7 @@
uint64_t OutputProgram(int lvl, wxTextFile & XmlFile, const pgc_t * pgc, int program_number, uint64_t start_time)
{
static unsigned char _PrivatePG[] = {0x10, 0x00, 0x00};
- static unsigned char _PrivateCN[] = {0x08, 0x00, 0x00, 0x00};
+ static unsigned char _PrivateCN[] = {0x08, 0x00, 0x00, 0x00, 0x00};
uint64_t st_time = start_time, end_time;
@@ -850,7 +850,13 @@
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 %s-->",(cell_num==entry_cell_num)?"Entry ":"", cell_num, 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));
XmlFile.AddLine(IndentString(lvl)+"<ChapterAtom>");
lvl++;
wxString _myUID = CreateUID();
@@ -859,16 +865,15 @@
_PrivateCN[1] = (position.vob_id_nr) >> 8;
_PrivateCN[2] = (position.vob_id_nr) & 0xFF;
_PrivateCN[3] = position.cell_nr;
- XmlFile.AddLine(IndentString(lvl)+"<ChapterProcessPrivate>"+encodebase64(_PrivateCN,4)+"</ChapterProcessPrivate>");
+ _PrivateCN[4] = cell_num - entry_cell_num + 1; // Number of angles
+ 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
end_time = st_time + DvdTimecodeToNano(cell.playback_time);
DisplayTime(lvl, XmlFile, st_time, end_time);
- if (cell.block_mode == 0 || cell.block_mode == 3) // end cell
- {
- st_time = end_time;
- }
+ st_time = end_time;
lvl--;
XmlFile.AddLine(IndentString(lvl)+"</ChapterAtom>");
}
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.