diff options
author | lvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b> | 2004-09-27 22:14:37 +0000 |
---|---|---|
committer | lvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b> | 2004-09-27 22:14:37 +0000 |
commit | 0c95d9079fc11e8b07a03e92ea2483456a696215 (patch) | |
tree | a2cda3c16b4494c7ebec55d6282fdfec43aedb05 | |
parent | eb9e6e35d36dee3011bfc2a67a5b8bb9138a259e (diff) | |
download | vdr-plugin-muggle-0c95d9079fc11e8b07a03e92ea2483456a696215.tar.gz vdr-plugin-muggle-0c95d9079fc11e8b07a03e92ea2483456a696215.tar.bz2 |
Status display for VDR 1.3.12 added (buggy)
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@186 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | vdr_player.c | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/vdr_player.c b/vdr_player.c index c2a65ca..713ae18 100644 --- a/vdr_player.c +++ b/vdr_player.c @@ -185,19 +185,23 @@ public: virtual ~mgPCMPlayer(); bool Active() { return m_active; } + void Pause(); void Play(); void Forward(); void Backward(); + void Goto(int Index, bool Still=false); void SkipSeconds(int secs); void ToggleShuffle(void); void ToggleLoop(void); + virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame=false); // bool GetPlayInfo(cMP3PlayInfo *rm); // LVW + void NewPlaylist(mgPlaylist *plist); - mgContentItem *GetCurrent () { return m_current; } - }; + mgContentItem *GetCurrent () { return m_current; } +}; mgPCMPlayer::mgPCMPlayer(mgPlaylist *plist) : cPlayer( the_setup.BackgrMode? pmAudioOnly: pmAudioOnlyBlack ) @@ -851,7 +855,7 @@ void mgPCMPlayer::SkipSeconds(int secs) bool mgPCMPlayer::GetIndex( int ¤t, int &total, bool snaptoiframe ) { bool res = false; - current = SecondsToFrames(m_index); + current = SecondsToFrames( m_index ); total = -1; return res; @@ -970,10 +974,12 @@ void mgPlayerControl::ShowProgress() { // open the osd if its not already there... #if VDRVERSNUM >= 10307 - osd = cOsdProvider::NewOsd (Setup.OSDLeft, Setup.OSDTop); - tArea Areas[] = { { 0, 0, Setup.OSDWidth, Setup.OSDHeight, 2 } }; - osd->SetAreas(Areas,sizeof(Areas)/sizeof(tArea)); - font = cFont::GetFont (fontOsd); + /* + osd = cOsdProvider::NewOsd (Setup.OSDLeft, Setup.OSDTop); + tArea Areas[] = { { 0, 0, Setup.OSDWidth, Setup.OSDHeight, 2 } }; + osd->SetAreas(Areas,sizeof(Areas)/sizeof(tArea)); + font = cFont::GetFont (fontOsd); + */ #else Interface->Open(); #endif @@ -983,14 +989,27 @@ void mgPlayerControl::ShowProgress() // now an osd is open, go on #if VDRVERSNUM >= 10307 - int w = Setup.OSDWidth; - int h = Setup.OSDHeight; - osd->DrawRectangle (0, 0, w - 1, h - 1, clrGray50); - mgContentItem *item = m_player->GetCurrent (); - string msg = item->getGenre () + " " + item->getTitle (); - osd->DrawText (0, h - font->Height () - 2, msg.c_str (), clrBlack, clrCyan, - cFont::GetFont (fontOsd), w, font->Height () + 2, taCenter); - osd->Flush(); + cSkinDisplayReplay *m_display; + + m_display = Skins.Current()->DisplayReplay(false); + if( m_player && m_display ) + { + int current_frame, total_frames; + m_player->GetIndex( current_frame, total_frames ); + + m_display->SetProgress( current_frame, total_frames ); + m_display->SetCurrent( IndexToHMSF( current_frame ) ); + m_display->SetTotal( IndexToHMSF( total_frames ) ); + + char *buf; + asprintf( &buf, "%s", m_player->GetCurrent()->getTitle().c_str() ); + m_display->SetTitle( buf ); + free( buf ); + + bool play = true, forward = true; + int speed = -1; + m_display->SetMode( play, forward, speed ); + } #else int w = Interface->Width(); int h = Interface->Height(); |