English 中文(简体)
How to implement a timer in a XPCOM component?
原标题:

I m creating a GStreamer application based on XULRunner. To achieve this created an XPCOM component that makes some of the GStreamer functionality available in a XUL application. However, GStreamer normally makes use of a message loop (GMainLoop) which enables one to receive bus messages. Because XULRunner already has its own message loop I can t create a GMainLoop. So I need another way of getting those messages. One way is to use the gst_bus_poll call. I would need to call it frequently to prevent the message queue from being flooded. So I m thinking that a timer is the correct solution here.

To make a long story short: how do I create a timer in an XPCOM component?

最佳回答

Take a look at nsITimer.

And you might be interested in the code in this bug about implementing a GStreamer backend for <video>.

问题回答

暂无回答




相关问题
How to implement a timer in a XPCOM component?

I m creating a GStreamer application based on XULRunner. To achieve this created an XPCOM component that makes some of the GStreamer functionality available in a XUL application. However, GStreamer ...

XPCOM Shockwave Flash C++

I recently started "playing" with xpcom, and I would like to know if there is a way do interact with a Shockwave flash element. In IE I can use the IShockwaveFlash interface, but for the Firefox I ...

virtualbox and python API

0 vote down I have installed virtualbox . but i cant import the module xpcom. but the synaptic package shows that it is installed. what could be wrong? -ASK

Cant find a way to open AppData/LocalLow directory

I am able to get path to User AppData/Local folder as follows. appdatafile = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("...

Detecting Firefox extension version

I have a Firefox Extension that I would like to populate the About box with the version within install.rdf. I know that FUEL s extIExtension allows one to see the version for an extension but I did ...

Accessing tabs on Firefox with a C++ XPCOM extension

What XPCOM interfaces should I use to detect opening, closing and switching of tabs and also get their associated URL from a firefox extension? I have seen instances of code that manage tabs in JS, ...

XPCOM Security issues

I m developing a Firefox plugin using XPCOM, I ve not yet read all the docs, but as far as I can see, A plugin is simply a DLL that provides services via a XPCOM interface and interacts with the ...

How do I link to a DLL from javascript in XULRunner?

I have a dll (that I didn t write) and I would like to use it in an XULRunner application. I know nearly nothing about this, so bear with me. Apparently I can use XPCOM to load the dll and then call ...

热门标签