Permalink
Browse files

Disable bootstrap.js (xpcom cannot be loaded!)

  • Loading branch information...
1 parent 7ab07cd commit 1e2c6dde0a15244db9e6c9f570f6b3a9e4d04098 @anantn anantn committed Oct 11, 2010
@@ -35,7 +35,38 @@
* ***** END LICENSE BLOCK ***** */
const Cu = Components.utils;
-Cu.import("resource://gre/modules/AddonManager.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+const Cc = Components.classes;
+const Cm = Components.manager;
+const Ci = Components.interfaces;
+
+function startup(data, reason)
+{
+ let cr = Cm.QueryInterface(Ci.nsIComponentRegistrar);
+ let pt = data.installPath.path;
+
+ let fi = Cc["@mozilla.org/file/local;1"]
+ .createInstance(Ci.nsILocalFile);
+ fi.initWithPath(pt);
+
+ /*
+ fi.append("components");
+ fi.append("video");
+ fi.append("libjetpackvideo.dylib");
+ */
+
+ /* FIXME: This is MAC ONLY! i386 ONLY! WTB more cross-platformyness! */
+ let cr = Cm.QueryInterface(Ci.nsIComponentRegistrar);
+ cr.autoRegister(fi);
+
+ dump(cr.isContractIDRegistered("@labs.mozilla.com/video/recorder;1"));
+
+ //let cid = "@labs.mozilla.com/video/recorder;1";
+ //let vid = Cm.getClassObjectByContractID(cid, Ci.nsISupports);
+ //dump(vid+"\n");
+}
+
+function shutdown(data, reason)
+{
+ dump("bye!\n");
+}
View
@@ -0,0 +1,3 @@
+interfaces components/video/IVideoRecorder.xpt
+binary-component components/video/libjetpackvideo.dylib ABI=Darwin_x86-gcc3
+#contract @labs.mozilla.com/video/recorder;1 {b3ee26b3-e935-4c56-83a1-5e8855d7114b}
@@ -41,6 +41,6 @@
[scriptable, uuid(a369b4f1-40b7-4019-b5e8-4ac8575f0f24)]
interface IVideoRecorder : nsISupports
{
- ACString startRecordToFile(in nsIDOMCanvasRenderingContext2D ctx);
- void stop();
+ ACString start(in nsIDOMCanvasRenderingContext2D ctx);
+ void stop();
};
@@ -6,7 +6,7 @@ ifeq ($(sys), Darwin)
compiler = gcc
cxx = g++
so = dylib
- cppflags += -dynamiclib -DDEBUG
+ cppflags += -dynamiclib -DDEBUG -DMOZ_NO_MOZALLOC
else
$(error Sorry, your os is unknown/unsupported: $(sys))
endif
@@ -58,12 +58,10 @@ headers = -I. \
-I$(sdkdir)/include \
-I$(sdkdir)/include/system_wrappers \
-I$(sdkdir)/include/xpcom \
- -I$(sdkdir)/include/gfx \
-I$(sdkdir)/include/string \
-I$(sdkdir)/include/content \
-I$(sdkdir)/include/dom \
-I$(sdkdir)/include/nspr \
- -I$(sdkdir)/include/thebes \
-I$(sdkdir)/sdk/include \
-I/opt/local/include
@@ -142,7 +142,7 @@ MakeRandomString(char *buf, PRInt32 bufLen)
PRInt32 i;
for (i=0;i<bufLen;i++) {
*buf++ = table[rand()%TABLE_SIZE];
- }
+ }
*buf = 0;
}
@@ -172,7 +172,7 @@ EscapeBackslash(nsACString& str)
}
int
-VideoRecorder::RecordToFileCallback(vidcap_src *src, void *data,
+VideoRecorder::Callback(vidcap_src *src, void *data,
struct vidcap_capture_info *video)
{
nsresult rv;
@@ -347,7 +347,7 @@ VideoRecorder::SetupOggTheora(nsACString& file)
* Start recording to file
*/
NS_IMETHODIMP
-VideoRecorder::StartRecordToFile(
+VideoRecorder::Start(
nsIDOMCanvasRenderingContext2D *ctx,
nsACString &file
)
@@ -385,7 +385,7 @@ VideoRecorder::StartRecordToFile(
return NS_ERROR_FAILURE;
}
- if (vidcap_src_capture_start(source, this->RecordToFileCallback, this)) {
+ if (vidcap_src_capture_start(source, VideoRecorder::Callback, this)) {
fprintf(stderr, "Failed vidcap_src_capture_start()\n");
return NS_ERROR_FAILURE;
}
@@ -91,7 +91,7 @@ class VideoRecorder : public IVideoRecorder
protected:
nsresult SetupOggTheora(nsACString& file);
- static int RecordToFileCallback(vidcap_src *src,
+ static int Callback(vidcap_src *src,
void *data, struct vidcap_capture_info *video);
};
View
@@ -11,7 +11,8 @@
<name>Mozilla Labs: Rainbow</name>
<version>0.0.1</version>
- <bootstrap>true</bootstrap>
+ <!--<bootstrap>true</bootstrap>
+ <unpack>true</unpack>-->
<type>2</type>
<targetApplication>

0 comments on commit 1e2c6dd

Please sign in to comment.