[Slim-Checkins] r10680 - /trunk/server/Slim/Player/Source.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Mon Nov 13 20:27:26 PST 2006


Author: andy
Date: Mon Nov 13 20:27:26 2006
New Revision: 10680

URL: http://svn.slimdevices.com?rev=10680&view=rev
Log:
Removing the rebuffering code, is too much overhead for displaying a message

Modified:
    trunk/server/Slim/Player/Source.pm

Modified: trunk/server/Slim/Player/Source.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Source.pm?rev=10680&r1=10679&r2=10680&view=diff
==============================================================================
--- trunk/server/Slim/Player/Source.pm (original)
+++ trunk/server/Slim/Player/Source.pm Mon Nov 13 20:27:26 2006
@@ -50,7 +50,6 @@
 	Slim::Networking::Slimproto::setEventCallback('STMu', \&underrun);
 	Slim::Networking::Slimproto::setEventCallback('STMd', \&decoderUnderrun);
 	Slim::Networking::Slimproto::setEventCallback('STMs', \&trackStartEvent);
-	Slim::Networking::Slimproto::setEventCallback('STMt', \&checkFullness);
 	Slim::Networking::Slimproto::setEventCallback('STMn', \&notSupported);
 }
 
@@ -626,45 +625,6 @@
 		$client->update();
 		
 		Slim::Control::Request::notifyFromArray($client, ['stop']);
-	}
-}
-
-sub checkFullness {
-	my $client = shift || return;
-	
-	# Softsqueeze doesn't report buffer fullness the same as hardware
-	# SB1 doesn't report output buffer fullness
-	if ( $client->isa('Slim::Player::SoftSqueeze') || $client->model() eq 'squeezebox' ) {
-		return;
-	}
-	
-	# Only do this for remote streams
-	my $url = Slim::Player::Playlist::url($client);
-	if ( !$url || !Slim::Music::Info::isRemoteURL($url) ) {
-		return;
-	}
-	
-	my $fullness = $client->outputBufferFullness();
-
-	# If the buffer is empty, rebuffer	
-	if ( !$fullness ) {
-		$log->warn("Output buffer empty, player waiting for more data");
-		
-		# We can only survive a short time without data, display "Rebuffering" while we wait
-		# The player will restart automatically when it gets some data
-		my ( $line1, $line2 );
-		
-		my $string = 'REBUFFERING';
-		$line1 = $client->string('NOW_PLAYING') . ' (' . $client->string($string) . ')';
-		if ( $client->linesPerScreen() == 1 ) {
-			$line2 = $client->string($string);
-		}
-		else {
-			my $url = Slim::Player::Playlist::url( $client, Slim::Player::Source::streamingSongIndex($client) );
-			$line2  = Slim::Music::Info::title( $url );
-		}
-		
-		$client->showBriefly( $line1, $line2, 2 ) unless $client->display->sbName();
 	}
 }
 



More information about the checkins mailing list