Changeset a041c73 for gutenbach/debian


Ignore:
Timestamp:
Feb 19, 2009, 7:27:17 PM (16 years ago)
Author:
geofft <geofft>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
6d813c3
Parents:
908107d
git-author:
geofft <geofft> (02/19/09 19:27:17)
git-committer:
geofft <geofft> (02/19/09 19:27:17)
Message:

r1.25 broke playing non-files. Fix that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gutenbach/debian/lib/sipbmp3-filter

    r908107d ra041c73  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.25 2009-02-09 00:07:49 geofft Exp $
     4# $Id: sipbmp3-filter,v 1.26 2009-02-20 00:27:17 geofft Exp $
    55# $Source: /tmp/tmp.UFBNno9997/RCS/sipbmp3-filter,v $
    66#
     
    9696        printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
    9797    }
     98    my $tempdir = tempdir();
     99    my $newpath = $tempdir . '/' . basename($opts{'J'});
     100    symlink($filepath, $newpath);
     101    $filepath = $newpath;
    98102}
    99103elsif ($opts{'C'} eq 'Z') {
     
    108112    exit 0;
    109113}
     114
    110115#printf(STDERR "Job priority %s\n", $opts{'C'}) if $opts{'C'} eq 'Z';
    111116#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
    112117close(ZEPHYR);
    113118play_mplayer_audio($filepath, \%opts);
     119
     120if ($magic) {
     121    unlink($newpath);
     122    rmdir($tempdir);
     123}
    114124
    115125# Play an external stream reference
     
    208218    }
    209219   
    210     my $tempdir = tempdir();
    211     my $newpath = $tempdir . '/' . basename($opts{'J'});
    212     symlink($filepath, $newpath);
    213220    if ($pid) { #parent
    214221        # Check if there were any errors
     
    225232       
    226233        close(ZEPHYR);
    227         unlink($newpath);
    228         rmdir($tempdir);
    229234    }
    230235  else { # child
     
    235240      open(STDIN, "/dev/null");
    236241      #print STDERR Dumper([qw|/usr/bin/mplayer -nolirc -ao alsa -quiet|, $filepath]);
    237       my @args = (qw|/usr/bin/mplayer -vo null -nolirc -ao alsa -cache 512 -really-quiet|, $newpath);
     242      my @args = (qw|/usr/bin/mplayer -vo null -nolirc -ao alsa -cache 512 -really-quiet|, $filepath);
    238243      #print STDERR "About to exec: ", Dumper([@args]);
    239244      exec(@args) ||
Note: See TracChangeset for help on using the changeset viewer.