Hello,
On Thu, Jun 09, 2016 at 12:06:56PM +0100, Tom Hacohen wrote:
> ami pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=a1b0fb2c9f95b94e705bba8a0ad6d0f65a5506b0
>
> commit a1b0fb2c9f95b94e705bba8a0ad6d0f65a5506b0
> Author: Yeshwanth Reddivari <[email protected]>
> Date: Wed Jun 8 14:46:11 2016 +0530
>
> elm video: implement player interface
> Reviewers: raster, cedric, jpeg, singh.amitesh
> Reviewed By: singh.amitesh
> Differential Revision: https://phab.enlightenment.org/D4021
> ---
> src/lib/elementary/elm_video.c | 63 +++++++++++++++++++++++++----
> src/lib/elementary/elm_video.eo | 56 ++++----------------------
> src/lib/elementary/elm_video_legacy.h | 75
> +++++++++++++++++++++++++++++++++++
> 3 files changed, 137 insertions(+), 57 deletions(-)
>
> diff --git a/src/lib/elementary/elm_video.c b/src/lib/elementary/elm_video.c
> index 65a5d6e..6ef84fc 100644
> --- a/src/lib/elementary/elm_video.c
> +++ b/src/lib/elementary/elm_video.c
> @@ -373,49 +373,49 @@ _elm_video_is_playing_get(Eo *obj EINA_UNUSED,
> Elm_Video_Data *sd)
> }
> EOLIAN static Eina_Bool
> -_elm_video_is_seekable_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> +_elm_video_efl_player_seekable_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> {
> return emotion_object_seekable_get(sd->emotion);
sd->emotion is implementing the efl.player interface.
So those functions could be replaced by composing the sd->emotion
object and the object. Then all interface function which are not
implemented by object will be called on the sd->emotion object.
Greetings
bu5hm4n
> }
> EOLIAN static Eina_Bool
> -_elm_video_audio_mute_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> +_elm_video_efl_player_audio_mute_get(Eo *obj EINA_UNUSED, Elm_Video_Data
> *sd)
> {
> return emotion_object_audio_mute_get(sd->emotion);
> }
> EOLIAN static void
> -_elm_video_audio_mute_set(Eo *obj EINA_UNUSED, Elm_Video_Data *sd,
> Eina_Bool mute)
> +_elm_video_efl_player_audio_mute_set(Eo *obj EINA_UNUSED, Elm_Video_Data
> *sd, Eina_Bool mute)
> {
> emotion_object_audio_mute_set(sd->emotion, mute);
> }
> EOLIAN static double
> -_elm_video_audio_level_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> +_elm_video_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Elm_Video_Data
> *sd)
> {
> return emotion_object_audio_volume_get(sd->emotion);
> }
> EOLIAN static void
> -_elm_video_audio_level_set(Eo *obj EINA_UNUSED, Elm_Video_Data *sd, double
> volume)
> +_elm_video_efl_player_audio_volume_set(Eo *obj EINA_UNUSED, Elm_Video_Data
> *sd, double volume)
> {
> emotion_object_audio_volume_set(sd->emotion, volume);
> }
> EOLIAN static double
> -_elm_video_play_position_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> +_elm_video_efl_player_position_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> {
> return emotion_object_position_get(sd->emotion);
> }
> EOLIAN static void
> -_elm_video_play_position_set(Eo *obj EINA_UNUSED, Elm_Video_Data *sd,
> double position)
> +_elm_video_efl_player_position_set(Eo *obj EINA_UNUSED, Elm_Video_Data *sd,
> double position)
> {
> emotion_object_position_set(sd->emotion, position);
> }
> EOLIAN static double
> -_elm_video_play_length_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> +_elm_video_efl_player_length_get(Eo *obj EINA_UNUSED, Elm_Video_Data *sd)
> {
> return emotion_object_play_length_get(sd->emotion);
> }
> @@ -480,5 +480,52 @@ elm_video_file_get(Eo *obj, const char **filename)
> efl_file_get((Eo *) obj, filename, NULL);
> }
> +EAPI void
> +elm_video_audio_level_set(Evas_Object *obj, double volume)
> +{
> + efl_player_audio_volume_set(obj, volume);
> +}
> +
> +EAPI double
> +elm_video_audio_level_get(const Evas_Object *obj)
> +{
> + return efl_player_audio_volume_get(obj);
> +}
> +
> +EAPI void
> +elm_video_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
> +{
> + efl_player_audio_mute_set(obj, mute);
> +}
> +
> +EAPI Eina_Bool
> +elm_video_audio_mute_get(const Evas_Object *obj)
> +{
> + return efl_player_audio_mute_get(obj);
> +}
> +
> +EAPI double
> +elm_video_play_length_get(const Evas_Object *obj)
> +{
> + return efl_player_length_get(obj);
> +}
> +
> +EAPI Eina_Bool
> +elm_video_is_seekable_get(const Evas_Object *obj)
> +{
> + return efl_player_seekable_get(obj);
> +}
> +
> +EAPI void
> +elm_video_play_position_set(Evas_Object *obj, double position)
> +{
> + efl_player_position_set(obj, position);
> +}
> +
> +EAPI double
> +elm_video_play_position_get(const Evas_Object *obj)
> +{
> + return efl_player_position_get(obj);
> +}
> #include "elm_video.eo.c"
> diff --git a/src/lib/elementary/elm_video.eo
> b/src/lib/elementary/elm_video.eo
> index 0d689b1..0a84352 100644
> --- a/src/lib/elementary/elm_video.eo
> +++ b/src/lib/elementary/elm_video.eo
> @@ -1,19 +1,9 @@
> -class Elm.Video (Elm.Layout, Efl.File, Elm.Interface.Atspi_Widget_Action)
> +class Elm.Video (Elm.Layout, Efl.File,
> + Efl.Player, Elm.Interface.Atspi_Widget_Action)
> {
> legacy_prefix: elm_video;
> eo_prefix: elm_obj_video;
> methods {
> - @property audio_level {
> - set {
> - [[Set the audio level of an Elm_Video object.]]
> - }
> - get {
> - [[Get the audio level of the current video.]]
> - }
> - values {
> - volume: double; [[The audio level.]]
> - }
> - }
> @property remember_position {
> set {
> [[Set whether the object can remember the last played position.
> @@ -33,31 +23,6 @@ class Elm.Video (Elm.Layout, Efl.File,
> Elm.Interface.Atspi_Widget_Action)
> remember: bool; [[The value.]]
> }
> }
> - @property play_position {
> - set {
> - [[Set the current position (in seconds) to be played in the
> - Elm_Video object.]]
> - }
> - get {
> - [[Get the current position (in seconds) being played in the
> - Elm_Video object.]]
> - }
> - values {
> - position: double; [[The time (in seconds) since the beginning
> of
> - the media file.]]
> - }
> - }
> - @property audio_mute {
> - set {
> - [[Change the mute state of the Elm_Video object.]]
> - }
> - get {
> - [[Get whether audio is muted.]]
> - }
> - values {
> - mute: bool; [[The mute state.]]
> - }
> - }
> @property is_playing {
> get {
> [[Is the video actually playing.
> @@ -68,24 +33,12 @@ class Elm.Video (Elm.Layout, Efl.File,
> Elm.Interface.Atspi_Widget_Action)
> return: bool;
> }
> }
> - @property play_length {
> - get {
> - [[Get the total playing time (in seconds) of the Elm_Video
> object.]]
> - return: double; [[The total duration (in seconds) of the media
> file.]]
> - }
> - }
> @property emotion {
> get {
> [[Get the underlying Emotion object.]]
> return: Evas.Object; [[the underlying Emotion object.]]
> }
> }
> - @property is_seekable {
> - get {
> - [[Is it possible to seek inside the video.]]
> - return: bool; [[true if is possible to seek inside the video.]]
> - }
> - }
> @property title {
> get {
> [[Get the title (for instance DVD title) from this emotion
> object.
> @@ -112,6 +65,11 @@ class Elm.Video (Elm.Layout, Efl.File,
> Elm.Interface.Atspi_Widget_Action)
> Eo.Base.constructor;
> Efl.File.file.set;
> Efl.File.file.get;
> + Efl.Player.audio_volume;
> + Efl.Player.audio_mute;
> + Efl.Player.position;
> + Efl.Player.seekable.get;
> + Efl.Player.length.get;
> Evas.Object.Smart.add;
> Evas.Object.Smart.del;
> Elm.Widget.focus_next_manager_is;
> diff --git a/src/lib/elementary/elm_video_legacy.h
> b/src/lib/elementary/elm_video_legacy.h
> index 57ca8da..162b530 100644
> --- a/src/lib/elementary/elm_video_legacy.h
> +++ b/src/lib/elementary/elm_video_legacy.h
> @@ -60,4 +60,79 @@ EAPI Eina_Bool elm_video_file_set(Eo *obj, const char
> *filename);
> */
> EAPI void elm_video_file_get(Eo *obj, const char **filename);
> +/**
> + * @brief Set the audio level of an Elm_Video object.
> + *
> + * @param[in] volume The audio level.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI void elm_video_audio_level_set(Evas_Object *obj, double volume);
> +
> +/**
> + * @brief Get the audio level of the current video.
> + *
> + * @return The audio level.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI double elm_video_audio_level_get(const Evas_Object *obj);
> +
> +/**
> + * @brief Change the mute state of the Elm_Video object.
> + *
> + * @param[in] mute The mute state.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI void elm_video_audio_mute_set(Evas_Object *obj, Eina_Bool mute);
> +
> +/**
> + * @brief Get whether audio is muted.
> + *
> + * @return The mute state.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *obj);
> +
> +/**
> + * @brief Get the total playing time (in seconds) of the Elm_Video object.
> + *
> + * @return The total duration (in seconds) of the media file.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI double elm_video_play_length_get(const Evas_Object *obj);
> +
> +/**
> + * @brief Is it possible to seek inside the video.
> + *
> + * @return true if is possible to seek inside the video.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI Eina_Bool elm_video_is_seekable_get(const Evas_Object *obj);
> +
> +/**
> + * @brief Set the current position (in seconds) to be played in the
> Elm_Video
> + * object.
> + *
> + * @param[in] position The time (in seconds) since the beginning of the
> media
> + * file.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI void elm_video_play_position_set(Evas_Object *obj, double position);
> +
> +/**
> + * @brief Get the current position (in seconds) being played in the
> Elm_Video
> + * object.
> + *
> + * @return The time (in seconds) since the beginning of the media file.
> + *
> + * @ingroup Elm_Video
> + */
> +EAPI double elm_video_play_position_get(const Evas_Object *obj);
> +
> #include "elm_video.eo.legacy.h"
>
> --
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel