Functions
Video

Functions

void elm_video::play () const
 Start to play the video. More...
 
void elm_video::pause () const
 Pause the video. More...
 
void elm_video::stop () const
 Stop the video. More...
 
double elm_video::audio_level_get () const
 Get the audio level of the current video. More...
 
void elm_video::audio_level_set (double volume_) const
 Get the audio level of the current video. More...
 
bool elm_video::remember_position_get () const
 Set whether the object can remember the last played position. More...
 
void elm_video::remember_position_set (bool remember_) const
 Set whether the object can remember the last played position. More...
 
double elm_video::play_position_get () const
 Get the current position (in seconds) being played in the Elm_Video object. More...
 
void elm_video::play_position_set (double position_) const
 Get the current position (in seconds) being played in the Elm_Video object. More...
 
bool elm_video::audio_mute_get () const
 Is the audio muted. More...
 
void elm_video::audio_mute_set (bool mute_) const
 Is the audio muted. More...
 
bool elm_video::is_playing_get () const
 Is the video actually playing. More...
 
double elm_video::play_length_get () const
 Get the total playing time (in seconds) of the Elm_Video object. More...
 
evas::object elm_video::emotion_get () const
 Get the underlying Emotion object. More...
 
bool elm_video::is_seekable_get () const
 Is it possible to seek inside the video. More...
 
std::string elm_video::title_get () const
 Get the title (for instance DVD title) from this emotion object. More...
 
Evas_Object * elm_player_add (Evas_Object *parent)
 Add a new Elm_Player object to the given parent Elementary (container) object. More...
 
Evas_Object * elm_video_add (Evas_Object *parent)
 Add a new Elm_Video object to the given parent Elementary (container) object. More...
 
Eina_Bool elm_video_file_set (Eo *obj, const char *filename)
 Define the file or URI that will be the video source. More...
 
void elm_video_file_get (Eo *obj, const char **filename)
 Get the file or URI that is used as the video source. More...
 

Detailed Description

video_inheritance_tree.png
player_inheritance_tree.png

Elementary comes with two object that help design application that need to display video.

The first one, Elm_Video, display a video by using Emotion. It embeds the video inside an Edje object, so you can do some animation depending on the video state change. It also implements a resource management policy to remove this burden from the application.

The second one, Elm_Player is a video player that need to be linked with an Elm_Video. It take care of updating its content according to Emotion event and provide a way to theme itself. It also automatically raises the priority of the linked Elm_Video so it will use the video decoder, if available. It also activates the "remember" function on the linked Elm_Video object.

Both widgets inherit from the Layout one, so that all the functions acting on it also work for video objects.

This widget emits the following signals, besides the ones sent from Layout:

The player widget emits the following signals, besides the ones sent from Layout:

Default content parts of the player widget that you can use for are:

Function Documentation

double elm_video::audio_level_get ( ) const
inline

Get the audio level of the current video.

Returns
the current audio level.
Parameters
volumeThe new audio volume.
void elm_video::audio_level_set ( double  volume_) const
inline

Get the audio level of the current video.

Returns
the current audio level.
Parameters
volumeThe new audio volume.
bool elm_video::audio_mute_get ( ) const
inline

Is the audio muted.

Returns
EINA_TRUE if the audio is muted.
Parameters
muteThe new mute state.
void elm_video::audio_mute_set ( bool  mute_) const
inline

Is the audio muted.

Returns
EINA_TRUE if the audio is muted.
Parameters
muteThe new mute state.
Evas_Object* elm_player_add ( Evas_Object *  parent)

Add a new Elm_Player object to the given parent Elementary (container) object.

Parameters
parentThe parent object
Returns
a new player widget handle or NULL, on errors.

This function inserts a new player widget on the canvas.

See also
elm_object_part_content_set()
Evas_Object* elm_video_add ( Evas_Object *  parent)

Add a new Elm_Video object to the given parent Elementary (container) object.

Parameters
parentThe parent object
Returns
a new video widget handle or NULL, on errors.

This function inserts a new video widget on the canvas.

See also
elm_video_file_set()
void elm_video_file_get ( Eo *  obj,
const char **  filename 
)

Get the file or URI that is used as the video source.

Parameters
filenameThe file or URI.
Since
1.14
Eina_Bool elm_video_file_set ( Eo *  obj,
const char *  filename 
)

Define the file or URI that will be the video source.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

This function will explicitly define a file or URI as a source for the video of the Elm_Video object.

See also
elm_video_add()
elm_player_add()
Parameters
[in]filenameThe file or URI to target. Local files can be specified using file:// or by using full file paths. URI could be remote source of video, like http:// or local source like WebCam (v4l2://). (You can use Emotion API to request and list the available Webcam on your system).
evas::object elm_video::emotion_get ( ) const
inline

Get the underlying Emotion object.

Returns
the underlying Emotion object.
bool elm_video::is_playing_get ( ) const
inline

Is the video actually playing.

Returns
EINA_TRUE if the video is actually playing.

You should consider watching event on the object instead of polling the object state.

bool elm_video::is_seekable_get ( ) const
inline

Is it possible to seek inside the video.

Returns
EINA_TRUE if is possible to seek inside the video.
void elm_video::pause ( ) const
inline

Pause the video.

Pause the video and start a timer to trigger suspend mode.

void elm_video::play ( ) const
inline

Start to play the video.

Start to play the video and cancel all suspend state.

double elm_video::play_length_get ( ) const
inline

Get the total playing time (in seconds) of the Elm_Video object.

Returns
The total duration (in seconds) of the media file.
double elm_video::play_position_get ( ) const
inline

Get the current position (in seconds) being played in the Elm_Video object.

Returns
The time (in seconds) since the beginning of the media file.
Parameters
positionThe time (in seconds) since the beginning of the media file.
void elm_video::play_position_set ( double  position_) const
inline

Get the current position (in seconds) being played in the Elm_Video object.

Returns
The time (in seconds) since the beginning of the media file.
Parameters
positionThe time (in seconds) since the beginning of the media file.
bool elm_video::remember_position_get ( ) const
inline

Set whether the object can remember the last played position.

Returns
whether the object remembers the last played position (EINA_TRUE) or not.
Note
This API only serves as indication. System support is required.
Parameters
rememberthe last played position of the Elm_Video object.
void elm_video::remember_position_set ( bool  remember_) const
inline

Set whether the object can remember the last played position.

Returns
whether the object remembers the last played position (EINA_TRUE) or not.
Note
This API only serves as indication. System support is required.
Parameters
rememberthe last played position of the Elm_Video object.
void elm_video::stop ( ) const
inline

Stop the video.

Stop the video and put the emotion in deep sleep mode.

std::string elm_video::title_get ( ) const
inline

Get the title (for instance DVD title) from this emotion object.

Returns
A string containing the title.

This function is only useful when playing a DVD.

Note
Don't change or free the string returned by this function.