Reeti
 All Classes Functions Variables Groups Pages
Public Member Functions | List of all members
UPlayer Class Reference

Play the ressources files that are used by the reeti. More...

#include <UPlayer.h>

Inherits UObject.

Public Member Functions

int play (string str)
 Function that plays an audio file. This function uses libvlc. More...
 
int playMus (string str)
 Function that plays the music file. This function uses libvlc. Mainly used to play music and video together. More...
 
int radioPlayer (int num)
 Function that plays the radio specified in parameter. This function uses libvlc. More...
 
int stop ()
 Stop the current music launch with play() or radioPlayer(). More...
 
int stopMus ()
 Stop the current music launch with playMus();. More...
 
void pause ()
 Pause the current play() or resumes if the play is already paused. Works for musics started with play() or radioPlayer(). More...
 
void stopCurrentSeq ()
 Stop the current sequence. More...
 
void playPose (string _file)
 Execute the pose stored in the file. More...
 
void playImage (string _file)
 Show an image to the screen using eog. More...
 
void stopImage ()
 Function that kills the eog session. More...
 
double playSequence (string _file)
 Function that executes the sequence stored in the file located in _file. More...
 
double playMoves (string _file)
 Function that executes the move stored in the file located in _file. More...
 
string b_playRandomSeq (string _path)
 Choose randomly a sequence between all sequences written in path. More...
 
double playTTS (string _path)
 Play the text in _path.load. More...
 

Detailed Description

Play the ressources files that are used by the reeti.

Date
December 04, 2014
Author
JBR
Version
1.1.1

Use

This is how the UTTS object is instantiated during init :

Member Function Documentation

int UPlayer::play ( string  str)

Function that plays an audio file. This function uses libvlc.

Parameters
strpath to the file to be played

Use

Global.player.play("/home/reeti/Documents/mysong.mp3"),

Returns
0 for success
1 on failure
int UPlayer::playMus ( string  str)

Function that plays the music file. This function uses libvlc. Mainly used to play music and video together.

Parameters
strpath to the file to be played

Use

Global.player.playMus("/home/reeti/Documents/mysong.mp3"),

Returns
0 for success
1 on failure
int UPlayer::radioPlayer ( int  num)

Function that plays the radio specified in parameter. This function uses libvlc.

Parameters
numNumber of the radio to be played
  • 0 RMC
  • 1 RTL
  • 2 France Inter
  • 3 France Culture
  • 4 BFM
  • 5 Nostalgie
  • 6 Rire & Chansons
  • 7 Chérie FM
  • 8 Skyrock
  • 9 NRJ
  • 10 France Musique
  • 11 FIP
  • 12 Le mouv'

Use

Global.player.radioPlayer(1),

Returns
0 for success
1 on failure
int UPlayer::stop ( )

Stop the current music launch with play() or radioPlayer().

Use

Global.player.stop(),

Returns
0 for success
1 on failure
int UPlayer::stopMus ( )

Stop the current music launch with playMus();.

Use

Global.player.stopMus(),

Returns
0 for success
1 on failure
void UPlayer::pause ( )

Pause the current play() or resumes if the play is already paused. Works for musics started with play() or radioPlayer().

Use

Global.player.pause(),

void UPlayer::stopCurrentSeq ( )

Stop the current sequence.

Use

Global.player.stopCurrentSeq(),

void UPlayer::playPose ( string  _file)

Execute the pose stored in the file.

Parameters
_fileRelative path to the file to be played from /home/reeti/reetiDocuments/Poses

Use

Global.player.playPose("my_pose.load"),

void UPlayer::playImage ( string  _file)

Show an image to the screen using eog.

Parameters
_fileRelative path to the file to be played from

Use

Global.player.playImage("my_pose"),

void UPlayer::stopImage ( )

Function that kills the eog session.

Use

Global.player.stopImage(),

double UPlayer::playSequence ( string  _file)

Function that executes the sequence stored in the file located in _file.

This function is primarly used for the urbi playSequence function and has not all functionalities. For optimal use of playing functions, use Urbi playSequence function.

Parameters
_fileRelative path to the file to be played from .. Don't need the extension.

Use

Global.player.play.playSequence("my_sequence"),

Returns
Return the duration of the sequence played
double UPlayer::playMoves ( string  _file)

Function that executes the move stored in the file located in _file.

ToBeDone

Parameters
_fileRelative path to the file to be played from /home/reeti/reetiDocuments/Moves.

Use

Global.player.playMoves("my_move"),

Returns
Return the duration of the move played
string UPlayer::b_playRandomSeq ( string  _path)

Choose randomly a sequence between all sequences written in path.

Parameters
_pathpath to the file where to choose the sequences from. The file must contains the path to the sequence from /home/reeti/reetiDocuments/Sequences. If no sequences is found there, search for the sequence in absolute path.

Use

Global.player.b_playRandomSeq("/home/reeti/Documents/myRandomSeq"),

Returns
the name of the file to be played
double UPlayer::playTTS ( string  _path)

Play the text in _path.load.

Parameters
_pathpath to the file can be absolute or relative path from /home/reeti/reetiDocuments/TTS

Use

Global.player.playTTS("/home/reeti/reetiDocuments/TTS/myRandomSeq.tts"),

Returns
the duration of the text