git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add 16:9 letterbox mode
[enigma2.git]
/
lib
/
service
/
servicedvb.cpp
diff --git
a/lib/service/servicedvb.cpp
b/lib/service/servicedvb.cpp
index e3b6fe459be1bccef4dc68a9b32131824289edcd..173f471bf733f65362395e54443e4503b4cc3a35 100644
(file)
--- a/
lib/service/servicedvb.cpp
+++ b/
lib/service/servicedvb.cpp
@@
-1111,7
+1111,8
@@
void eDVBServicePlay::serviceEventTimeshift(int event)
m_event((iPlayableService*)this, evSOF);
break;
case eDVBServicePMTHandler::eventEOF:
m_event((iPlayableService*)this, evSOF);
break;
case eDVBServicePMTHandler::eventEOF:
- switchToLive();
+ if ((!m_is_paused) && (m_skipmode >= 0))
+ switchToLive();
break;
}
}
break;
}
}
@@
-1159,7
+1160,7
@@
RESULT eDVBServicePlay::stop()
/* add bookmark for last play position */
if (m_is_pvr)
{
/* add bookmark for last play position */
if (m_is_pvr)
{
- pts_t play_position;
+ pts_t play_position
, length
;
if (!getPlayPosition(play_position))
{
/* remove last position */
if (!getPlayPosition(play_position))
{
/* remove last position */
@@
-1174,7
+1175,17
@@
RESULT eDVBServicePlay::stop()
++i;
}
++i;
}
- m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
+ if (getLength(length))
+ length = 0;
+
+ if (length)
+ {
+ int perc = play_position * 100LL / length;
+
+ /* only store last play position when between 5% and 95% */
+ if ((5 < perc) && (perc < 95))
+ m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
+ }
m_cuesheet_changed = 1;
}
}
m_cuesheet_changed = 1;
}
}
@@
-2186,12
+2197,15
@@
void eDVBServicePlay::switchToTimeshift()
m_cue = new eCueSheet();
m_service_handler_timeshift.tune(r, 1, m_cue); /* use the decoder demux for everything */
m_cue = new eCueSheet();
m_service_handler_timeshift.tune(r, 1, m_cue); /* use the decoder demux for everything */
- updateDecoder(1); /* mainly to switch off PCR, and to set pause */
+
+ eDebug("eDVBServicePlay::switchToTimeshift, in pause mode now.");
+ pause();
+ updateDecoder(); /* mainly to switch off PCR, and to set pause */
m_event((iPlayableService*)this, evSeekableStatusChanged);
}
m_event((iPlayableService*)this, evSeekableStatusChanged);
}
-void eDVBServicePlay::updateDecoder(
int intopause
)
+void eDVBServicePlay::updateDecoder()
{
int vpid = -1, vpidtype = -1, apid = -1, apidtype = -1, pcrpid = -1, tpid = -1, achannel = -1, ac3_delay=-1, pcm_delay=-1;
{
int vpid = -1, vpidtype = -1, apid = -1, apidtype = -1, pcrpid = -1, tpid = -1, achannel = -1, ac3_delay=-1, pcm_delay=-1;
@@
-2334,7
+2348,10
@@
void eDVBServicePlay::updateDecoder(int intopause)
if (!m_is_primary)
m_decoder->setTrickmode(1);
if (!m_is_primary)
m_decoder->setTrickmode(1);
- m_decoder->start();
+ if (m_is_paused)
+ m_decoder->preroll();
+ else
+ m_decoder->start();
if (vpid > 0 && vpid < 0x2000)
;
if (vpid > 0 && vpid < 0x2000)
;