Changeset 1721
- Timestamp:
- 2005-12-21 20:34:03 (3 years ago)
- Files:
-
- phpannodex/trunk/phpsrc/mod_annodex.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
phpannodex/trunk/phpsrc/mod_annodex.php
r1720 r1721 1 1 #!/usr/local/bin/php 2 2 <?php 3 4 3 //require_once("/var/www/phpannodex/php_tests/echo_anx.php"); 5 4 //exit; 6 define( "BUFFER_SIZE", 64);5 define( "BUFFER_SIZE", 2048); 7 6 8 7 /* Attempt to stop browsers caching the output of the script. */ … … 21 20 //echo $filename_root; 22 21 23 if( cmml_prioritised( $http_accept ) ) {22 if( false || cmml_prioritised( $http_accept ) ) { 24 23 //echo "Pretend we outputted cmml"; 25 24 output_cmml( $filename_root ); … … 94 93 95 94 $comp = "/var/www/phpannodex/php_tests/a_new_computer"; 95 $filename = $filename_root . ".ogg"; 96 96 $filename = $comp . ".ogg"; 97 $filename = $filename_root . ".ogg";98 97 99 header('Content-type: application/x-annodex'); 98 header('Content-Type: application/x-annodex'); 99 header("X-Duration: $duration"); 100 header("X-Bitrate: $bitrate"); 100 101 echo "\n"; 101 102 flush(); … … 106 107 107 108 /* This should calculate time offset */ 108 anx_write_import( $anx, $filename, NULL, NULL, 0, -1, 0 ); 109 $id = $_GET['id']; 110 $clip = $_GET['clip']; 111 112 /* Split the t URL parameter into start and end. 113 */ 114 $t = explode( '-', $_GET['t'] ); 115 if( !$t[1] ) { 116 $t[1] = -1; 117 } 118 anx_write_import( $anx, $filename, $id, $content_type, (double) $t[0], 119 (double) $t[1], (int) $flags ); 109 120 110 121 /* Output the file as a series of binary strings, the size of which