Ticket #8349: stream_flv.pl.diff
File stream_flv.pl.diff, 953 bytes (added by , 14 years ago) |
---|
-
(a) /dev/stdin vs. (b) stream_flv.pl
a b 2 2 # 3 3 # MythWeb Streaming/Download module 4 4 # 5 # @url $URL $6 # @date $Date $7 # @version $Revision $8 # @author $Author $5 # @url $URL: http://svn.mythtv.org/svn/branches/release-0-23-fixes/mythplugins/mythweb/modules/stream/stream_flv.pl $ 6 # @date $Date: 2009-10-29 17:58:53 -0700 (Thu, 29 Oct 2009) $ 7 # @version $Revision: 22646 $ 8 # @author $Author: kormoc $ 9 9 # 10 10 11 11 use Math::Round qw(round_even); 12 12 13 13 our $ffmpeg_pid; 14 14 our $ffmpeg_pgid; 15 15 # Shutdown cleanup, of various types 16 $ffmpeg_pgid = setpgrp(0,0); 16 17 $SIG{'TERM'} = \&shutdown_handler; 17 18 $SIG{'PIPE'} = \&shutdown_handler; 18 19 END { 19 20 shutdown_handler(); 20 21 } 21 22 sub shutdown_handler { 22 kill( 1, $ffmpeg_pid) if ($ffmpeg_pid);23 kill(-1, $ffmpeg_pgid) if ($ffmpeg_pid); 23 24 } 24 25 25 26 # Find ffmpeg