1 diff -Naur old/smplayer/src/basegui.cpp new/smplayer/src/basegui.cpp
2 --- old/smplayer/src/basegui.cpp 2011-01-25 18:16:30.000000000 +0200
3 +++ new/smplayer/src/basegui.cpp 2011-01-25 18:29:21.442435183 +0200
5 for (n=0; n < core->mdat.chapters; n++) {
6 QAction *a = new QAction(chapterGroup);
8 - a->setText( QString::number(n+1) );
9 + a->setText(core->mdat.chapters_name[n]);
10 a->setData( n + Core::firstChapter() );
14 for (n=0; n < core->mdat.mkv_chapters; n++) {
15 QAction *a = new QAction(chapterGroup);
16 a->setCheckable(true);
17 - a->setText( QString::number(n+1) );
18 + a->setText(core->mdat.mkv_chapters_name[n]);
19 a->setData( n + Core::firstChapter() );
22 diff -Naur old/smplayer/src/mediadata.cpp new/smplayer/src/mediadata.cpp
23 --- old/smplayer/src/mediadata.cpp 2011-01-25 18:16:30.000000000 +0200
24 +++ new/smplayer/src/mediadata.cpp 2011-01-25 18:31:42.311989276 +0200
27 #if GENERIC_CHAPTER_SUPPORT
29 + chapters_name.clear();
35 + mkv_chapters_name.clear();
39 diff -Naur old/smplayer/src/mediadata.h new/smplayer/src/mediadata.h
40 --- old/smplayer/src/mediadata.h 2011-01-25 18:16:30.000000000 +0200
41 +++ new/smplayer/src/mediadata.h 2011-01-25 18:27:16.182462317 +0200
53 #if GENERIC_CHAPTER_SUPPORT
55 + QMap<int,QString> chapters_name;
57 //int chapters, angles; // for DVDs
61 + QMap<int,QString> mkv_chapters_name;
65 diff -Naur old/smplayer/src/mplayerprocess.cpp new/smplayer/src/mplayerprocess.cpp
66 --- old/smplayer/src/mplayerprocess.cpp 2011-01-25 18:16:30.000000000 +0200
67 +++ new/smplayer/src/mplayerprocess.cpp 2011-01-25 18:25:13.595751066 +0200
69 static QRegExp rx_screenshot("^\\*\\*\\* screenshot '(.*)'");
70 static QRegExp rx_endoffile("^Exiting... \\(End of file\\)|^ID_EXIT=EOF");
71 static QRegExp rx_mkvchapters("\\[mkv\\] Chapter (\\d+) from");
72 +static QRegExp rx_mkvchapters_name("^ID_CHAPTER_(\\d+)_NAME=(.*)");
73 static QRegExp rx_aspect2("^Movie-Aspect is ([0-9,.]+):1");
74 static QRegExp rx_fontcache("^\\[ass\\] Updating font cache|^\\[ass\\] Init");
75 static QRegExp rx_scanning_font("Scanning file");
80 + if (rx_mkvchapters_name.indexIn(line)!=-1) {
81 + int id = rx_mkvchapters_name.cap(1).toInt();
82 + QString s = rx_mkvchapters_name.cap(2);
83 + qDebug("MplayerProcess::parseLine: mkv chapters: %d", id);
84 + qDebug("MplayerProcess::parseLine: mkv chapters name: %s", s.toUtf8().data());
85 +#if GENERIC_CHAPTER_SUPPORT
86 + md.chapters_name.insert(id,s);
88 + md.mkv_chapters_name.insert(id,s);
95 if (rx_vcd.indexIn(line) > -1 ) {
96 int ID = rx_vcd.cap(1).toInt();