[cvs-annodex] commit (/annodex):
phpannodex/trunk/phpsrc/nph-mod_annodex.php
ctford
nobody at lists.annodex.net
Wed Jan 4 14:47:59 EST 2006
Update of /annodex (new revision 1740)
Modified files:
phpannodex/trunk/phpsrc/nph-mod_annodex.php
Log Message:
Outputs bitrate and duration info to the headers.
Modified: phpannodex/trunk/phpsrc/nph-mod_annodex.php
===================================================================
--- phpannodex/trunk/phpsrc/nph-mod_annodex.php 2006-01-04 03:44:41 UTC (rev 1739)
+++ phpannodex/trunk/phpsrc/nph-mod_annodex.php 2006-01-04 03:47:58 UTC (rev 1740)
@@ -3,7 +3,7 @@
require_once("AnxInterval/AnxInterval.php");
- define( "BUFFER_SIZE", 1024);
+ define( "ANX_BUFFER_SIZE", 1024);
/* Attempt to stop browsers caching the output of the script. */
//header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -95,8 +95,6 @@
start_headers();
echo "Content-Type: application/x-annodex\n";
- //echo "Content-Type: text/plain\n";
- echo "\n";
anx_init_importers( "*/*" );
$anx = anx_new( ANX_WRITE );
@@ -112,13 +110,18 @@
$clip = $query_array['clip'];
anx_write_import( $anx, $filename, $id, $content_type,
- $interval->get_start(), $interval->get_end(), (int) $flags );
+ $interval->get_start(), 57,//$interval->get_end(),
+ (int) $flags );
+ /* Output bitrate and duration information to the headers. */
+ echo "X-Bitrate: ", anx_get_bitrate( $anx ), "\n";
+ echo "X-Duration: ", anx_get_duration( $anx ), "\n";
+ echo "\n";
/* Output the file as a series of binary strings, the size of which
* is determined by BUFFER_SIZE.
*/
- while( $buffer = anx_write_output( $anx, BUFFER_SIZE ) ) {
+ while( $buffer = anx_write_output( $anx, ANX_BUFFER_SIZE ) ) {
echo $buffer;
}
@@ -127,4 +130,3 @@
return;
}
?>
-
--
ctford
More information about the cvs-annodex
mailing list