# HG changeset patch # User yoneda # Date 1249119311 -32400 # Node ID f40b6cc4c5873e6ae7c31efc5cc4682f407ba145 # Parent 80dc62c941851b724381e6eeb0e4536c25aa8d58 change: viewer & stream diff -r 80dc62c94185 -r f40b6cc4c587 sendstream.php --- a/sendstream.php Wed Jul 29 16:53:56 2009 +0900 +++ b/sendstream.php Sat Aug 01 18:35:11 2009 +0900 @@ -35,15 +35,15 @@ $fp = @fopen( INSTALL_PATH.$settings->spool."/".$rrec->path, "r" ); if( $fp !== false ) { - ob_start(null,4096); - $status = array(); do { - echo fread( $fp, 4096 ); + $start = microtime(true); if( feof( $fp ) ) break; - $status = ob_get_status(); + echo fread( $fp, 6292 ); + + usleep( 2000 - (int)((microtime(true) - $start) * 1000) ); } - while( $status['status'] != PHP_OUTPUT_HANDLER_END ); + while( ! connection_aborted() ); } fclose($fp); } diff -r 80dc62c94185 -r f40b6cc4c587 viewer.php --- a/viewer.php Wed Jul 29 16:53:56 2009 +0900 +++ b/viewer.php Sat Aug 01 18:35:11 2009 +0900 @@ -37,7 +37,7 @@ echo ""; echo ""; echo ""; - echo "install_url."/sendstream.php?reserve_id=".$rrec->id ."\" />"; + if( ! $rrec->complete ) echo "install_url."/sendstream.php?reserve_id=".$rrec->id ."\" />"; echo "install_url.$settings->spool."/".$rrec->path ."\" />"; echo "".$title.""; echo "".$abstract.""; @@ -49,4 +49,4 @@ catch(exception $e ) { exit( $e->getMessage() ); } -?> +?> \ No newline at end of file