#include <mmsav.h>
Public Member Functions | |
MMSAV (MMSMEDIABackend backend=MMSMEDIA_BE_GST) | |
Constructor. | |
virtual | ~MMSAV () |
Destructor. | |
bool | registerAudioPostPlugin (string name) |
Registers a xine audio post plugin. | |
bool | registerVideoPostPlugin (string name) |
Registers a xine video post plugin. | |
bool | setAudioPostPluginParameter (string name, string parameter, string value) |
Sets audio post plugin parameter. | |
bool | setVideoPostPluginParameter (string name, string parameter, string value) |
Sets video post plugin parameter. | |
bool | isPlaying () |
Determines if a stream is currently being played. | |
bool | isPaused () |
Determines if a stream is currently being paused. | |
bool | isStopped () |
Determines if a stream is in stopped status. | |
void | startPlaying (const string mrl, const bool cont=true) |
Starts playing. | |
void | play () |
Continues playing. | |
void | stop (const bool savePosition=true) |
Stops playing. | |
void | pause () |
Pauses. | |
void | ffwd () |
Playback will be switched to fast forward. | |
void | slow () |
Playback will be switched to slow motion. | |
bool | getTimes (int *pos, int *length) |
Gets information about the length of the actual title and the time of the current position in seconds. | |
void | setBrightness (int count) |
Sets the brightness if video output is done. | |
void | brightnessUp (int count) |
Increases the brightness if video output is done. | |
void | brightnessDown (int count) |
Decreases the brightness if video output is done. | |
void | setContrast (int count) |
Sets the contrast if video output is done. | |
void | contrastUp (int count) |
Increases the contrast if video output is done. | |
void | contrastDown (int count) |
Decreases the contrast if video output is done. | |
void | setSaturation (int count) |
Sets the saturation if video output is done. | |
void | saturationUp (int count) |
Increases the saturation if video output is done. | |
void | saturationDown (int count) |
Decreases the saturation if video output is done. | |
void | setHue (int count) |
Sets the hue if video output is done. | |
void | hueUp (int count) |
Increases the hue if video output is done. | |
void | hueDown (int count) |
Decreases the hue if video output is done. | |
void | setVolume (int percent) |
Sets the volume of the audio output. | |
bool | hasVideo () |
Returns true if stream contains a video stream. | |
bool | hasAudio () |
Returns true if stream contains an audio stream. | |
Public Attributes | |
sigc::signal< void, string > * | onError |
Callback that is used to receive errors. | |
sigc::signal< void, const unsigned short, const unsigned short > * | onStatusChange |
Callback that is used to receive status changes. | |
Static Public Attributes | |
static const unsigned short | STATUS_NONE = 0 |
status not set | |
static const unsigned short | STATUS_PLAYING = 1 |
stream is being played | |
static const unsigned short | STATUS_PAUSED = 2 |
stream is being paused | |
static const unsigned short | STATUS_STOPPED = 3 |
stream was stopped | |
static const unsigned short | STATUS_REWIND = 4 |
stream is being rewinded | |
static const unsigned short | STATUS_FFWD = 5 |
stream is being fast forwarded (2x) | |
static const unsigned short | STATUS_FFWD2 = 6 |
stream is being fast forwarded (4x) | |
static const unsigned short | STATUS_SLOW = 7 |
stream is being played slowly (2x) | |
static const unsigned short | STATUS_SLOW2 = 8 |
stream is being played slowly (4x) | |
Protected Member Functions | |
void | gstInit (const string uri) |
init gstreamer | |
void | xineInit () |
Initializes some xine stuff. | |
void | xineOpen (xine_event_listener_cb_t queue_cb=NULL, void *userData=NULL) |
Opens an audio/video object. | |
void | initialize (const bool verbose=false, MMSWindow *window=NULL) |
Initializes everything that is needed my MMSAV. | |
void | setStatus (int status) |
Sets internal status of sound/video playback. | |
void | sendEvent (int type, void *data=NULL, int datalen=0) |
Send a xine event to the engine. | |
bool | sendKeyPress (MMSKeySymbol key) |
bool | sendKeyRelease (MMSKeySymbol key) |
bool | sendButtonPress (int posx, int posy) |
bool | sendButtonRelease (int posx, int posy) |
bool | sendAxisMotion (int posx, int posy) |
bool | sendEvent (MMSInputEvent *input) |
bool | onHandleInput (MMSWindow *window, MMSInputEvent *input) |
Protected Attributes | |
MMSMEDIABackend | backend |
backend which is used to stream any sources | |
MMSWindow * | window |
window which displays the stream | |
MMSFBSurface * | surface |
surface of the window | |
bool | verbose |
should logging be verbose? | |
short | status |
current playback status | |
int | pos |
remember position where the stream stopped last time | |
string | currentMRL |
current mrl | |
xine_t * | xine |
global xine structure | |
xine_video_port_t * | vo |
xine video ports | |
xine_audio_port_t * | ao |
xine audio ports | |
xine_stream_t * | stream |
xine stream | |
xine_event_queue_t * | queue |
xine event queue | |
map< string, xine_post_t * > | audioPostPlugins |
map of registered audio post plugins | |
map< string, xine_post_t * > | videoPostPlugins |
map of registered video post plugins | |
Private Member Functions | |
bool | setPostPluginParameter (map< string, xine_post_t * > plugins, string name, string parameter, string value) |
Sets post plugin parameter. | |
Private Attributes | |
sigc::connection | onHandleInputConnection |
MMSRAW_USERDATA | userd |
GST_DISKOVIDEOSINK_DATA | gst_diskovideosink_data |
VODESC | vodesc |
video output settings | |
dfb_visual_t | visual |
visual structure for video output | |
raw_visual_t | rawvisual |
pthread_mutex_t | lock |
It is the base class for all audio and video related classes.
Definition at line 144 of file mmsav.h.
MMSAV::MMSAV | ( | MMSMEDIABackend | _backend = MMSMEDIA_BE_GST |
) |
MMSAV::~MMSAV | ( | ) | [virtual] |
bool MMSAV::setPostPluginParameter | ( | map< string, xine_post_t * > | plugins, | |
string | name, | |||
string | parameter, | |||
string | value | |||
) | [private] |
void MMSAV::gstInit | ( | const string | uri | ) | [protected] |
init gstreamer
void MMSAV::xineInit | ( | ) | [protected] |
void MMSAV::xineOpen | ( | xine_event_listener_cb_t | queue_cb = NULL , |
|
void * | userData = NULL | |||
) | [protected] |
Opens an audio/video object.
It creates the xine stream, wires all registered audio/video post plugins, sets the verbosity and registers the event queue if given.
queue_cb | [in] xine event queue callback | |
userData | [in] data to be used in xine event callbacks |
MMSAVError | Cannot get a new stream |
Initializes everything that is needed my MMSAV.
First it initializes xine. Then it sets some internal variables and does some surface flipping.
verbose | [in] if true the xine engine writes debug messages to stdout | |
window | [in] window that will be used for video output |
MMSAVError | Cannot get a new xine object | |
MMSAVError | MMSFBSurface::clear() failed | |
MMSAVError | MMSFBSurface::flip() failed | |
MMSAVError | Cannot open the DFB video driver |
void MMSAV::setStatus | ( | int | status | ) | [protected] |
Sets internal status of sound/video playback.
It also emits a signal, which can be handled using the sigc++ connectors.
status | [in] status to set |
void MMSAV::sendEvent | ( | int | type, | |
void * | data = NULL , |
|||
int | datalen = 0 | |||
) | [protected] |
bool MMSAV::sendKeyPress | ( | MMSKeySymbol | key | ) | [protected] |
bool MMSAV::sendKeyRelease | ( | MMSKeySymbol | key | ) | [protected] |
bool MMSAV::sendButtonPress | ( | int | posx, | |
int | posy | |||
) | [protected] |
bool MMSAV::sendButtonRelease | ( | int | posx, | |
int | posy | |||
) | [protected] |
bool MMSAV::sendAxisMotion | ( | int | posx, | |
int | posy | |||
) | [protected] |
bool MMSAV::sendEvent | ( | MMSInputEvent * | input | ) | [protected] |
bool MMSAV::onHandleInput | ( | MMSWindow * | window, | |
MMSInputEvent * | input | |||
) | [protected] |
bool MMSAV::registerAudioPostPlugin | ( | string | name | ) |
bool MMSAV::registerVideoPostPlugin | ( | string | name | ) |
bool MMSAV::setAudioPostPluginParameter | ( | string | name, | |
string | parameter, | |||
string | value | |||
) |
Sets audio post plugin parameter.
name | [in] name of post plugin that will be affected | |
parameter | [in] parameter to set | |
value | [in] value for the parameter |
bool MMSAV::setVideoPostPluginParameter | ( | string | name, | |
string | parameter, | |||
string | value | |||
) |
Sets video post plugin parameter.
name | [in] name of post plugin that will be affected | |
parameter | [in] parameter to set | |
value | [in] value for the parameter |
bool MMSAV::isPlaying | ( | ) |
bool MMSAV::isPaused | ( | ) |
bool MMSAV::isStopped | ( | ) |
void MMSAV::startPlaying | ( | const string | mrl, | |
const bool | cont = true | |||
) |
Starts playing.
If the continue flag is set it tries to continue at the position where it was stopped before.
mrl | [in] mrl to play | |
cont | [in] if true it tries to continue at a position stopped before |
MMSAVError | stream could not be opened |
void MMSAV::play | ( | ) |
void MMSAV::stop | ( | const bool | savePosition = true |
) |
Stops playing.
savePosition | [in] if true stream position will be saved for continuation |
void MMSAV::pause | ( | ) |
void MMSAV::ffwd | ( | ) |
Playback will be switched to fast forward.
There are two different speed settings for fast forward. Twice as fast and four times as fast.
MMSAV::rewind()
Reimplemented in MMSSound.
void MMSAV::slow | ( | ) |
Playback will be switched to slow motion.
There are two different speed settings for slow motion. Twice as slow and four times as slow.
MMSAV::rewind()
bool MMSAV::getTimes | ( | int * | pos, | |
int * | length | |||
) |
void MMSAV::setBrightness | ( | int | count | ) |
Sets the brightness if video output is done.
count | [in] amount of brightness |
void MMSAV::brightnessUp | ( | int | count | ) |
Increases the brightness if video output is done.
count | [in] amount of brightness to increase |
void MMSAV::brightnessDown | ( | int | count | ) |
Decreases the brightness if video output is done.
count | [in] amount of brightness to decrease |
void MMSAV::setContrast | ( | int | count | ) |
Sets the contrast if video output is done.
count | [in] amount of contrast |
void MMSAV::contrastUp | ( | int | count | ) |
Increases the contrast if video output is done.
count | [in] amount of contrast to increase |
void MMSAV::contrastDown | ( | int | count | ) |
Decreases the contrast if video output is done.
count | [in] amount of contrast to decrease |
void MMSAV::setSaturation | ( | int | count | ) |
Sets the saturation if video output is done.
count | [in] amount of saturation |
void MMSAV::saturationUp | ( | int | count | ) |
Increases the saturation if video output is done.
count | [in] amount of saturation to increase |
void MMSAV::saturationDown | ( | int | count | ) |
Decreases the saturation if video output is done.
count | [in] amount of saturation to decrease |
void MMSAV::setHue | ( | int | count | ) |
void MMSAV::hueUp | ( | int | count | ) |
Increases the hue if video output is done.
count | [in] amount of hue to increase |
void MMSAV::hueDown | ( | int | count | ) |
Decreases the hue if video output is done.
count | [in] amount of hue to decrease |
void MMSAV::setVolume | ( | int | percent | ) |
bool MMSAV::hasVideo | ( | ) |
bool MMSAV::hasAudio | ( | ) |
sigc::connection MMSAV::onHandleInputConnection [private] |
MMSRAW_USERDATA MMSAV::userd [private] |
VODESC MMSAV::vodesc [private] |
dfb_visual_t MMSAV::visual [private] |
raw_visual_t MMSAV::rawvisual [private] |
pthread_mutex_t MMSAV::lock [private] |
MMSMEDIABackend MMSAV::backend [protected] |
MMSWindow* MMSAV::window [protected] |
MMSFBSurface* MMSAV::surface [protected] |
bool MMSAV::verbose [protected] |
short MMSAV::status [protected] |
int MMSAV::pos [protected] |
string MMSAV::currentMRL [protected] |
xine_t* MMSAV::xine [protected] |
xine_stream_t* MMSAV::stream [protected] |
xine_event_queue_t* MMSAV::queue [protected] |
map<string, xine_post_t*> MMSAV::audioPostPlugins [protected] |
map<string, xine_post_t*> MMSAV::videoPostPlugins [protected] |
const unsigned short MMSAV::STATUS_NONE = 0 [static] |
const unsigned short MMSAV::STATUS_PLAYING = 1 [static] |
const unsigned short MMSAV::STATUS_PAUSED = 2 [static] |
const unsigned short MMSAV::STATUS_STOPPED = 3 [static] |
const unsigned short MMSAV::STATUS_REWIND = 4 [static] |
const unsigned short MMSAV::STATUS_FFWD = 5 [static] |
const unsigned short MMSAV::STATUS_FFWD2 = 6 [static] |
const unsigned short MMSAV::STATUS_SLOW = 7 [static] |
const unsigned short MMSAV::STATUS_SLOW2 = 8 [static] |
sigc::signal<void, string>* MMSAV::onError |
sigc::signal<void, const unsigned short, const unsigned short>* MMSAV::onStatusChange |