summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-10-08 08:15:40 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-10-08 08:15:40 +0000
commit65618a7067e204e9113dbbf85235eb30111dfafd (patch)
treef2843596ce17fa0a15680a072cc10db44e78c4d1
parent0cbae44e900142d59309c1c79e89f1a8b628c9ce (diff)
downloadvdr-plugin-muggle-65618a7067e204e9113dbbf85235eb30111dfafd.tar.gz
vdr-plugin-muggle-65618a7067e204e9113dbbf85235eb30111dfafd.tar.bz2
Show images on a basis of seconds. Poll more often, until first pic is received
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@859 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--vdr_player.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/vdr_player.c b/vdr_player.c
index d588990..bea5b04 100644
--- a/vdr_player.c
+++ b/vdr_player.c
@@ -228,7 +228,7 @@ class mgPCMPlayer : public cPlayer, cThread
}
// background image handling stuff
- int m_image_delaycounter;
+ int m_lastshow;
string m_current_image;
void CheckImage( string fileName );
void ShowImage( );
@@ -452,11 +452,12 @@ mgPCMPlayer::Action (void)
switch (m_state)
{
case msStart:
- {
- m_img_provider->updateItem( m_current );
- m_image_delaycounter = 0;
+ {
+ m_img_provider->updateItem( m_current );
+
+ m_index = 0;
+ m_lastshow = -1; // never showed a picture during this replay
- m_index = 0;
m_playing = true;
if (m_current)
@@ -488,9 +489,7 @@ mgPCMPlayer::Action (void)
break;
case msDecode:
{
- int secs = SecondsToFrames( m_index) ;
-
- if( secs % the_setup.ImageShowDuration == 0 )
+ if( ( m_index % the_setup.ImageShowDuration == 0 && m_index > m_lastshow) || m_lastshow < 0 )
{ // all n decoding steps
m_current_image = m_img_provider->getImagePath( );
@@ -508,12 +507,12 @@ mgPCMPlayer::Action (void)
else
{
// cDevice::PrimaryDevice()->SetPlayMode(pmAudioOnlyBlack);
- cout << "Showing image " << m_current_image << endl << flush;
+ cout << m_index << ": Showing image " << m_current_image << endl << flush;
ShowImage();
+ m_lastshow = m_index;
}
}
}
- m_image_delaycounter += 1;
ds = m_decoder->decode ();
switch (ds->status)