#include <sbBaseMediacorePlaybackControl.h>
Public Member Functions | |
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIACOREPLAYBACKCONTROL | sbBaseMediacorePlaybackControl () |
nsresult | InitBaseMediacorePlaybackControl () |
virtual nsresult | OnInitBaseMediacorePlaybackControl () |
virtual nsresult | OnSetUri (nsIURI *aURI) |
virtual nsresult | OnGetDuration (PRUint64 *aPosition) |
virtual nsresult | OnGetPosition (PRUint64 *aPosition) |
virtual nsresult | OnSetPosition (PRUint64 aPosition) |
virtual nsresult | OnGetIsPlayingAudio (PRBool *aIsPlayingAudio) |
virtual nsresult | OnGetIsPlayingVideo (PRBool *aIsPlayingVideo) |
virtual nsresult | OnPlay () |
virtual nsresult | OnPause () |
virtual nsresult | OnStop () |
virtual nsresult | OnSeek (PRUint64 aPosition, PRUint32 aFlags) |
Public Member Functions inherited from sbIMediacorePlaybackControl | |
void | play () |
void | pause () |
void | stop () |
void | seek (in unsigned long long position, in unsigned long flags) |
Public Member Functions inherited from sbIMediacoreEventTarget | |
void | addListener (in sbIMediacoreEventListener aListener) |
void | removeListener (in sbIMediacoreEventListener aListener) |
boolean | dispatchEvent (in sbIMediacoreEvent aEvent, [optional] in boolean aAsync) |
Protected Member Functions | |
virtual | ~sbBaseMediacorePlaybackControl () |
nsresult | DispatchPlaybackControlEvent (PRUint32 aType) |
Protected Attributes | |
PRMonitor * | mMonitor |
nsCOMPtr< nsIURI > | mUri |
PRUint64 | mPosition |
PRUint64 | mDuration |
Additional Inherited Members | |
Public Attributes inherited from sbIMediacorePlaybackControl | |
attribute nsIURI | uri |
attribute unsigned long long | position |
readonly attribute unsigned long long | duration |
readonly attribute boolean | isPlayingAudio |
readonly attribute boolean | isPlayingVideo |
const unsigned long | SEEK_FLAG_NORMAL = 0 |
const unsigned long | SEEK_FLAG_KEYFRAME = 1 |
Definition at line 43 of file sbBaseMediacorePlaybackControl.h.
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIACOREPLAYBACKCONTROL sbBaseMediacorePlaybackControl::sbBaseMediacorePlaybackControl | ( | ) |
|
protectedvirtual |
Definition at line 74 of file sbBaseMediacorePlaybackControl.cpp.
|
protected |
Definition at line 427 of file sbBaseMediacorePlaybackControl.cpp.
nsresult sbBaseMediacorePlaybackControl::InitBaseMediacorePlaybackControl | ( | ) |
Definition at line 86 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to get the current duration (in milliseconds).
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 292 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to report on whether you're playing audio.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 323 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to report on whether you're playing video.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 333 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to get the current position (in milliseconds).
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 302 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
You'll probably want to initialize the playback mechanism for your mediacore implementation here.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 269 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you will actually want to pause playback for the current source.
This method is called with the lock protecting base class data locked. It is safe to get and set position and duration at this time.
You are responsible for firing any error events for errors that occur.
You are also responsible for firing any success events.
See sbIMediacoreEvent for more information.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 363 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you will actually want to start playing back the current source.
This method is called with the lock protecting base class data locked. It is safe to get and set position and duration at this time.
You are responsible for firing any error events for errors that occur.
You are also responsible for firing any success events.
See sbIMediacoreEvent for more information.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 343 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to seek to aPosition in the currently set source. The position is in milliseconds. The flags map to sbIMediacorePlaybackControl.SEEK_FLAG_*
Typically, the case where the flag is SEEK_FLAG_NORMAL will be the same codepath as OnSetPosition().
If let unimplemented, this will just default to being the same as if the user has set the position attribute.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 409 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll want to seek to aPosition in the currently set source. The position is in milliseconds.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 312 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you'll probably want to set the source for playback.
The uri is cached in mUri if this method succeeds.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 280 of file sbBaseMediacorePlaybackControl.cpp.
|
virtual |
This is where you will actually want to stop playback for the current source.
This method is called with the lock protecting base class data locked. It is safe to get and set position and duration at this time.
You are responsible for firing any error events for errors that occur.
You are also responsible for firing any success events.
You are not responsible for the STREAM_BEFORE_STOP event.
Upon stopping, you are responsible for rewinding / setting the position to the beginning. Yes, you should also fire an event after you've reset the position :)
See sbIMediacoreEvent for more information.
Reimplemented in sbGStreamerMediacore, and sbMediacoreWrapper.
Definition at line 383 of file sbBaseMediacorePlaybackControl.cpp.
|
protected |
Definition at line 90 of file sbBaseMediacorePlaybackControl.h.
|
protected |
Definition at line 83 of file sbBaseMediacorePlaybackControl.h.
|
protected |
Definition at line 88 of file sbBaseMediacorePlaybackControl.h.
|
protected |
Definition at line 85 of file sbBaseMediacorePlaybackControl.h.