Commits

sunhaitao committed 208d3a9

Updated the mechanism to get JSContext objects. Made this extension work on Gecko 7 to 11.

Comments (0)

Files changed (41)

Components/BackEnds/AudioInput/AudioInput.vcproj

 	ProjectGUID="{9B6B3872-09CD-476D-AD47-CE20DE711849}"
 	RootNamespace="OpenAlAudioInputBackEnd"
 	Keyword="Win32Proj"
+	AssemblyReferenceSearchPaths=""D:\Works\Mozilla\mozilla-central\""
 	>
 	<Platforms>
 		<Platform

Components/BackEnds/AudioInput/AudioInputBackEnd.h

-/*
- * DO NOT EDIT.  THIS FILE IS GENERATED FROM AudioInputBackEnd.idl
- */
-
-#ifndef __gen_AudioInputBackEnd_h__
-#define __gen_AudioInputBackEnd_h__
-
-
-#ifndef __gen_nsISupports_h__
-#include "nsISupports.h"
-#endif
-
-#ifndef __gen_nsIArray_h__
-#include "nsIArray.h"
-#endif
-
-/* For IDL files that don't want to include root IDL files. */
-#ifndef NS_NO_VTABLE
-#define NS_NO_VTABLE
-#endif
-#include "jsapi.h"
-
-/* starting interface:    dtIAudioInputDevice */
-#define DTIAUDIOINPUTDEVICE_IID_STR "8ddb8b12-7235-4140-9d0b-0120c27ea8aa"
-
-#define DTIAUDIOINPUTDEVICE_IID \
-  {0x8ddb8b12, 0x7235, 0x4140, \
-    { 0x9d, 0x0b, 0x01, 0x20, 0xc2, 0x7e, 0xa8, 0xaa }}
-
-class NS_NO_VTABLE NS_SCRIPTABLE dtIAudioInputDevice : public nsISupports {
- public: 
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(DTIAUDIOINPUTDEVICE_IID)
-
-  /* readonly attribute boolean taken; */
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) = 0;
-
-  /* readonly attribute AString name; */
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
-
-  /* void open (in unsigned long freq); */
-  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) = 0;
-
-  /* void start (); */
-  NS_SCRIPTABLE NS_IMETHOD Start(void) = 0;
-
-  /* boolean isReady (); */
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) = 0;
-
-  /* jsval fetch (); */
-  NS_SCRIPTABLE NS_IMETHOD Fetch(jsval *_retval NS_OUTPARAM) = 0;
-
-  /* void pause (); */
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
-
-  /* boolean close (); */
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) = 0;
-
-};
-
-  NS_DEFINE_STATIC_IID_ACCESSOR(dtIAudioInputDevice, DTIAUDIOINPUTDEVICE_IID)
-
-/* Use this macro when declaring classes that implement this interface. */
-#define NS_DECL_DTIAUDIOINPUTDEVICE \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken); \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
-  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq); \
-  NS_SCRIPTABLE NS_IMETHOD Start(void); \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM); \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(jsval *_retval NS_OUTPARAM); \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void); \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM); 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object. */
-#define NS_FORWARD_DTIAUDIOINPUTDEVICE(_to) \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return _to GetTaken(aTaken); } \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
-  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) { return _to Open(freq); } \
-  NS_SCRIPTABLE NS_IMETHOD Start(void) { return _to Start(); } \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return _to IsReady(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(jsval *_retval NS_OUTPARAM) { return _to Fetch(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return _to Close(_retval); } 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
-#define NS_FORWARD_SAFE_DTIAUDIOINPUTDEVICE(_to) \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTaken(aTaken); } \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
-  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(freq); } \
-  NS_SCRIPTABLE NS_IMETHOD Start(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(); } \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReady(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Fetch(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(_retval); } 
-
-#if 0
-/* Use the code below as a template for the implementation class for this interface. */
-
-/* Header file */
-class dtAudioInputDevice : public dtIAudioInputDevice
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_DTIAUDIOINPUTDEVICE
-
-  dtAudioInputDevice();
-
-private:
-  ~dtAudioInputDevice();
-
-protected:
-  /* additional members */
-};
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(dtAudioInputDevice, dtIAudioInputDevice)
-
-dtAudioInputDevice::dtAudioInputDevice()
-{
-  /* member initializers and constructor code */
-}
-
-dtAudioInputDevice::~dtAudioInputDevice()
-{
-  /* destructor code */
-}
-
-/* readonly attribute boolean taken; */
-NS_IMETHODIMP dtAudioInputDevice::GetTaken(PRBool *aTaken)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* readonly attribute AString name; */
-NS_IMETHODIMP dtAudioInputDevice::GetName(nsAString & aName)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void open (in unsigned long freq); */
-NS_IMETHODIMP dtAudioInputDevice::Open(PRUint32 freq)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void start (); */
-NS_IMETHODIMP dtAudioInputDevice::Start()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* boolean isReady (); */
-NS_IMETHODIMP dtAudioInputDevice::IsReady(PRBool *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* jsval fetch (); */
-NS_IMETHODIMP dtAudioInputDevice::Fetch(jsval *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void pause (); */
-NS_IMETHODIMP dtAudioInputDevice::Pause()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* boolean close (); */
-NS_IMETHODIMP dtAudioInputDevice::Close(PRBool *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* End of implementation class template. */
-#endif
-
-
-/* starting interface:    dtIAudioInputBackEnd */
-#define DTIAUDIOINPUTBACKEND_IID_STR "03c7914e-8ef0-4191-aacc-675f9afe2bc1"
-
-#define DTIAUDIOINPUTBACKEND_IID \
-  {0x03c7914e, 0x8ef0, 0x4191, \
-    { 0xaa, 0xcc, 0x67, 0x5f, 0x9a, 0xfe, 0x2b, 0xc1 }}
-
-class NS_NO_VTABLE NS_SCRIPTABLE dtIAudioInputBackEnd : public nsISupports {
- public: 
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(DTIAUDIOINPUTBACKEND_IID)
-
-  /* nsIArray listDevices (); */
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) = 0;
-
-};
-
-  NS_DEFINE_STATIC_IID_ACCESSOR(dtIAudioInputBackEnd, DTIAUDIOINPUTBACKEND_IID)
-
-/* Use this macro when declaring classes that implement this interface. */
-#define NS_DECL_DTIAUDIOINPUTBACKEND \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM); 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object. */
-#define NS_FORWARD_DTIAUDIOINPUTBACKEND(_to) \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return _to ListDevices(_retval); } 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
-#define NS_FORWARD_SAFE_DTIAUDIOINPUTBACKEND(_to) \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ListDevices(_retval); } 
-
-#if 0
-/* Use the code below as a template for the implementation class for this interface. */
-
-/* Header file */
-class dtAudioInputBackEnd : public dtIAudioInputBackEnd
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_DTIAUDIOINPUTBACKEND
-
-  dtAudioInputBackEnd();
-
-private:
-  ~dtAudioInputBackEnd();
-
-protected:
-  /* additional members */
-};
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(dtAudioInputBackEnd, dtIAudioInputBackEnd)
-
-dtAudioInputBackEnd::dtAudioInputBackEnd()
-{
-  /* member initializers and constructor code */
-}
-
-dtAudioInputBackEnd::~dtAudioInputBackEnd()
-{
-  /* destructor code */
-}
-
-/* nsIArray listDevices (); */
-NS_IMETHODIMP dtAudioInputBackEnd::ListDevices(nsIArray **_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* End of implementation class template. */
-#endif
-
-
-#endif /* __gen_AudioInputBackEnd_h__ */
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM AudioInputBackEnd.idl
+ */
+
+#ifndef __gen_AudioInputBackEnd_h__
+#define __gen_AudioInputBackEnd_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+#ifndef __gen_nsIArray_h__
+#include "nsIArray.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+#include "jsapi.h"
+
+/* starting interface:    dtIAudioInputDevice */
+#define DTIAUDIOINPUTDEVICE_IID_STR "8ddb8b12-7235-4140-9d0b-0120c27ea8aa"
+
+#define DTIAUDIOINPUTDEVICE_IID \
+  {0x8ddb8b12, 0x7235, 0x4140, \
+    { 0x9d, 0x0b, 0x01, 0x20, 0xc2, 0x7e, 0xa8, 0xaa }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE dtIAudioInputDevice : public nsISupports {
+ public: 
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(DTIAUDIOINPUTDEVICE_IID)
+
+  /* readonly attribute boolean taken; */
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) = 0;
+
+  /* readonly attribute AString name; */
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
+
+  /* void open (in unsigned long freq); */
+  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) = 0;
+
+  /* void start (); */
+  NS_SCRIPTABLE NS_IMETHOD Start(void) = 0;
+
+  /* boolean isReady (); */
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) = 0;
+
+  /* [implicit_jscontext] jsval fetch (); */
+  NS_SCRIPTABLE NS_IMETHOD Fetch(JSContext *cx, jsval *_retval NS_OUTPARAM) = 0;
+
+  /* void pause (); */
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
+
+  /* boolean close (); */
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) = 0;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(dtIAudioInputDevice, DTIAUDIOINPUTDEVICE_IID)
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_DTIAUDIOINPUTDEVICE \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken); \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
+  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq); \
+  NS_SCRIPTABLE NS_IMETHOD Start(void); \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM); \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(JSContext *cx, jsval *_retval NS_OUTPARAM); \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void); \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM); 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_DTIAUDIOINPUTDEVICE(_to) \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return _to GetTaken(aTaken); } \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
+  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) { return _to Open(freq); } \
+  NS_SCRIPTABLE NS_IMETHOD Start(void) { return _to Start(); } \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return _to IsReady(_retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(JSContext *cx, jsval *_retval NS_OUTPARAM) { return _to Fetch(cx, _retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return _to Close(_retval); } 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_DTIAUDIOINPUTDEVICE(_to) \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTaken(aTaken); } \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
+  NS_SCRIPTABLE NS_IMETHOD Open(PRUint32 freq) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(freq); } \
+  NS_SCRIPTABLE NS_IMETHOD Start(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(); } \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReady(_retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(JSContext *cx, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Fetch(cx, _retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(_retval); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class dtAudioInputDevice : public dtIAudioInputDevice
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_DTIAUDIOINPUTDEVICE
+
+  dtAudioInputDevice();
+
+private:
+  ~dtAudioInputDevice();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(dtAudioInputDevice, dtIAudioInputDevice)
+
+dtAudioInputDevice::dtAudioInputDevice()
+{
+  /* member initializers and constructor code */
+}
+
+dtAudioInputDevice::~dtAudioInputDevice()
+{
+  /* destructor code */
+}
+
+/* readonly attribute boolean taken; */
+NS_IMETHODIMP dtAudioInputDevice::GetTaken(PRBool *aTaken)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute AString name; */
+NS_IMETHODIMP dtAudioInputDevice::GetName(nsAString & aName)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void open (in unsigned long freq); */
+NS_IMETHODIMP dtAudioInputDevice::Open(PRUint32 freq)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void start (); */
+NS_IMETHODIMP dtAudioInputDevice::Start()
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* boolean isReady (); */
+NS_IMETHODIMP dtAudioInputDevice::IsReady(PRBool *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* [implicit_jscontext] jsval fetch (); */
+NS_IMETHODIMP dtAudioInputDevice::Fetch(JSContext *cx, jsval *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void pause (); */
+NS_IMETHODIMP dtAudioInputDevice::Pause()
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* boolean close (); */
+NS_IMETHODIMP dtAudioInputDevice::Close(PRBool *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+/* starting interface:    dtIAudioInputBackEnd */
+#define DTIAUDIOINPUTBACKEND_IID_STR "03c7914e-8ef0-4191-aacc-675f9afe2bc1"
+
+#define DTIAUDIOINPUTBACKEND_IID \
+  {0x03c7914e, 0x8ef0, 0x4191, \
+    { 0xaa, 0xcc, 0x67, 0x5f, 0x9a, 0xfe, 0x2b, 0xc1 }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE dtIAudioInputBackEnd : public nsISupports {
+ public: 
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(DTIAUDIOINPUTBACKEND_IID)
+
+  /* nsIArray listDevices (); */
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) = 0;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(dtIAudioInputBackEnd, DTIAUDIOINPUTBACKEND_IID)
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_DTIAUDIOINPUTBACKEND \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM); 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_DTIAUDIOINPUTBACKEND(_to) \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return _to ListDevices(_retval); } 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_DTIAUDIOINPUTBACKEND(_to) \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ListDevices(_retval); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class dtAudioInputBackEnd : public dtIAudioInputBackEnd
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_DTIAUDIOINPUTBACKEND
+
+  dtAudioInputBackEnd();
+
+private:
+  ~dtAudioInputBackEnd();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(dtAudioInputBackEnd, dtIAudioInputBackEnd)
+
+dtAudioInputBackEnd::dtAudioInputBackEnd()
+{
+  /* member initializers and constructor code */
+}
+
+dtAudioInputBackEnd::~dtAudioInputBackEnd()
+{
+  /* destructor code */
+}
+
+/* nsIArray listDevices (); */
+NS_IMETHODIMP dtAudioInputBackEnd::ListDevices(nsIArray **_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_AudioInputBackEnd_h__ */

Components/BackEnds/AudioInput/AudioInputBackEnd.idl

   void open(in unsigned long freq);
   void start();
   boolean isReady();
-  jsval /* ArrayBuffer */ fetch();
+  [implicit_jscontext] jsval /* ArrayBuffer */ fetch();
   void pause();
   boolean close();
 };

Components/BackEnds/AudioInput/AudioInputBackEnd.xpt

Binary file modified.

Components/BackEnds/AudioInput/OpenAlAudioInputBackEnd.cpp

 }
 
 /* jsval fetch (); */
-NS_IMETHODIMP OpenAlAudioInputDevice::Fetch(jsval* _retval NS_OUTPARAM)
+NS_IMETHODIMP OpenAlAudioInputDevice::Fetch(JSContext *cx, jsval* _retval NS_OUTPARAM)
 {
   if (!mDeviceHandle) { return NS_ERROR_NOT_INITIALIZED; }
 
-  JSContext* cx = GetCurrentJSContext();
-  if (!cx) return NS_ERROR_UNEXPECTED;
+  //JSContext* cx = GetCurrentJSContext();
+  //if (!cx) return NS_ERROR_UNEXPECTED;
 
   JSObject* objBuffer = js_CreateArrayBuffer(cx, this->mWindowSize * 2);
   js::AutoObjectRooter rb(cx, objBuffer);

Components/BackEnds/Commons/Commons.vcproj

 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="$(XR_SDK_INC)"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_JS_GETARRAYBUFFERDATA"
 				RuntimeLibrary="1"
 				TreatWChar_tAsBuiltInType="false"
 				UsePrecompiledHeader="0"

Components/BackEnds/Commons/JsUtils.cpp

 JSContext* GetCurrentJSContext()
 {
   nsresult rv;
-  nsCOMPtr<nsIThreadJSContextStack> ctxStack = do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
+  nsCOMPtr<nsIJSContextStack> ctxStack = do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
+  bool what = (rv == NS_OK);
   if (rv == NS_OK) {
     JSContext* cx;
     ctxStack->Peek(&cx);

Components/BackEnds/SConstruct

   videoInput = SConscript('VideoInput/SConscript', variant_dir='build-%d/VideoInput' % target_gecko_version, duplicate=0)
   Depends(videoInput, commons)
 
-build_conductory(5)
-build_conductory(6)
 build_conductory(7)
 build_conductory(8)
+build_conductory(9)
+build_conductory(10)
 

Components/BackEnds/VideoInput/DShowVideoInputBackEnd.cpp

   return NS_OK;
 }
 
-nsresult DShowVideoInputDevice::doFetch(PRBool flip, jsval *_retval NS_OUTPARAM)
+nsresult DShowVideoInputDevice::doFetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM)
 {
   long cbBuffer;
   HRESULT hr = mPGrabber->GetCurrentBuffer(&cbBuffer, NULL);
   if (FAILED(hr)) { return NS_ERROR_UNEXPECTED; }
 
-  JSContext* cx = GetCurrentJSContext();
-  if (!cx) { return NS_ERROR_UNEXPECTED; }
+  //JSContext* cx = GetCurrentJSContext();
+  //if (!cx) { return NS_ERROR_UNEXPECTED; }
 
   long bufferByteLength = cbBuffer << 2;
 
 }
 
 /* jsval fetch (); */
-NS_IMETHODIMP DShowVideoInputDevice::Fetch(PRBool flip, jsval *_retval NS_OUTPARAM)
+NS_IMETHODIMP DShowVideoInputDevice::Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM)
 {
   if (!mPGrabber) { return NS_ERROR_NOT_INITIALIZED; }
 
   ENSURE_SUCCESS(mPControl->Pause());
-  nsresult rv = doFetch(flip, _retval);
+  nsresult rv = doFetch(flip, cx, _retval);
   ENSURE_SUCCESS(mPControl->Run());
   return rv;
 }

Components/BackEnds/VideoInput/DShowVideoInputBackEnd.h

 
 private:
   ~DShowVideoInputDevice();
-  nsresult doFetch(PRBool flip, jsval *_retval NS_OUTPARAM);
+  nsresult doFetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM);
 
 protected:
   /* additional members */

Components/BackEnds/VideoInput/V4L2VideoInputBackEnd.cpp

 }
 
 /* jsval fetch (); */
-NS_IMETHODIMP V4L2VideoInputDevice::Fetch(PRBool flip, jsval *_retval NS_OUTPARAM)
+NS_IMETHODIMP V4L2VideoInputDevice::Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM)
 {
   ENSURE_OPENING;
 
-  JSContext* cx = GetCurrentJSContext();
-  if (!cx) { return NS_ERROR_UNEXPECTED; }
+  //JSContext* cx = GetCurrentJSContext();
+  //if (!cx) { return NS_ERROR_UNEXPECTED; }
 
   struct v4l2_buffer buf;
   CLEAR(buf);

Components/BackEnds/VideoInput/VideoInputBackEnd.h

-/*
- * DO NOT EDIT.  THIS FILE IS GENERATED FROM VideoInputBackEnd.idl
- */
-
-#ifndef __gen_VideoInputBackEnd_h__
-#define __gen_VideoInputBackEnd_h__
-
-
-#ifndef __gen_nsISupports_h__
-#include "nsISupports.h"
-#endif
-
-#ifndef __gen_nsIArray_h__
-#include "nsIArray.h"
-#endif
-
-/* For IDL files that don't want to include root IDL files. */
-#ifndef NS_NO_VTABLE
-#define NS_NO_VTABLE
-#endif
-#include "jsapi.h"
-
-/* starting interface:    dtIVideoInputDevice */
-#define DTIVIDEOINPUTDEVICE_IID_STR "a4817268-81fa-43a3-975f-3623327a3863"
-
-#define DTIVIDEOINPUTDEVICE_IID \
-  {0xa4817268, 0x81fa, 0x43a3, \
-    { 0x97, 0x5f, 0x36, 0x23, 0x32, 0x7a, 0x38, 0x63 }}
-
-class NS_NO_VTABLE NS_SCRIPTABLE dtIVideoInputDevice : public nsISupports {
- public: 
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(DTIVIDEOINPUTDEVICE_IID)
-
-  /* readonly attribute boolean taken; */
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) = 0;
-
-  /* readonly attribute AString name; */
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
-
-  /* void open (); */
-  NS_SCRIPTABLE NS_IMETHOD Open(void) = 0;
-
-  /* void start (); */
-  NS_SCRIPTABLE NS_IMETHOD Start(void) = 0;
-
-  /* boolean isReady (); */
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) = 0;
-
-  /* jsval fetch (in boolean flip); */
-  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, jsval *_retval NS_OUTPARAM) = 0;
-
-  /* void pause (); */
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
-
-  /* boolean close (); */
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) = 0;
-
-};
-
-  NS_DEFINE_STATIC_IID_ACCESSOR(dtIVideoInputDevice, DTIVIDEOINPUTDEVICE_IID)
-
-/* Use this macro when declaring classes that implement this interface. */
-#define NS_DECL_DTIVIDEOINPUTDEVICE \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken); \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
-  NS_SCRIPTABLE NS_IMETHOD Open(void); \
-  NS_SCRIPTABLE NS_IMETHOD Start(void); \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM); \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, jsval *_retval NS_OUTPARAM); \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void); \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM); 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object. */
-#define NS_FORWARD_DTIVIDEOINPUTDEVICE(_to) \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return _to GetTaken(aTaken); } \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
-  NS_SCRIPTABLE NS_IMETHOD Open(void) { return _to Open(); } \
-  NS_SCRIPTABLE NS_IMETHOD Start(void) { return _to Start(); } \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return _to IsReady(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, jsval *_retval NS_OUTPARAM) { return _to Fetch(flip, _retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return _to Close(_retval); } 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
-#define NS_FORWARD_SAFE_DTIVIDEOINPUTDEVICE(_to) \
-  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTaken(aTaken); } \
-  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
-  NS_SCRIPTABLE NS_IMETHOD Open(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(); } \
-  NS_SCRIPTABLE NS_IMETHOD Start(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(); } \
-  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReady(_retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Fetch(flip, _retval); } \
-  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
-  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(_retval); } 
-
-#if 0
-/* Use the code below as a template for the implementation class for this interface. */
-
-/* Header file */
-class dtVideoInputDevice : public dtIVideoInputDevice
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_DTIVIDEOINPUTDEVICE
-
-  dtVideoInputDevice();
-
-private:
-  ~dtVideoInputDevice();
-
-protected:
-  /* additional members */
-};
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(dtVideoInputDevice, dtIVideoInputDevice)
-
-dtVideoInputDevice::dtVideoInputDevice()
-{
-  /* member initializers and constructor code */
-}
-
-dtVideoInputDevice::~dtVideoInputDevice()
-{
-  /* destructor code */
-}
-
-/* readonly attribute boolean taken; */
-NS_IMETHODIMP dtVideoInputDevice::GetTaken(PRBool *aTaken)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* readonly attribute AString name; */
-NS_IMETHODIMP dtVideoInputDevice::GetName(nsAString & aName)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void open (); */
-NS_IMETHODIMP dtVideoInputDevice::Open()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void start (); */
-NS_IMETHODIMP dtVideoInputDevice::Start()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* boolean isReady (); */
-NS_IMETHODIMP dtVideoInputDevice::IsReady(PRBool *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* jsval fetch (in boolean flip); */
-NS_IMETHODIMP dtVideoInputDevice::Fetch(PRBool flip, jsval *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void pause (); */
-NS_IMETHODIMP dtVideoInputDevice::Pause()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* boolean close (); */
-NS_IMETHODIMP dtVideoInputDevice::Close(PRBool *_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* End of implementation class template. */
-#endif
-
-
-/* starting interface:    dtIVideoInputBackEnd */
-#define DTIVIDEOINPUTBACKEND_IID_STR "f3b616cd-9eb0-448b-a6e7-f83d3149040f"
-
-#define DTIVIDEOINPUTBACKEND_IID \
-  {0xf3b616cd, 0x9eb0, 0x448b, \
-    { 0xa6, 0xe7, 0xf8, 0x3d, 0x31, 0x49, 0x04, 0x0f }}
-
-class NS_NO_VTABLE NS_SCRIPTABLE dtIVideoInputBackEnd : public nsISupports {
- public: 
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(DTIVIDEOINPUTBACKEND_IID)
-
-  /* nsIArray listDevices (); */
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) = 0;
-
-};
-
-  NS_DEFINE_STATIC_IID_ACCESSOR(dtIVideoInputBackEnd, DTIVIDEOINPUTBACKEND_IID)
-
-/* Use this macro when declaring classes that implement this interface. */
-#define NS_DECL_DTIVIDEOINPUTBACKEND \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM); 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object. */
-#define NS_FORWARD_DTIVIDEOINPUTBACKEND(_to) \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return _to ListDevices(_retval); } 
-
-/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
-#define NS_FORWARD_SAFE_DTIVIDEOINPUTBACKEND(_to) \
-  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ListDevices(_retval); } 
-
-#if 0
-/* Use the code below as a template for the implementation class for this interface. */
-
-/* Header file */
-class dtVideoInputBackEnd : public dtIVideoInputBackEnd
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_DTIVIDEOINPUTBACKEND
-
-  dtVideoInputBackEnd();
-
-private:
-  ~dtVideoInputBackEnd();
-
-protected:
-  /* additional members */
-};
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(dtVideoInputBackEnd, dtIVideoInputBackEnd)
-
-dtVideoInputBackEnd::dtVideoInputBackEnd()
-{
-  /* member initializers and constructor code */
-}
-
-dtVideoInputBackEnd::~dtVideoInputBackEnd()
-{
-  /* destructor code */
-}
-
-/* nsIArray listDevices (); */
-NS_IMETHODIMP dtVideoInputBackEnd::ListDevices(nsIArray **_retval NS_OUTPARAM)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* End of implementation class template. */
-#endif
-
-
-#endif /* __gen_VideoInputBackEnd_h__ */
+/*
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM VideoInputBackEnd.idl
+ */
+
+#ifndef __gen_VideoInputBackEnd_h__
+#define __gen_VideoInputBackEnd_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+#ifndef __gen_nsIArray_h__
+#include "nsIArray.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+#include "jsapi.h"
+
+/* starting interface:    dtIVideoInputDevice */
+#define DTIVIDEOINPUTDEVICE_IID_STR "a4817268-81fa-43a3-975f-3623327a3863"
+
+#define DTIVIDEOINPUTDEVICE_IID \
+  {0xa4817268, 0x81fa, 0x43a3, \
+    { 0x97, 0x5f, 0x36, 0x23, 0x32, 0x7a, 0x38, 0x63 }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE dtIVideoInputDevice : public nsISupports {
+ public: 
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(DTIVIDEOINPUTDEVICE_IID)
+
+  /* readonly attribute boolean taken; */
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) = 0;
+
+  /* readonly attribute AString name; */
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
+
+  /* void open (); */
+  NS_SCRIPTABLE NS_IMETHOD Open(void) = 0;
+
+  /* void start (); */
+  NS_SCRIPTABLE NS_IMETHOD Start(void) = 0;
+
+  /* boolean isReady (); */
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) = 0;
+
+  /* [implicit_jscontext] jsval fetch (in boolean flip); */
+  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM) = 0;
+
+  /* void pause (); */
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) = 0;
+
+  /* boolean close (); */
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) = 0;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(dtIVideoInputDevice, DTIVIDEOINPUTDEVICE_IID)
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_DTIVIDEOINPUTDEVICE \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken); \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
+  NS_SCRIPTABLE NS_IMETHOD Open(void); \
+  NS_SCRIPTABLE NS_IMETHOD Start(void); \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM); \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM); \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void); \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM); 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_DTIVIDEOINPUTDEVICE(_to) \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return _to GetTaken(aTaken); } \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
+  NS_SCRIPTABLE NS_IMETHOD Open(void) { return _to Open(); } \
+  NS_SCRIPTABLE NS_IMETHOD Start(void) { return _to Start(); } \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return _to IsReady(_retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM) { return _to Fetch(flip, cx, _retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return _to Pause(); } \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return _to Close(_retval); } 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_DTIVIDEOINPUTDEVICE(_to) \
+  NS_SCRIPTABLE NS_IMETHOD GetTaken(PRBool *aTaken) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTaken(aTaken); } \
+  NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
+  NS_SCRIPTABLE NS_IMETHOD Open(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(); } \
+  NS_SCRIPTABLE NS_IMETHOD Start(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(); } \
+  NS_SCRIPTABLE NS_IMETHOD IsReady(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsReady(_retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Fetch(flip, cx, _retval); } \
+  NS_SCRIPTABLE NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
+  NS_SCRIPTABLE NS_IMETHOD Close(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(_retval); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class dtVideoInputDevice : public dtIVideoInputDevice
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_DTIVIDEOINPUTDEVICE
+
+  dtVideoInputDevice();
+
+private:
+  ~dtVideoInputDevice();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(dtVideoInputDevice, dtIVideoInputDevice)
+
+dtVideoInputDevice::dtVideoInputDevice()
+{
+  /* member initializers and constructor code */
+}
+
+dtVideoInputDevice::~dtVideoInputDevice()
+{
+  /* destructor code */
+}
+
+/* readonly attribute boolean taken; */
+NS_IMETHODIMP dtVideoInputDevice::GetTaken(PRBool *aTaken)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute AString name; */
+NS_IMETHODIMP dtVideoInputDevice::GetName(nsAString & aName)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void open (); */
+NS_IMETHODIMP dtVideoInputDevice::Open()
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void start (); */
+NS_IMETHODIMP dtVideoInputDevice::Start()
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* boolean isReady (); */
+NS_IMETHODIMP dtVideoInputDevice::IsReady(PRBool *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* [implicit_jscontext] jsval fetch (in boolean flip); */
+NS_IMETHODIMP dtVideoInputDevice::Fetch(PRBool flip, JSContext *cx, jsval *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void pause (); */
+NS_IMETHODIMP dtVideoInputDevice::Pause()
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* boolean close (); */
+NS_IMETHODIMP dtVideoInputDevice::Close(PRBool *_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+/* starting interface:    dtIVideoInputBackEnd */
+#define DTIVIDEOINPUTBACKEND_IID_STR "f3b616cd-9eb0-448b-a6e7-f83d3149040f"
+
+#define DTIVIDEOINPUTBACKEND_IID \
+  {0xf3b616cd, 0x9eb0, 0x448b, \
+    { 0xa6, 0xe7, 0xf8, 0x3d, 0x31, 0x49, 0x04, 0x0f }}
+
+class NS_NO_VTABLE NS_SCRIPTABLE dtIVideoInputBackEnd : public nsISupports {
+ public: 
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(DTIVIDEOINPUTBACKEND_IID)
+
+  /* nsIArray listDevices (); */
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) = 0;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(dtIVideoInputBackEnd, DTIVIDEOINPUTBACKEND_IID)
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_DTIVIDEOINPUTBACKEND \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM); 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_DTIVIDEOINPUTBACKEND(_to) \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return _to ListDevices(_retval); } 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_DTIVIDEOINPUTBACKEND(_to) \
+  NS_SCRIPTABLE NS_IMETHOD ListDevices(nsIArray **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ListDevices(_retval); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class dtVideoInputBackEnd : public dtIVideoInputBackEnd
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_DTIVIDEOINPUTBACKEND
+
+  dtVideoInputBackEnd();
+
+private:
+  ~dtVideoInputBackEnd();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(dtVideoInputBackEnd, dtIVideoInputBackEnd)
+
+dtVideoInputBackEnd::dtVideoInputBackEnd()
+{
+  /* member initializers and constructor code */
+}
+
+dtVideoInputBackEnd::~dtVideoInputBackEnd()
+{
+  /* destructor code */
+}
+
+/* nsIArray listDevices (); */
+NS_IMETHODIMP dtVideoInputBackEnd::ListDevices(nsIArray **_retval NS_OUTPARAM)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_VideoInputBackEnd_h__ */

Components/BackEnds/VideoInput/VideoInputBackEnd.idl

   void open();
   void start();
   boolean isReady();
-  jsval /* ArrayBuffer */ fetch(in boolean flip);
+  [implicit_jscontext] jsval /* ArrayBuffer */ fetch(in boolean flip);
   void pause();
   boolean close();
 };

Components/BackEnds/VideoInput/VideoInputBackEnd.xpt

Binary file modified.

Extension/components/AudioInput-10.dll

Binary file added.

Extension/components/AudioInput-5.dll

Binary file removed.

Extension/components/AudioInput-6.dll

Binary file removed.

Extension/components/AudioInput-7.dll

Binary file modified.

Extension/components/AudioInput-8.dll

Binary file modified.

Extension/components/AudioInput-9.dll

Binary file added.

Extension/components/AudioInputBackEnd.xpt

Binary file modified.

Extension/components/VideoInput-10.dll

Binary file added.

Extension/components/VideoInput-5.dll

Binary file removed.

Extension/components/VideoInput-6.dll

Binary file removed.

Extension/components/VideoInput-7.dll

Binary file modified.

Extension/components/VideoInput-8.dll

Binary file modified.

Extension/components/VideoInput-9.dll

Binary file added.

Extension/components/VideoInputBackEnd.xpt

Binary file modified.

Extension/components/dshow-video-input.manifest

 interfaces       VideoInputBackEnd.xpt
 binary-component VideoInput.dll abi=WINNT_x86-msvc
-binary-component VideoInput-5.dll abi=WINNT_x86-msvc
-binary-component VideoInput-6.dll abi=WINNT_x86-msvc
 binary-component VideoInput-7.dll abi=WINNT_x86-msvc
 binary-component VideoInput-8.dll abi=WINNT_x86-msvc
+binary-component VideoInput-9.dll abi=WINNT_x86-msvc
+binary-component VideoInput-10.dll abi=WINNT_x86-msvc
 

Extension/components/libAudioInput-5.so

Binary file removed.

Extension/components/libAudioInput-6.so

Binary file removed.

Extension/components/libAudioInput-7.so

Binary file removed.

Extension/components/libAudioInput-8.so

Binary file removed.

Extension/components/libVideoInput-5.so

Binary file removed.

Extension/components/libVideoInput-6.so

Binary file removed.

Extension/components/libVideoInput-7.so

Binary file removed.

Extension/components/libVideoInput-8.so

Binary file removed.

Extension/components/openal-audio-input.manifest

 binary-component AudioInput.dll abi=WINNT_x86-msvc
 binary-component libAudioInput.so abi=Linux_x86-gcc3
 
-binary-component AudioInput-5.dll abi=WINNT_x86-msvc
-binary-component libAudioInput-5.so abi=Linux_x86-gcc3
-
-binary-component AudioInput-6.dll abi=WINNT_x86-msvc
-binary-component libAudioInput-6.so abi=Linux_x86-gcc3
-
 binary-component AudioInput-7.dll abi=WINNT_x86-msvc
 binary-component libAudioInput-7.so abi=Linux_x86-gcc3
 
 binary-component AudioInput-8.dll abi=WINNT_x86-msvc
 binary-component libAudioInput-8.so abi=Linux_x86-gcc3
 
+binary-component AudioInput-9.dll abi=WINNT_x86-msvc
+binary-component libAudioInput-9.so abi=Linux_x86-gcc3
+
+binary-component AudioInput-10.dll abi=WINNT_x86-msvc
+binary-component libAudioInput-10.so abi=Linux_x86-gcc3
+

Extension/components/v4l2-video-input.manifest

 interfaces       VideoInputBackEnd.xpt
 binary-component libVideoInput.so abi=Linux_x86-gcc3
-binary-component libVideoInput-5.so abi=Linux_x86-gcc3
-binary-component libVideoInput-6.so abi=Linux_x86-gcc3
 binary-component libVideoInput-7.so abi=Linux_x86-gcc3
 binary-component libVideoInput-8.so abi=Linux_x86-gcc3
+binary-component libVideoInput-9.so abi=Linux_x86-gcc3
+binary-component libVideoInput-10.so abi=Linux_x86-gcc3
 

Extension/install.rdf

     <em:id>conductory@devtaste.com</em:id>
     <em:type>2</em:type>
     <em:name>Conductory</em:name>
-    <em:version>0.3.20110711</em:version>
+    <em:version>0.4.20111030</em:version>
     <em:creator>SUN Haitao</em:creator>
     <em:contributor></em:contributor>
     <em:aboutURL></em:aboutURL>
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
-        <em:minVersion>4.0b8pre</em:minVersion>
-        <em:maxVersion>8.0</em:maxVersion>
+        <em:minVersion>7.0</em:minVersion>
+        <em:maxVersion>*</em:maxVersion>
       </Description>
     </em:targetApplication>
   </Description>
  * XULRunner SDK 7.0
  * XULRunner SDK 8.0
 
+2. Set following environment variables:
  XR_SDK_5_INC
    to the absolute path of the 'include' folder of XULRunner SDK 5.
  XR_SDK_5_LIB