#include <sbBaseMediacore.h>
Public Member Functions | |
NS_DECL_ISUPPORTS NS_DECL_NSICLASSINFO NS_DECL_SBIMEDIACORE | sbBaseMediacore () |
nsresult | InitBaseMediacore () |
nsresult | SetInstanceName (const nsAString &aInstanceName) |
nsresult | SetCapabilities (sbIMediacoreCapabilities *aCapabilities) |
nsresult | SetStatus (sbIMediacoreStatus *aStatus) |
virtual nsresult | OnInitBaseMediacore () |
virtual nsresult | OnGetCapabilities () |
virtual nsresult | OnSetSequencer (sbIMediacoreSequencer *aSequencer) |
virtual nsresult | OnShutdown () |
Public Member Functions inherited from sbIMediacore | |
void | shutdown () |
Protected Member Functions | |
virtual | ~sbBaseMediacore () |
Protected Attributes | |
PRMonitor * | mMonitor |
nsString | mInstanceName |
nsCOMPtr < sbIMediacoreCapabilities > | mCapabilities |
nsCOMPtr< sbIMediacoreStatus > | mStatus |
nsCOMPtr< sbIMediacoreSequencer > | mSequencer |
Additional Inherited Members | |
Public Attributes inherited from sbIMediacore | |
readonly attribute AString | instanceName |
readonly attribute sbIMediacoreCapabilities | capabilities |
readonly attribute sbIMediacoreStatus | status |
attribute sbIMediacoreSequencer | sequencer |
Definition at line 47 of file sbBaseMediacore.h.
nsIClassInfo sbBaseMediacore::sbBaseMediacore | ( | ) |
Definition at line 62 of file sbBaseMediacore.cpp.
|
protectedvirtual |
Definition at line 75 of file sbBaseMediacore.cpp.
nsresult sbBaseMediacore::InitBaseMediacore | ( | ) |
Definition at line 86 of file sbBaseMediacore.cpp.
|
virtual |
If you feel like your status is out of data, this is good time to update it as someone has just requested to get the current status.
Once you have your new status, you should set it using SetStatus(). This will update the cached version of the status object and return it to the callee.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 228 of file sbBaseMediacore.cpp.
|
virtual |
You'll probably want to initialiaze all essential bits of your mediacore here.
Don't worry about the instance name, it will be set by the factory that created you after Init() is called.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 214 of file sbBaseMediacore.cpp.
|
virtual |
If your mediacore can handle things like gapless playback and crossfading you can use the sequencer that is passed to you to peek at the item that will follow the current one.
If you wish to handle the next item, you can indicate this to the sequencer by calling sbIMediacoreSequencer::requestHandleNextItem.
The sequencer is available to you as 'mSequencer' as well if this method returns NS_OK. You should lock sbBaseMediacore::mMonitor when getting the sequencer from mSequencer and putting it in your own local nsCOMPtr. Do not hold the lock longer than you have to. Get your reference, and release the lock.
Definition at line 243 of file sbBaseMediacore.cpp.
|
virtual |
This is where you get asked to shutdown all operations.
You should try REALLY hard to make this method always succeed at whatever cleanup it has to do. Failing to do so would likely cause memory leaks over time as your core may fail to shutdown multiple times and remain alive in the instance cache of the mediacore manager.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 264 of file sbBaseMediacore.cpp.
nsresult sbBaseMediacore::SetCapabilities | ( | sbIMediacoreCapabilities * | aCapabilities | ) |
Definition at line 109 of file sbBaseMediacore.cpp.
nsresult sbBaseMediacore::SetInstanceName | ( | const nsAString & | aInstanceName | ) |
Definition at line 97 of file sbBaseMediacore.cpp.
nsresult sbBaseMediacore::SetStatus | ( | sbIMediacoreStatus * | aStatus | ) |
Definition at line 122 of file sbBaseMediacore.cpp.
|
protected |
Definition at line 83 of file sbBaseMediacore.h.
|
protected |
Definition at line 81 of file sbBaseMediacore.h.
|
protected |
Definition at line 79 of file sbBaseMediacore.h.
|
protected |
Definition at line 85 of file sbBaseMediacore.h.
|
protected |
Definition at line 84 of file sbBaseMediacore.h.