Changeset c631d1a for gutenbach/debian/lib/gutenbach-filter
- Timestamp:
- Nov 25, 2009, 2:10:09 AM (15 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- af7788c
- Parents:
- 331360d
- git-author:
- Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
gutenbach/debian/lib/gutenbach-filter
r331360d rc631d1a 1 #!/usr/ bin/perl1 #!/usr/athena/bin/perl 2 2 # Play the data on STDIN as an audio file 3 3 # 4 # $Id: sipbmp3-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $5 # $Source: /usr/local/bin/RCS/ sipbmp3-filter,v $4 # $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $ 5 # $Source: /usr/local/bin/RCS/gutenbach-filter,v $ 6 6 # 7 7 # TODO … … 23 23 use IPC::Open2; 24 24 25 my $zephyr_class = "lprmp3"; 26 my $host = "hostname"; 27 my $queue = "printername"; 25 my $zephyr_class = "gutenbach"; 26 my $host = `hostname`; 27 my $queue = "gutenbach"; 28 my $mixer = "PCM"; 29 my $channel = "Front Left"; 28 30 29 31 # Configuration 30 my $config_file = "/usr/lib/ sipbmp3/config/sipbmp3-filter-config.pl";32 my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl"; 31 33 if (-r $config_file) { 32 34 # Inline the configuration file … … 40 42 41 43 close(STDERR); 42 open(STDERR, ">>", "/tmp/ sipbmp3.log") or warn "Couldn't open log: $!";44 open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!"; 43 45 44 46 $ENV{"TERM"}="vt100"; … … 95 97 # Status messages at start of playback 96 98 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i ' . 97 $queue.'@'.$host.' -s " SIPB LPR music spooler"');99 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 98 100 99 101 # For the Now Playing remctl command 100 open(STATUS, '>', '/var/run/ sipbmp3/status') or die("Can't open status file /var/run/sipbmp3/status");102 open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status"); 101 103 102 104 print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n"); … … 106 108 sub clear_status { 107 109 # Possible race condition if the previous status is still going 108 open(STA, '>', '/var/run/ sipbmp3/status');110 open(STA, '>', '/var/run/gutenbach/status'); 109 111 close(STA); 110 112 open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '. 111 $queue.'@'.$host.' -s " SIPB LPR music spooler"');113 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 112 114 print(ZEPH "Playback aborted.\n"); 113 115 close(ZEPH); … … 266 268 # Prepare to write status: 267 269 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '.$zephyr_class.' -i ' . 268 $queue.'@'.$host.' -s " SIPB LPR music spooler"');270 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 269 271 270 272 # fork for mpg123 … … 290 292 291 293 close(ZEPHYR); 292 open(STATUS, '>', '/var/run/ sipbmp3/status');294 open(STATUS, '>', '/var/run/gutenbach/status'); 293 295 close(STATUS); 294 296 }
Note: See TracChangeset
for help on using the changeset viewer.