This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch gzng in repository mteleplayer. commit cb82132d62a46f7bf91601e1f7f5ad0bba7eba9a Author: gznget <opensource@gznianguan.com> Date: Sat Jun 28 14:53:19 2014 +0200 Minor cleanup and adding more cache info handeling on both sides of the wormhole --- .../mteleplayer/bin/mteleplayer_clientside | 8 ++++-- serverside/bin/mteleplayer | 29 +++++++++++++++++--- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside b/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside index c972604..561ef19 100755 --- a/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside +++ b/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside @@ -495,9 +495,11 @@ sub watch_mplayerOutput { $mpState{'mediaFileName'} = $1;# print "File: $1\n"; } elsif ($line =~ /^ANS\_LENGTH\=([\d\.]*)$/) { $mpState{'mediaLength'} = $1; - } elsif ($line =~ /=== FIRST LOOP ===$/) { - } elsif ($line =~ /=== MPLOOP NEW LOOP ===$/) { - appCOM("GIVEMEFIRSTMEDIATOINIT"); + } elsif ($line =~ /^Cache fill:([\ \d\.\%]*)\((\d*) bytes\)/) { + appDBugLog("Cache fill! [$1] [$2]"); + my $cacheP = $1;$cacheP =~ s/\ //g; + my $cacheB = $2;$cacheB =~ s/\D//g; + appCOM("CACHING|$cacheP|$cacheB|"); } elsif ($line =~ /===== PAUSE =====/) { doPauseStuff("pause"); } elsif (($line =~ /^A:/) or ($line =~ /^V:/)) { diff --git a/serverside/bin/mteleplayer b/serverside/bin/mteleplayer index 70cf9ec..d3174ea 100755 --- a/serverside/bin/mteleplayer +++ b/serverside/bin/mteleplayer @@ -74,7 +74,7 @@ our %PRESISTENT;$PRESISTENT{'AudioVolume'} = 50; our %sstatusi;$sstatusi{'sockState'} = 0;$sstatusi{'sockRetryCnt'} = 0;$sstatusi{'runState'} = "I";$sstatusi{'X2GoResized'} = 0; $sstatusi{'lastCOMtime'} = (time()+2);$sstatusi{'remoteInitCnt'} = 0; -my %PlayerStatus;$PlayerStatus{'timePos'} = 0;$PlayerStatus{'timeLength'} = 0;$PlayerStatus{'paused'} = 0;$PlayerStatus{'stoped'} = 0;$PlayerStatus{'muted'} = 0;$PlayerStatus{'volume'} = 100; +my %PlayerStatus;$PlayerStatus{'timePos'} = 0;$PlayerStatus{'timeLength'} = 0;$PlayerStatus{'paused'} = 0;$PlayerStatus{'stoped'} = 0;$PlayerStatus{'muted'} = 0;$PlayerStatus{'volume'} = 100;$PlayerStatus{'caching'} = 0; $PlayerStatus{'seekTimeLag'} = 0;$PlayerStatus{'initialMediaID'} = 0;$PlayerStatus{'fullscreen'} = 0; our ($UserName,$UserHome,$X2GoSID,$X2GoSesHome,$X2GoTKSHome,$TeKiLSockPath) = getBasicServersideInfo(); my $LocalSocket; @@ -204,8 +204,15 @@ sub initMainWindow { $GTKS{'mTPeyesoreIMG'} = Gtk2::Image->new_from_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ("$theSHAREDIR/eyesore_t.png")); $GTKS{'mTPeyesoreIMG'}->set_size_request(254,160); - - + #################################################################### + # Player status texts etc.. + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'} = Gtk2::EventBox->new; + $GTKS{'INFO'}{'PLYRSTAT'}{'LABEL'} = Gtk2::Label->new("LABEL TEXT"); + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->add($GTKS{'INFO'}{'PLYRSTAT'}{'LABEL'}); + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->modify_bg('normal',Gtk2::Gdk::Color->new(0x0000, 0x0000, 0x0000)); + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->modify_fg('normal',Gtk2::Gdk::Color->new(0xffff, 0xffff, 0xffff)); + # Player status texts etc.. + #################################################################### $mTPMainMediaEBOX = Gtk2::EventBox->new; $mTPMainMediaEBOX->set_size_request(400,300); $mTPMainMediaEBOX->modify_bg('normal',Gtk2::Gdk::Color->new(0x0000, 0x0000, 0x0000)); @@ -283,6 +290,7 @@ sub initMainWindow { # $GTKS{'CTRLS'}{'CONTROLSTRIP'}{'MainHBOX'}->show_all; $GTKS{'MainVBox'}->pack_start($mTPMainMediaEBOX,TRUE, TRUE, 0); + $GTKS{'MainVBox'}->pack_start($GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}, FALSE, FALSE, 0); $GTKS{'MainVBox'}->pack_start($GTKS{'CTRLS'}{'MAIN'}, FALSE, FALSE, 0); $GTKS{'CTRLS'}{'MainVBox'}->pack_start($MTime_HBox, FALSE, FALSE, 0); $GTKS{'CTRLS'}{'MainVBox'}->pack_start($GTKS{'CTRLS'}{'CONTROLSTRIP'}{'MainHBOX'},FALSE, FALSE, 2); @@ -292,7 +300,7 @@ sub initMainWindow { $GTKS{'MainAppWindow'}->signal_connect(event => \&handleMainWindowEvent); $GTKS{'MainAppWindow'}->show_all; - + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->hide_all; } @@ -507,6 +515,15 @@ sub handleTheLocalSocket { toggleBLACKOUT(0); appCOM("SUP"); } + + if ($1 =~ /^CACHING\|([\d\.\%]*)\|.*/) { + $GTKS{'INFO'}{'PLYRSTAT'}{'LABEL'}->set_text("Caching Media: $1"); + if ($PlayerStatus{'caching'} ne 1) { + $PlayerStatus{'caching'} = 1; + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->show_all; + } + + } if ($1 =~ /^PAUSED\|(\d)\|/) { if ($1 eq 0) {stateChangePAUSED(0);} @@ -515,6 +532,10 @@ sub handleTheLocalSocket { #appDBugLog("SD:$1:SD"); if ($1 =~ /^UPDATE\|TIME\|(\d*)\|(\d*)\|$/) { + if ($PlayerStatus{'caching'} eq 1) { + $PlayerStatus{'caching'} = 0; + $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->hide_all; + } doUpdateTimeLine($1,$2); $PlayerStatus{'currentMediaSeek'} = $1; toggleBLACKOUT(0); -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/mteleplayer.git