I'm proposing the following patch to get transcoding support for
ShairTunes2 plugin. This need for example in Daphile to get PCM to DSD
conversion working for the AirPlay streams.


Code:
--------------------
    
  --- ShairTunes2/AIRPLAY.pm.orig
  +++ ShairTunes2/AIRPLAY.pm
  @@ -17,7 +17,25 @@
  
  sub bufferThreshold { 20 }
  
  -sub new { undef }
  +sub new {
  +     my $class = shift;
  +     my $args  = shift;
  +
  +     my $url         = $args->{'url'};
  +     my $client      = $args->{'client'};
  +     my $transcoder  = $args->{'transcoder'};
  +
  +     my $quality = 1;
  +     if (defined($client)) {
  +             $quality = 
preferences('server')->client($client)->get('lameQuality');
  +     }
  +
  +     $url =~ s{^airplay://}{http://};
  +     my $command = Slim::Player::TranscodingHelper::tokenizeConvertCommand2( 
$transcoder, $url, $url, 1, $quality );
  +     my $self = $class->SUPER::new(undef, $command, 'local');
  +
  +     return $self;
  +}
  
  sub canDoAction {
  my ( $class, $client, $url, $action ) = @_;
  
--------------------



Kimmo
www.daphile.com
------------------------------------------------------------------------
kipeta's Profile: http://forums.slimdevices.com/member.php?userid=51816
View this thread: http://forums.slimdevices.com/showthread.php?t=103783

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to