- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Video

## Macros
#define | elm_obj_video_file_set(filename, ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, filename), EO_TYPECHECK(Eina_Bool *, ret)
| Define the file or URI that will be the video source. More...
#define | elm_obj_video_emotion_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_EMOTION_GET), EO_TYPECHECK(Evas_Object **, ret)
| Get the underlying Emotion object. More...
#define | elm_obj_video_play() ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY)
| Start to play the video. More...
#define | elm_obj_video_pause() ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PAUSE)
| Pause the video. More...
#define | elm_obj_video_stop() ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_STOP)
| Stop the video. More...
#define | elm_obj_video_is_playing_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_IS_PLAYING_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Is the video actually playing. More...
#define | elm_obj_video_is_seekable_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_IS_SEEKABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Is it possible to seek inside the video. More...
#define | elm_obj_video_audio_mute_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_MUTE_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Is the audio muted. More...
#define | elm_obj_video_audio_mute_set(mute) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_MUTE_SET), EO_TYPECHECK(Eina_Bool, mute)
| Change the mute state of the Elm_Video object. More...
#define | elm_obj_video_audio_level_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_LEVEL_GET), EO_TYPECHECK(double *, ret)
| Get the audio level of the current video. More...
#define | elm_obj_video_audio_level_set(volume) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_LEVEL_SET), EO_TYPECHECK(double, volume)
| Set the audio level of an Elm_Video object. More...
#define | elm_obj_video_play_position_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_POSITION_GET), EO_TYPECHECK(double *, ret)
| Get the current position (in seconds) being played in the Elm_Video object. More...
#define | elm_obj_video_play_position_set(position) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_POSITION_SET), EO_TYPECHECK(double, position)
| Set the current position (in seconds) to be played in the Elm_Video object. More...
#define | elm_obj_video_play_length_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_LENGTH_GET), EO_TYPECHECK(double *, ret)
| Get the total playing time (in seconds) of the Elm_Video object. More...
#define | elm_obj_video_title_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_TITLE_GET), EO_TYPECHECK(const char **, ret)
| Get the title (for instance DVD title) from this emotion object. More...
#define | elm_obj_video_remember_position_set(remember) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_REMEMBER_POSITION_SET), EO_TYPECHECK(Eina_Bool, remember)
| Set whether the object can remember the last played position. More...
#define | elm_obj_video_remember_position_get(ret) ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_REMEMBER_POSITION_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Set whether the object can remember the last played position. More...

## Functions
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 (Evas_Object *video, const char *filename)
| Define the file or URI that will be the video source. More...
Evas_Object * | elm_video_emotion_get (const Evas_Object *video)
| Get the underlying Emotion object. More...
void | elm_video_play (Evas_Object *video)
| Start to play the video. More...
void | elm_video_pause (Evas_Object *video)
| Pause the video. More...
void | elm_video_stop (Evas_Object *video)
| Stop the video. More...
Eina_Bool | elm_video_is_playing_get (const Evas_Object *video)
| Is the video actually playing. More...
Eina_Bool | elm_video_is_seekable_get (const Evas_Object *video)
| Is it possible to seek inside the video. More...
Eina_Bool | elm_video_audio_mute_get (const Evas_Object *video)
| Is the audio muted. More...
void | elm_video_audio_mute_set (Evas_Object *video, Eina_Bool mute)
| Change the mute state of the Elm_Video object. More...
double | elm_video_audio_level_get (const Evas_Object *video)
| Get the audio level of the current video. More...
void | elm_video_audio_level_set (Evas_Object *video, double volume)
| Set the audio level of an Elm_Video object. More...
double | elm_video_play_position_get (const Evas_Object *video)
| Get the current position (in seconds) being played in the Elm_Video object. More...
void | elm_video_play_position_set (Evas_Object *video, double position)
| Set the current position (in seconds) to be played in the Elm_Video object. More...
double | elm_video_play_length_get (const Evas_Object *video)
| Get the total playing time (in seconds) of the Elm_Video object. More...
void | elm_video_remember_position_set (Evas_Object *video, Eina_Bool remember)
| Set whether the object can remember the last played position. More...
Eina_Bool | elm_video_remember_position_get (const Evas_Object *video)
| Set whether the object can remember the last played position. More...
const char * | elm_video_title_get (const Evas_Object *video)
| Get the title (for instance DVD title) from this emotion object. More...

## Detailed Description

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:

- `"focused"` : When the video has received focus. (since 1.8)
- `"unfocused"` : When the video has lost focus. (since 1.8)

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

- `"forward,clicked"` - the user clicked the forward button.
- `"info,clicked"` - the user clicked the info button.
- `"next,clicked"` - the user clicked the next button.
- `"pause,clicked"` - the user clicked the pause button.
- `"play,clicked"` - the user clicked the play button.
- `"prev,clicked"` - the user clicked the prev button.
- `"rewind,clicked"` - the user clicked the rewind button.
- `"stop,clicked"` - the user clicked the stop button.

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

- "video" - A video of the player

## Macro Definition Documentation

#define elm_obj_video_audio_level_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_LEVEL_GET), EO_TYPECHECK(double *, ret)

Get the audio level of the current video.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_audio_level_get

Referenced by elm_video_audio_level_get().

#define elm_obj_video_audio_level_set | ( |  | volume | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_LEVEL_SET), EO_TYPECHECK(double, volume)

Set the audio level of an Elm_Video object.

Since
  1.8

Parameters

  [in] | volume |

See Also
  elm_video_audio_level_set

Referenced by elm_video_audio_level_set().

#define elm_obj_video_audio_mute_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_MUTE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Is the audio muted.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_audio_mute_get

Referenced by elm_video_audio_mute_get().

#define elm_obj_video_audio_mute_set | ( |  | mute | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_AUDIO_MUTE_SET), EO_TYPECHECK(Eina_Bool, mute)

Change the mute state of the Elm_Video object.

Since
  1.8

Parameters

  [in] | mute |

See Also
  elm_video_audio_mute_set

Referenced by elm_video_audio_mute_set().

#define elm_obj_video_emotion_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_EMOTION_GET), EO_TYPECHECK(Evas_Object **, ret)

Get the underlying Emotion object.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_emotion_get

Referenced by elm_video_emotion_get().

#define elm_obj_video_file_set | ( |  | filename,
|  |  | ret
| ) |  | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, filename), EO_TYPECHECK(Eina_Bool *, ret)

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

Since
  1.8

Parameters

  [in] | filename |
  [out] | ret |

See Also
  elm_video_file_set

Referenced by elm_video_file_set().

#define elm_obj_video_is_playing_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_IS_PLAYING_GET), EO_TYPECHECK(Eina_Bool *, ret)

Is the video actually playing.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_is_playing_get

Referenced by elm_video_is_playing_get().

#define elm_obj_video_is_seekable_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_IS_SEEKABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Is it possible to seek inside the video.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_is_seekable_get

Referenced by elm_video_is_seekable_get().

#define elm_obj_video_pause | ( |  | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PAUSE)

Pause the video.

Since
  1.8

See Also
  elm_video_pause

Referenced by elm_video_pause().

#define elm_obj_video_play | ( |  | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY)

Start to play the video.

Since
  1.8

See Also
  elm_video_play

Referenced by elm_video_play().

#define elm_obj_video_play_length_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_LENGTH_GET), EO_TYPECHECK(double *, ret)

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

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_play_length_get

Referenced by elm_video_play_length_get().

#define elm_obj_video_play_position_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_POSITION_GET), EO_TYPECHECK(double *, ret)

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

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_play_position_get

Referenced by elm_video_play_position_get().

#define elm_obj_video_play_position_set | ( |  | position | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_PLAY_POSITION_SET), EO_TYPECHECK(double, position)

Set the current position (in seconds) to be played in the Elm_Video object.

Since
  1.8

Parameters

  [in] | position |

See Also
  elm_video_play_position_set

Referenced by elm_video_play_position_set().

#define elm_obj_video_remember_position_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_REMEMBER_POSITION_GET), EO_TYPECHECK(Eina_Bool *, ret)

Set whether the object can remember the last played position.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_remember_position_get

Referenced by elm_video_remember_position_get().

#define elm_obj_video_remember_position_set | ( |  | remember | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_REMEMBER_POSITION_SET), EO_TYPECHECK(Eina_Bool, remember)

Set whether the object can remember the last played position.

Since
  1.8

Parameters

  [in] | remember |

See Also
  elm_video_remember_position_set

Referenced by elm_video_remember_position_set().

#define elm_obj_video_stop | ( |  | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_STOP)

Stop the video.

Since
  1.8

See Also
  elm_video_stop

Referenced by elm_video_stop().

#define elm_obj_video_title_get | ( |  | ret | ) | ELM_OBJ_VIDEO_ID(ELM_OBJ_VIDEO_SUB_ID_TITLE_GET), EO_TYPECHECK(const char **, ret)

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

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_video_title_get

Referenced by elm_video_title_get().

## Function Documentation

Evas_Object* elm_player_add | ( | Evas_Object * | parent | ) |

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

Parameters

  parent | The 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

  parent | The 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()

double elm_video_audio_level_get | ( | const Evas_Object * | video | ) |

Get the audio level of the current video.

Parameters

  video | The video object to proceed the request on.

Returns
  the current audio level.

References elm_obj_video_audio_level_get.

void elm_video_audio_level_set | ( | Evas_Object * | video,
|  | double | volume
| ) |  |

Set the audio level of an Elm_Video object.

Parameters

  video | The video object to proceed the request on.
  volume | The new audio volume.

References elm_obj_video_audio_level_set.

Eina_Bool elm_video_audio_mute_get | ( | const Evas_Object * | video | ) |

Is the audio muted.

Parameters

  video | The video object to proceed the request on.

Returns
  `EINA_TRUE` if the audio is muted.

References elm_obj_video_audio_mute_get.

void elm_video_audio_mute_set | ( | Evas_Object * | video,
|  | Eina_Bool | mute
| ) |  |

Change the mute state of the Elm_Video object.

Parameters

  video | The video object to proceed the request on.
  mute | The new mute state.

References elm_obj_video_audio_mute_set.

Evas_Object* elm_video_emotion_get | ( | const Evas_Object * | video | ) |

Get the underlying Emotion object.

Parameters

  video | The video object to proceed the request on.

Returns
  the underlying Emotion object.

References elm_obj_video_emotion_get.

Eina_Bool elm_video_file_set | ( | Evas_Object * | video,
|  | const char * | filename
| ) |  |

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

Parameters

  video | The video object to define the file or URI for the video of the Elm_Video object.
  filename | The 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).

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()

References elm_obj_video_file_set.

Eina_Bool elm_video_is_playing_get | ( | const Evas_Object * | video | ) |

Is the video actually playing.

Parameters

  video | The video object to proceed the request on.

Returns
  `EINA_TRUE` if the video is actually playing.

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

References elm_obj_video_is_playing_get.

Eina_Bool elm_video_is_seekable_get | ( | const Evas_Object * | video | ) |

Is it possible to seek inside the video.

Parameters

  video | The video object to proceed the request on.

Returns
  `EINA_TRUE` if is possible to seek inside the video.

References elm_obj_video_is_seekable_get.

void elm_video_pause | ( | Evas_Object * | video | ) |

Pause the video.

Parameters

  video | The video object to proceed the request on.

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

References elm_obj_video_pause.

void elm_video_play | ( | Evas_Object * | video | ) |

Start to play the video.

Parameters

  video | The video object to proceed the request on.

Start to play the video and cancel all suspend state.

References elm_obj_video_play.

double elm_video_play_length_get | ( | const Evas_Object * | video | ) |

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

Parameters

  video | The video object.

Returns
  The total duration (in seconds) of the media file.

References elm_obj_video_play_length_get.

double elm_video_play_position_get | ( | const Evas_Object * | video | ) |

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

Parameters

  video | The video object.

Returns
  The time (in seconds) since the beginning of the media file.

References elm_obj_video_play_position_get.

void elm_video_play_position_set | ( | Evas_Object * | video,
|  | double | position
| ) |  |

Set the current position (in seconds) to be played in the Elm_Video object.

Parameters

  video | The video object.
  position | The time (in seconds) since the beginning of the media file.

References elm_obj_video_play_position_set.

Eina_Bool elm_video_remember_position_get | ( | const Evas_Object * | video | ) |

Set whether the object can remember the last played position.

Parameters

  video | The video object.

Returns
  whether the object remembers the last played position (`EINA_TRUE`) or not.

Note
  This API only serves as indication. System support is required.

References elm_obj_video_remember_position_get.

void elm_video_remember_position_set | ( | Evas_Object * | video,
|  | Eina_Bool | remember
| ) |  |

Set whether the object can remember the last played position.

Parameters

  video | The video object.
  remember | the last played position of the Elm_Video object.

Note
  This API only serves as indication. System support is required.

References elm_obj_video_remember_position_set.

void elm_video_stop | ( | Evas_Object * | video | ) |

Stop the video.

Parameters

  video | The video object to proceed the request on.

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

References elm_obj_video_stop.

const char* elm_video_title_get | ( | const Evas_Object * | video | ) |

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

Parameters

  video | The Elm_Video 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.

References elm_obj_video_title_get.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:15