summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2013-01-02 21:03:30 +0000
committerLeandro Dorileo <dorileo@profusion.mobi>2013-01-02 21:03:30 +0000
commite3e1511bacd6f7b528f860408a18dc4fb76f3070 (patch)
treee3cf55bd13fb4c8ad8187d074baa0ad77b4fcdd2 /legacy/emotion/src/lib
parent37bcda87ed63e79a8a3b39431cfe9bf9233e12ce (diff)
Emotion: introce emotion_object_video_subtitle_file_set() call
For setting an arbitrary subtitle file, this patch introduces the emotion_object_video_subtitle_file_set() and its counterpart emotion_object_video_subtitle_file_get(). The tag @sice were added as 1.7.2 since we're preparing a backport to stable tree. SVN revision: 82019
Diffstat (limited to 'legacy/emotion/src/lib')
-rw-r--r--legacy/emotion/src/lib/Emotion.h32
-rw-r--r--legacy/emotion/src/lib/emotion_private.h2
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c23
3 files changed, 57 insertions, 0 deletions
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index 361e4e55e5..186144ea4f 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -980,6 +980,38 @@ EAPI void emotion_object_video_mute_set (Evas_Object *obj, Eina_B
980EAPI Eina_Bool emotion_object_video_mute_get (const Evas_Object *obj); 980EAPI Eina_Bool emotion_object_video_mute_get (const Evas_Object *obj);
981 981
982/** 982/**
983 * @brief Set the video's subtitle file path.
984 *
985 * @param obj The object which we are setting a subtitle file path.
986 * @param filepath The subtitle file path.
987 *
988 * This function sets a video's subtitle file path(i.e an .srt file) for
989 * supported subtitle formats consult the backend's documentation.
990 *
991 * @see emotion_object_video_subtitle_file_get().
992 *
993 * @ingroup Emotion_Video
994 * @since 1.7.2
995 */
996EAPI void emotion_object_video_subtitle_file_set (Evas_Object *obj, const char *filepath);
997
998/**
999 * @brief Get the video's subtitle file path.
1000 *
1001 * @param obj The object which we are retrieving the subtitle file path from.
1002 * @return The video's subtitle file path previously set, NULL otherwise.
1003 *
1004 * This function returns the video's subtitle file path, if not previously set
1005 * or in error NULL is returned.
1006 *
1007 * @see emotion_object_video_subtitle_file_set().
1008 *
1009 * @ingroup Emotion_Video
1010 * @since 1.7.2
1011 */
1012EAPI const char *emotion_object_video_subtitle_file_get (const Evas_Object *obj);
1013
1014/**
983 * @brief Get the number of available video channel 1015 * @brief Get the number of available video channel
984 * 1016 *
985 * @param obj The object which we are retrieving the channel count from 1017 * @param obj The object which we are retrieving the channel count from
diff --git a/legacy/emotion/src/lib/emotion_private.h b/legacy/emotion/src/lib/emotion_private.h
index cf24c7543e..73a1b7ddf0 100644
--- a/legacy/emotion/src/lib/emotion_private.h
+++ b/legacy/emotion/src/lib/emotion_private.h
@@ -74,6 +74,8 @@ struct _Emotion_Video_Module
74 int (*video_channel_count) (void *ef); 74 int (*video_channel_count) (void *ef);
75 void (*video_channel_set) (void *ef, int channel); 75 void (*video_channel_set) (void *ef, int channel);
76 int (*video_channel_get) (void *ef); 76 int (*video_channel_get) (void *ef);
77 void (*video_subtitle_file_set) (void *ef, const char *filepath);
78 const char * (*video_subtitle_file_get) (void *ef);
77 const char * (*video_channel_name_get) (void *ef, int channel); 79 const char * (*video_channel_name_get) (void *ef, int channel);
78 void (*video_channel_mute_set) (void *ef, int mute); 80 void (*video_channel_mute_set) (void *ef, int mute);
79 int (*video_channel_mute_get) (void *ef); 81 int (*video_channel_mute_get) (void *ef);
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 48eafdacc7..8a80f838db 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -999,6 +999,29 @@ emotion_object_video_mute_get(const Evas_Object *obj)
999 return sd->module->video_channel_mute_get(sd->video_data); 999 return sd->module->video_channel_mute_get(sd->video_data);
1000} 1000}
1001 1001
1002EAPI void
1003emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath)
1004{
1005 Smart_Data *sd;
1006
1007 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1008 DBG("subtitle=%s", filepath);
1009 if (!sd->module) return;
1010 if (!sd->video_data) return;
1011 sd->module->video_subtitle_file_set(sd->video_data, filepath);
1012}
1013
1014EAPI const char *
1015emotion_object_video_subtitle_file_get(const Evas_Object *obj)
1016{
1017 Smart_Data *sd;
1018
1019 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1020 if (!sd->module) return EINA_FALSE;
1021 if (!sd->video_data) return EINA_FALSE;
1022 return sd->module->video_subtitle_file_get(sd->video_data);
1023}
1024
1002EAPI int 1025EAPI int
1003emotion_object_video_channel_count(const Evas_Object *obj) 1026emotion_object_video_channel_count(const Evas_Object *obj)
1004{ 1027{