[cvs-annodex] commit (/annodex): phpannodex/trunk/phpsrc/CGI/nph-mod_annodex.php

ctford nobody at lists.annodex.net
Mon Jan 9 12:22:30 EST 2006


Update of /annodex (new revision 1758)

Modified files:
   phpannodex/trunk/phpsrc/CGI/nph-mod_annodex.php

Log Message:
Bug with removing src attribute of import elements fixed.

Modified: phpannodex/trunk/phpsrc/CGI/nph-mod_annodex.php
===================================================================
--- phpannodex/trunk/phpsrc/CGI/nph-mod_annodex.php	2006-01-09 00:23:23 UTC (rev 1757)
+++ phpannodex/trunk/phpsrc/CGI/nph-mod_annodex.php	2006-01-09 01:22:30 UTC (rev 1758)
@@ -97,12 +97,11 @@
  	 */
 	$cmml_filename = $filename_root . ".cmml";
 	
-	/* Spit it straight out. */
+	/* Spit it straight out, removing the src attribute from imports. */
 	$xml = simplexml_load_file( $cmml_filename );
-
-	//var_dump( $xml );
-	unset ($xml->stream); 
-
+	foreach( $xml->stream->import as $import ) {
+		unset( $import['src'] );
+	}
 	echo $xml->asXML();
 
 	return;
@@ -112,6 +111,7 @@
 function output_annodex( $filename_root ) {
 
 	$filename = $filename_root . ".ogg";
+	$cmml_filename = $filename_root . ".cmml";
 
 	try {
 		$anx = new AnnodexWriter();
@@ -132,8 +132,8 @@
 	$id = $query_array['id'];
 	$clip = $query_array['clip'];
 
-	$anx->import( $filename, $id, $content_type, $interval->get_start(), 
-		$interval->get_end());
+	$anx->import( $cmml_filename, $id, $content_type, 
+		$interval->get_start(), $interval->get_end());
 
 	/* Output bitrate and duration information to the headers. */
 	echo "X-Content-Bitrate-Average: ", $anx->get_bitrate(), "\n";


-- 
ctford



More information about the cvs-annodex mailing list