From: Felix Domke Date: Wed, 19 Jul 2006 02:00:06 +0000 (+0000) Subject: save mark type '3' on bookmark position X-Git-Tag: 2.6.0~3154 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/9b7c5648eaf5f63da9c4f871652e9334446d3bf7?ds=sidebyside save mark type '3' on bookmark position --- diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 616c7007..10de6213 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -794,6 +794,29 @@ RESULT eDVBServicePlay::start() RESULT eDVBServicePlay::stop() { + /* add bookmark for last play position */ + if (m_is_pvr) + { + pts_t play_position; + if (!getPlayPosition(play_position)) + { + /* remove last position */ + for (std::multiset::iterator i(m_cue_entries.begin()); i != m_cue_entries.end();) + { + if (i->what == 3) /* current play position */ + { + m_cue_entries.erase(i); + i = m_cue_entries.begin(); + continue; + } else + ++i; + } + + m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */ + m_cuesheet_changed = 1; + } + } + stopTimeshift(); /* in case timeshift was enabled, remove buffer etc. */ m_service_handler_timeshift.free(); @@ -1806,7 +1829,7 @@ void eDVBServicePlay::loadCuesheet() #endif what = ntohl(what); - if (what > 2) + if (what > 3) break; m_cue_entries.insert(cueEntry(where, what)); @@ -1862,7 +1885,7 @@ void eDVBServicePlay::cutlistToCuesheet() if (!m_cutlist_enabled) { m_cue->commitSpans(); - eDebug("cutlists where disabled"); + eDebug("cutlists were disabled"); return; } @@ -1883,7 +1906,7 @@ void eDVBServicePlay::cutlistToCuesheet() continue; } else if (i->what == 1) /* out */ out = i++->where; - else /* mark */ + else /* mark (2) or last play position (3) */ { i++; continue;