sbBaseMediacore Class Reference

#include <sbBaseMediacore.h>

Inheritance diagram for sbBaseMediacore:
Collaboration diagram for sbBaseMediacore:

Public Member Functions

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
< sbIMediacoreCapabilities
nsCOMPtr< sbIMediacoreStatusmStatus
nsCOMPtr< sbIMediacoreSequencermSequencer

Additional Inherited Members

- Public Attributes inherited from sbIMediacore
readonly attribute AString instanceName
readonly attribute
readonly attribute
attribute sbIMediacoreSequencer sequencer

Detailed Description

Definition at line 47 of file sbBaseMediacore.h.

Constructor & Destructor Documentation

nsIClassInfo sbBaseMediacore::sbBaseMediacore ( )

Definition at line 62 of file sbBaseMediacore.cpp.

sbBaseMediacore::~sbBaseMediacore ( )

Definition at line 75 of file sbBaseMediacore.cpp.

Member Function Documentation

nsresult sbBaseMediacore::InitBaseMediacore ( )

Definition at line 86 of file sbBaseMediacore.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbBaseMediacore::OnGetCapabilities ( )

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.

nsresult sbBaseMediacore::OnInitBaseMediacore ( )

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.

Here is the caller graph for this function:

nsresult sbBaseMediacore::OnSetSequencer ( sbIMediacoreSequencer aSequencer)

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.

nsresult sbBaseMediacore::OnShutdown ( )

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.

Member Data Documentation

nsCOMPtr<sbIMediacoreCapabilities> sbBaseMediacore::mCapabilities

Definition at line 83 of file sbBaseMediacore.h.

nsString sbBaseMediacore::mInstanceName

Definition at line 81 of file sbBaseMediacore.h.

PRMonitor* sbBaseMediacore::mMonitor

Definition at line 79 of file sbBaseMediacore.h.

nsCOMPtr<sbIMediacoreSequencer> sbBaseMediacore::mSequencer

Definition at line 85 of file sbBaseMediacore.h.

nsCOMPtr<sbIMediacoreStatus> sbBaseMediacore::mStatus

Definition at line 84 of file sbBaseMediacore.h.

The documentation for this class was generated from the following files: