From aff1c8832c961fccbc7ff50784a18153f6ab9fe9 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 6 Aug 2014 11:55:36 +0100 Subject: [PATCH] Efl player: Add player interface. This is the first version. --- src/Makefile_Efl.am | 4 + src/Makefile_Efl_Cxx.am | 1 + src/lib/efl/Efl.h | 1 + src/lib/efl/interfaces/efl_interfaces_main.c | 1 + src/lib/efl/interfaces/efl_player.eo | 109 +++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 src/lib/efl/interfaces/efl_player.eo diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 20643cebaa..1f562c1da5 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -3,6 +3,8 @@ BUILT_SOURCES += \ lib/efl/interfaces/efl_file.eo.h \ lib/efl/interfaces/efl_image.eo.c \ lib/efl/interfaces/efl_image.eo.h \ + lib/efl/interfaces/efl_player.eo.c \ + lib/efl/interfaces/efl_player.eo.h \ lib/efl/interfaces/efl_text.eo.c \ lib/efl/interfaces/efl_text.eo.h \ lib/efl/interfaces/efl_text_properties.eo.c \ @@ -12,6 +14,7 @@ efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@ efleolianfiles_DATA = \ lib/efl/interfaces/efl_file.eo \ lib/efl/interfaces/efl_image.eo \ + lib/efl/interfaces/efl_player.eo \ lib/efl/interfaces/efl_text.eo \ lib/efl/interfaces/efl_text_properties.eo @@ -37,5 +40,6 @@ installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces nodist_installed_eflinterfaces_DATA = \ lib/efl/interfaces/efl_file.eo.h \ lib/efl/interfaces/efl_image.eo.h \ + lib/efl/interfaces/efl_player.eo.h \ lib/efl/interfaces/efl_text.eo.h \ lib/efl/interfaces/efl_text_properties.eo.h diff --git a/src/Makefile_Efl_Cxx.am b/src/Makefile_Efl_Cxx.am index b10a93e9fa..734e9df716 100644 --- a/src/Makefile_Efl_Cxx.am +++ b/src/Makefile_Efl_Cxx.am @@ -5,6 +5,7 @@ if HAVE_CXX11 generated_efl_cxx_bindings = \ lib/efl/interfaces/efl_file.eo.hh \ lib/efl/interfaces/efl_image.eo.hh \ + lib/efl/interfaces/efl_player.eo.hh \ lib/efl/interfaces/efl_text.eo.hh \ lib/efl/interfaces/efl_text_properties.eo.hh diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index af506fe79a..9001ff4138 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -6,6 +6,7 @@ /* Interfaces */ #include "interfaces/efl_file.eo.h" #include "interfaces/efl_image.eo.h" +#include "interfaces/efl_player.eo.h" #include "interfaces/efl_text.eo.h" #include "interfaces/efl_text_properties.eo.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 882e1a9d50..97cfb04ef0 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -6,5 +6,6 @@ #include "interfaces/efl_file.eo.c" #include "interfaces/efl_image.eo.c" +#include "interfaces/efl_player.eo.c" #include "interfaces/efl_text.eo.c" #include "interfaces/efl_text_properties.eo.c" diff --git a/src/lib/efl/interfaces/efl_player.eo b/src/lib/efl/interfaces/efl_player.eo new file mode 100644 index 0000000000..4592896577 --- /dev/null +++ b/src/lib/efl/interfaces/efl_player.eo @@ -0,0 +1,109 @@ +interface Efl.Player { + legacy_prefix: null; + properties { + play { + set { + /*@ + * @brief Set play/pause state of the media file. + * + * 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. + */ + } + get { + /*@ + * @brief Get play/pause state of the media file. + */ + } + values { + bool play; /*@ true if playing, false otherwise. */ + } + } + position { + set { + /*@ + * @brief Set the position in the media file. + * + * @param obj The emotion object whose position will be changed. + * @param sec The position(in seconds) to which the media file will be set. + * + * This functions sets the current position of the media file to @p sec, this + * only works on seekable streams. Setting the position doesn't change the + * playing state of the media file. + */ + } + get { + /*@ + * @brief Get the position in the media file. + * + * @param obj The emotion object from which the position will be retrieved. + * @return The position of the media file. + * + * The position is returned as the number of seconds since the beginning of the + * media file. + */ + } + values { + double second; /*@ The position (in seconds). */ + } + } + progress { + get { + /*@ + * @brief Get how much of the file has been played. + * + * This function gets the progress in playing the file, the return value is in + * the [0, 1] range. + */ + } + values { + double progress; /*@ The progress within the [0, 1] range. */ + } + } + play_speed { + /** + * @brief Control the play speed of the media file. + * + * This function control 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. + * + */ + set { + } + get { + } + values { + double speed; /*@ The play speed in the [0, infinity) range. */ + } + } + audio_volume { + /** + * @brief Control the audio volume. + * + * Controls the audio volume of the stream being played. This has nothing to do with + * the system volume. This volume will be multiplied by the system volume. e.g.: + * if the current volume level is 0.5, and the system volume is 50%, it will be + * 0.5 * 0.5 = 0.25. + */ + set { + } + get { + } + values { + double volume; /*@ The volume level */ + } + } + audio_mute { + /** + * @brief This property controls the audio mute state. + */ + set { + } + get { + } + values { + bool mute; /*@ The mute state. True or false. */ + } + } + } +}