Functions

EAPI void emotion_object_play_set (Evas_Object *obj, Eina_Bool play)
 Set play/pause state of the media file.
EAPI Eina_Bool emotion_object_play_get (const Evas_Object *obj)
 Get play/pause state of the media file.
EAPI void emotion_object_position_set (Evas_Object *obj, double sec)
 Set the position in the media file.
EAPI double emotion_object_position_get (const Evas_Object *obj)
 Get the position in the media file.
EAPI double emotion_object_buffer_size_get (const Evas_Object *obj)
 Get the percentual size of the buffering cache.
EAPI Eina_Bool emotion_object_seekable_get (const Evas_Object *obj)
 Get whether the media file is seekable.
EAPI double emotion_object_play_length_get (const Evas_Object *obj)
 Get the length of play for the media file.
EAPI void emotion_object_play_speed_set (Evas_Object *obj, double speed)
 Set the play speed of the media file.
EAPI double emotion_object_play_speed_get (const Evas_Object *obj)
 Get the play speed of the media file.
EAPI const char * emotion_object_progress_info_get (const Evas_Object *obj)
 Get how much of the file has been played.
EAPI double emotion_object_progress_status_get (const Evas_Object *obj)
 Get how much of the file has been played.

Function Documentation

EAPI double emotion_object_buffer_size_get ( const Evas_Object *  obj)

Get the percentual size of the buffering cache.

Parameters:
objThe emotion object from which the buffer size will be retrieved.
Returns:
The buffer percent size, ranging from 0.0 to 1.0

The buffer size is returned as a number between 0.0 and 1.0, 0.0 means the buffer if empty, 1.0 means full. If no buffering is in progress 1.0 is returned. In all other cases (maybe the backend don't support buffering) 1.0 is returned, thus you can always check for buffer_size < 1.0 to know if buffering is in progress.

Warning:
Generic backend don't implement this (will return 1.0).
EAPI Eina_Bool emotion_object_play_get ( const Evas_Object *  obj)

Get play/pause state of the media file.

Parameters:
objThe emotion object from which the state will be retrieved.
Returns:
EINA_TRUE if playing. EINA_FALSE if not playing.
Examples:
emotion_signals_example.c.
EAPI double emotion_object_play_length_get ( const Evas_Object *  obj)

Get the length of play for the media file.

Parameters:
objThe emotion object from which the length will be retrieved.
Returns:
The length of the media file in seconds.

This function returns the length of the media file in seconds.

Warning:
This will return 0 if called before the "length_change" signal has, been emitted.
Examples:
emotion_signals_example.c, and emotion_test_main.c.
EAPI void emotion_object_play_set ( Evas_Object *  obj,
Eina_Bool  play 
)

Set play/pause state of the media file.

Parameters:
objThe emotion object whose state will be changed.
playEINA_TRUE to play, EINA_FALSE to pause.

This functions sets the currently playing status of the video. Using this function to play or pause the video doesn't alter it's current position.

Examples:
emotion_basic_example.c, emotion_signals_example.c, and emotion_test_main.c.

References emotion_object_suspend_set(), and EMOTION_WAKEUP.

EAPI double emotion_object_play_speed_get ( const Evas_Object *  obj)

Get the play speed of the media file.

Parameters:
objThe emotion object from which the filename will be retrieved.
Returns:
The current speed of the media file.
See also:
emotion_object_play_speed_set
EAPI void emotion_object_play_speed_set ( Evas_Object *  obj,
double  speed 
)

Set the play speed of the media file.

Parameters:
objThe emotion object whose speed will be set.
speedThe speed to be set in the range [0,infinity)

This function sets the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.

Warning:
The only backend that implements this is the experimental VLC backend.
EAPI double emotion_object_position_get ( const Evas_Object *  obj)

Get the position in the media file.

Parameters:
objThe emotion object from which the position will be retrieved.
Returns:
The position of the media file.

The position is returned as the number of seconds since the beginning of the media file.

Examples:
emotion_signals_example.c, and emotion_test_main.c.

Referenced by emotion_object_last_position_save().

EAPI void emotion_object_position_set ( Evas_Object *  obj,
double  sec 
)

Set the position in the media file.

Parameters:
objThe emotion object whose position will be changed.
secThe position(in seconds) to which the media file will be set.

This functions sets the current position of the media file to sec, this only works on seekable streams. Setting the position doesn't change the playing state of the media file.

See also:
emotion_object_seekable_get
Examples:
emotion_test_main.c.

Referenced by emotion_object_last_position_load().

EAPI const char* emotion_object_progress_info_get ( const Evas_Object *  obj)

Get how much of the file has been played.

Parameters:
objThe emotion object from which the filename will be retrieved.
Returns:
The progress of the media file.
Warning:
Don't change of free the returned string.
gstreamer xine backends don't implement this(will return NULL).
Examples:
emotion_test_main.c.
EAPI double emotion_object_progress_status_get ( const Evas_Object *  obj)

Get how much of the file has been played.

Parameters:
objThe emotion object from which the filename will be retrieved
Returns:
The progress of the media file.

This function gets the progress in playing the file, the return value is in the [0, 1] range.

Warning:
gstreamer xine backends don't implement this(will return 0).
Examples:
emotion_test_main.c.
EAPI Eina_Bool emotion_object_seekable_get ( const Evas_Object *  obj)

Get whether the media file is seekable.

Parameters:
objThe emotion object from which the seekable status will be retrieved.
Returns:
EINA_TRUE if the media file is seekable, EINA_FALSE otherwise.
Examples:
emotion_signals_example.c, and emotion_test_main.c.