[xiph-commits] r15098 - in trunk/oggPusher: . firefox-extension/chrome/content

nithin at svn.xiph.org nithin at svn.xiph.org
Sat Jul 5 09:30:08 PDT 2008


Author: nithin
Date: 2008-07-05 09:30:07 -0700 (Sat, 05 Jul 2008)
New Revision: 15098

Added:
   trunk/oggPusher/firefox-extension/chrome/content/sample
Modified:
   trunk/oggPusher/firefox-extension/chrome/content/op_Window.js
   trunk/oggPusher/oggPusher.xpi
Log:
Conversion happening through a shell script

Modified: trunk/oggPusher/firefox-extension/chrome/content/op_Window.js
===================================================================
--- trunk/oggPusher/firefox-extension/chrome/content/op_Window.js	2008-07-05 08:13:56 UTC (rev 15097)
+++ trunk/oggPusher/firefox-extension/chrome/content/op_Window.js	2008-07-05 16:30:07 UTC (rev 15098)
@@ -1,10 +1,10 @@
 var opwindowCommon={leafName:null, timer:null,
 	openFileWindowDialog:function()
-        {
+    {
 		//alert("Inside openFileWindowDialog");
 		try{
                 	const nsIFilePicker = Components.interfaces.nsIFilePicker;
-	                var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
+			var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
         	        fp.init(window, "Choose a File", nsIFilePicker.modeOpen);
                 	fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText);
 		}	
@@ -20,9 +20,9 @@
 			this.leafName = fp.file.leafName;
 			parent.document.getElementById("file-path").value = path;
                 }
-         },
-	 chooseDestination:function()
-	 {
+    },
+	chooseDestination:function()
+	{
 		try{
 			const nsIFilePicker = Components.interfaces.nsIFilePicker;
 			var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
@@ -39,18 +39,17 @@
 			var path = fp.file.path;
 			parent.document.getElementById("target-path").value = path;
 		}
-	 },
-       	 processHandler:function(process){
+	},
+    processHandler:function(process){
                 if(process.exitValue!= -1){
                         alert(process.exitValue+"Inside the processHandler");
                         this.timer = setTimeout( function(el) { return function(){el.processHandler(process);}}(this), 10000 );
                 }else{
                         alert("done with transcoding");
                 }
-         },
-
-	 convertToTheora:function()
-	 {
+    },
+	convertToTheora:function()
+	{
 		var data="";
 		try{
 			// the extension's id from install.rdf
@@ -58,7 +57,7 @@
 			 var em = Components.classes["@mozilla.org/extensions/manager;1"].
 			          getService(Components.interfaces.nsIExtensionManager);
 			 // the path may use forward slash ("/") as the delimiter
-			 var file = em.getInstallLocation(MY_ID).getItemFile(MY_ID, "chrome/content/ffmpeg2theora-0.21.linux32");
+			 var file = em.getInstallLocation(MY_ID).getItemFile(MY_ID, "chrome/content/sample");
 			  // returns nsIFile for the extension's install.rdf
 			var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
 			process.init(file);
@@ -66,29 +65,27 @@
 			alert(file.permissions);
 			file.permissions = 0755;
 			alert(file.permissions);
-	 		var args_list = new Array(1);
-                	args_list[0] =  " -o "+ document.getElementById("target-path").value+"/"+this.leafName+".ogg " + document.getElementById("file-path").value ;
-			alert(args_list[0]);
+	 		var args_list = new Array(3);
+                	args_list[0] =  " -o "
+			args_list[1] = document.getElementById("target-path").value+"/"+this.leafName+".ogg " 
+			args_list[2] = document.getElementById("file-path").value ;
+			//alert(args_list[0]);
 	                alert("Before process.run");
         	        alert(process.run(false,args_list, args_list.length));
 			//alert("Pid "+process.pid+" exit value "+process.exitValue+" Location "+process.location+" processName "+process.processName);
 			//alert("After the process.run");
 			//this.timer = setTimeout( function(){this.processHandler(process);}, 10000 );
 			this.timer = setTimeout( function(el) { return function(){el.processHandler(process);}}(this), 10000 );
-			
-
-
-		
-		}
+    	}
 		catch(err){
 			alert(err);
 			return;
 		}
 				
 		
- 	 },
-	 myComponentTestGo:function()
-	 {
+ 	},
+	myComponentTestGo:function()
+	{
 		//alert("Start of MyComponentTestGo()");
         	try {
                		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

Added: trunk/oggPusher/firefox-extension/chrome/content/sample
===================================================================
--- trunk/oggPusher/firefox-extension/chrome/content/sample	                        (rev 0)
+++ trunk/oggPusher/firefox-extension/chrome/content/sample	2008-07-05 16:30:07 UTC (rev 15098)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+base=`dirname $0`
+chmod 755 $base/ffmpeg2theora-0.21.linux32
+$base/ffmpeg2theora-0.21.linux32 $@ > /tmp/testit 2>&1
+
+#echo $@ > /tmp/test1
+#echo $1 > /tmp/test2
+#echo $2 > /tmp/test3
+#echo $3 > /tmp/test4


Property changes on: trunk/oggPusher/firefox-extension/chrome/content/sample
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/oggPusher/oggPusher.xpi
===================================================================
(Binary files differ)



More information about the commits mailing list