Changeset b011fb0


Ignore:
Timestamp:
Oct 14, 2008, 6:20:50 AM (16 years ago)
Author:
quentin <quentin>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
de4ce86
Parents:
73cfabc
git-author:
quentin <quentin> (10/14/08 06:20:50)
git-committer:
quentin <quentin> (10/14/08 06:20:50)
Message:

Improve URL streaming support

File:
1 edited

Legend:

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

    r73cfabc rb011fb0  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.22 2008-10-07 00:20:36 quentin Exp $
     4# $Id: sipbmp3-filter,v 1.23 2008-10-14 10:20:50 quentin Exp $
    55# $Source: /tmp/tmp.UFBNno9997/RCS/sipbmp3-filter,v $
    66#
     
    7474@ARGV = @NEWARGV;
    7575
     76printf(STDERR Dumper(\%opts));
     77
    7678# Status messages at start of playback
    7779open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i ' .
     
    9597elsif ($opts{'C'} eq 'Z') {
    9698    $filepath = resolve_external_reference($filepath, \%opts);
     99    print STDERR "Resolved external reference to $filepath\n";
    97100    printf(ZEPHYR "%s\n", $filepath);
     101    close(ZEPHYR);
    98102}
    99103elsif (-T $filepath) {
     
    102106    exit 0;
    103107}
    104 printf(STDERR Dumper(\%opts));
    105108#printf(STDERR "Job priority %s\n", $opts{'C'}) if $opts{'C'} eq 'Z';
    106109#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
     
    129132            print ZEPHYR
    130133                "Unknown Content-Type $contenttype for URI $uri\n";
    131             close(ZEPHYR);
    132134        }
    133135    } else {
    134136        print ZEPHYR "Couldn't read URI for external reference\n";
    135         close(ZEPHYR);
    136137        return $filepath;
    137138    }
     
    227228      open(STDIN, "/dev/null");
    228229      #print STDERR Dumper([qw|/usr/bin/mplayer -nolirc -ao alsa -quiet|, $filepath]);
    229       exec(qw|/usr/bin/mplayer -nolirc -ao alsa -really-quiet|, $filepath) ||
     230      my @args = (qw|/usr/bin/mplayer -vo null -nolirc -ao alsa -cache 512 -really-quiet|, $filepath);
     231      #print STDERR "About to exec: ", Dumper([@args]);
     232      exec(@args) ||
    230233          die "Couldn't exec";
    231234  }
Note: See TracChangeset for help on using the changeset viewer.