Changeset 7e27cc3
- Timestamp:
- Oct 4, 2008, 3:50:26 AM (16 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- 4cc6b4d
- Parents:
- c711ed9
- git-author:
- root <root> (10/04/08 03:50:26)
- git-committer:
- root <root> (10/04/08 03:50:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gutenbach/debian/lib/sipbmp3-filter
rc711ed9 r7e27cc3 2 2 # Play the data on STDIN as an audio file 3 3 # 4 # $Id: sipbmp3-filter,v 1.1 8 2008-09-28 23:36:26 geofft Exp $4 # $Id: sipbmp3-filter,v 1.19 2008-10-04 07:50:26 root Exp $ 5 5 # $Source: /tmp/tmp.UFBNno9997/RCS/sipbmp3-filter,v $ 6 6 # … … 82 82 } 83 83 } 84 elsif ($opts{'C'} eq 'Z') { 85 $filepath = resolve_external_reference($filepath, \%opts); 86 } 84 87 elsif (-T $filepath) { 85 $filepath = resolve_external_reference($filepath, \%opts); 86 } 88 split_playlist($filepath, \%opts); 89 close(ZEPHYR); 90 exit 0; 91 } 92 #printf(STDERR Dumper(\%opts)); 93 #printf(STDERR "Job priority %s\n", $opts{'C'}) if $opts{'C'} eq 'Z'; 94 #printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A')); 87 95 close(ZEPHYR); 88 96 play_mplayer_audio($filepath, \%opts); … … 129 137 } 130 138 139 sub split_playlist { 140 my ($file, $opts) = @_; 141 142 my $i = 0; 143 144 while (<STDIN>) { 145 chomp; 146 if (/^([^#]\S+)/) { 147 printf (STDERR "Found line: %s\n", $_); 148 open(LPR, "|-", qw/mit-lpr -Psipbmp3@localhost -CZ/, '-J'.$opts->{J}); 149 print LPR $1; 150 close(LPR); 151 $i++; 152 } 153 } 154 printf(ZEPHYR "Playlist containing %d valid entries, split into separate jobs.\n", $i); 155 } 156 131 157 # Process a Shoutcast playlist 132 158 # get_shoutcast(URI)
Note: See TracChangeset
for help on using the changeset viewer.