summaryrefslogtreecommitdiff
path: root/viewer/smil-player/include
diff options
context:
space:
mode:
authorJaeyun Jeong <jyjeong@samsung.com>2012-08-21 18:40:43 +0900
committerJaeyun Jeong <jyjeong@samsung.com>2012-08-21 18:40:43 +0900
commit92abf425ce0d141f966ddaecf1c4bc325fc9e189 (patch)
tree411d692f37dbfbd292f19c41f9cd717523c18295 /viewer/smil-player/include
parent5f6271abd18e2d811315f56c48ecd927c9e9436c (diff)
downloadmessage-app-92abf425ce0d141f966ddaecf1c4bc325fc9e189.tar.gz
message-app-92abf425ce0d141f966ddaecf1c4bc325fc9e189.tar.bz2
message-app-92abf425ce0d141f966ddaecf1c4bc325fc9e189.zip
Implement tizen 2.0 beta.
Change-Id: Ifea6bc144e2628ddfaa3cafa8f4f250d78005356
Diffstat (limited to 'viewer/smil-player/include')
-rwxr-xr-xviewer/smil-player/include/msg-smil-content-manager.h234
-rwxr-xr-xviewer/smil-player/include/msg-smil-event-manager.h166
-rwxr-xr-xviewer/smil-player/include/msg-smil-player-interface.h125
-rwxr-xr-xviewer/smil-player/include/msg-smil-player.h167
-rwxr-xr-xviewer/smil-player/include/msg-smil-render.h195
-rwxr-xr-xviewer/smil-player/include/msg-smil-types.h176
-rwxr-xr-xviewer/smil-player/include/msg-smil-util.h48
7 files changed, 1111 insertions, 0 deletions
diff --git a/viewer/smil-player/include/msg-smil-content-manager.h b/viewer/smil-player/include/msg-smil-content-manager.h
new file mode 100755
index 0000000..7b0f366
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-content-manager.h
@@ -0,0 +1,234 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_CONTENT_MANAGER_SMIL_PLAYER_H__
+#define __MSG_CONTENT_MANAGER_SMIL_PLAYER_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-types.h"
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define MSG_MMS_SLIDE_INVALID -1
+
+/*==================================================================================================
+ * STRUCTURES
+ *==================================================================================================*/
+typedef struct _SMIL_CONTENT_MGR_HANDLE_S {
+ int curSlideIdx;
+ msg_struct_t msg_info_t; /*MSG MMS data struct handle */
+ SMIL_SLIDE_INFO_S *smilContent; /*slide info of the message*/
+} SMIL_CONTENT_MGR_HANDLE_S; /*Content Manager Handler.*/
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+/**
+*@fn _msg_smil_create_content_mgr(msg_struct_t msg_info_t, SMIL_CONTENT_MGR_HANDLE_S **smilContMgrHndle);
+*@brief This API shall facilitate the the SMIL Player interface initialize the Content Manager Handler.
+*@return MSG_SMIL_SUCCESS on success , else failure return code
+*@param[in] smilMsg This is the message that the SMILPlayerInterface sends for page information extraction.
+*@param[out] *smilContMgrHndle The Content Manager Handler.
+*/
+MSG_SMIL_ERROR_E _msg_smil_create_content_mgr(msg_struct_t msg_info_t, SMIL_CONTENT_MGR_HANDLE_S **smilContMgrHndle);
+
+/**
+*@fn _msg_smil_destroy_content_mgr(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This method will allow destroying the Content Manager handler and the complete slide queue for the MMS.
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+void _msg_smil_destroy_content_mgr(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_set_status(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, SMIL_PLAYER_STATUS_E event);
+*@brief This function will allow updating the slideIdx's slide status to the Content Manager.
+*@return TRUE on success , else return FALSE
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[in] curSlideIdx This is current slide index to be updated.
+*@param[in] event This is the event to which the status of the Handlerand the Slide in the Queue has to be updated
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_cont_mgr_set_status(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx, SMIL_PLAYER_STATUS_E event);
+
+/**
+*@fn _msg_smil_cont_mgr_get_cur_slide_idx(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function returns the Current Slide index.
+*@return The Current Slide index on success , else failure return code
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+int _msg_smil_cont_mgr_get_cur_slide_idx(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_set_cur_slide_idx(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx);
+*@brief This function set Current Slide index.
+*@return TRUE on success , else return FALSE
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[in] slideIdx This will be set as current slide index.
+*/
+MSG_BOOL _msg_smil_cont_mgr_set_cur_slide_idx(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx);
+
+/**
+*@fn _msg_smil_cont_mgr_get_cur_slide(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function returns the Current Slide Detailed Information.
+*@return Slide's detailed information on Success , else failure return code
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+SMIL_SLIDE_INFO_S *_msg_smil_cont_mgr_get_cur_slide(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_get_slide(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx);
+*@brief This function returns the requested Slide Detailed Information.
+*@return The requested Slide Detailed Information on success , else failure return code
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[in] slideIdx This is the handler to the SMILMessage sent back to UI while creating SMIL Player.
+*@param[out] commonData This is the data common to all the slides.
+*/
+SMIL_SLIDE_INFO_S *_msg_smil_cont_mgr_get_slide(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx);
+
+/**
+*@fn _msg_smil_cont_mgr_get_cur_slide_status(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function returns the Current Slide Status.
+*@return current slide's status.
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+SMIL_PLAYER_STATUS_E _msg_smil_cont_mgr_get_cur_slide_status(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+int _msg_smil_cont_mgr_get_total_slide_count(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_set_cur_slide_help_page(SMIL_SLIDE_INFO_S *singleSlideInfo, MSG_BOOL bSet);
+*@brief This function set current page for help page
+*@param[in] singleSlideInfo Slide information about currne page
+*@param[in] bSet The value of setting help page
+*@param[out] None.
+*/
+void _msg_smil_cont_mgr_set_cur_slide_help_page(SMIL_SLIDE_INFO_S *singleSlideInfo, MSG_BOOL bSet);
+
+/**
+*@fn _msg_smil_cont_mgr_is_cur_slide_help_page(SMIL_SLIDE_INFO_S *singleSlideInfo);
+*@brief This function returns the result of current page is help page or not
+*@return whether current slide is help page or not
+*@param[in] singleSlideInfo Slide information about currne page
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_cont_mgr_is_cur_slide_help_page(SMIL_SLIDE_INFO_S *singleSlideInfo);
+
+/**
+*@fn _msg_smil_cont_mgr_delete_help_page(msg_message_t msg_message, SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function delete help page for preview mode viewer and return the result
+*@return the result of deleting help page
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_cont_mgr_delete_help_page(msg_struct_t msg_info_t, SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+
+/**
+*@fn _msg_smil_cont_mgr_get_page_list_handle(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function returns msg_list_handle_t for current msg
+*@return msg_list_handle_t handler of page list
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+msg_list_handle_t _msg_smil_cont_mgr_get_page_list_handle(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_get_nth_page_struct_handle(msg_list_handle_t pagelist_info_t, int pageIdx);
+*@brief This function returns page struct handle with given page index
+*@return msg_struct_t handler of page
+*@param[in] pagelist_info_t page list handle
+*@param[in] pageIdx page index
+*@param[out] None.
+*/
+msg_struct_t _msg_smil_cont_mgr_get_nth_page_struct_handle(msg_list_handle_t pagelist_info_t, int pageIdx);
+
+/**
+*@fn _msg_smil_cont_mgr_get_page_time_value(msg_struct_t pageInfo_t, int field);
+*@brief This function returns page duration time for singleSlideInfo
+*@return duration time
+*@param[in] pageInfo_t page structure handle.
+*@param[in] field page field value.
+*@param[out] None.
+*/
+int _msg_smil_cont_mgr_get_page_time_value(msg_struct_t pageInfo_t, int field);
+
+/**
+*@fn _msg_smil_cont_mgr_get_page_media_list_handle(msg_struct_t pageInfo_t);
+*@brief This function returns msg_list_handle_t for media of current page
+*@return msg_list_handle_t handler of page list
+*@param[in] pageInfo_t page struct handler
+*@param[out] None.
+*/
+msg_list_handle_t _msg_smil_cont_mgr_get_page_media_list_handle(msg_struct_t pageInfo_t);
+
+/**
+*@fn _msg_smil_cont_mgr_get_page_nth_media_struct_handle(msg_list_handle_t medialist_info_t, int mediaIdx);
+*@brief This function returns media struct handle with given page index
+*@return msg_struct_t handler of page
+*@param[in] medialist_info_t media list handle
+*@param[in] mediaIdx media index
+*@param[out] None.
+*/
+msg_struct_t _msg_smil_cont_mgr_get_page_nth_media_struct_handle(msg_list_handle_t medialist_info_t, int mediaIdx);
+
+/**
+*@fn _msg_smil_cont_mgr_get_media_str_value(msg_struct_t media_info_t, int strfield, char *rtnStr);
+*@brief This function get STR value with given field for media
+*@return void
+*@param[in] media_info_t media list handle
+*@param[in] strfield field value
+*@param[out] rtnStr return value
+*/
+void _msg_smil_cont_mgr_get_media_str_value(msg_struct_t media_info_t, int strfield, char *rtnStr);
+
+/**
+*@fn _msg_smil_cont_mgr_get_media_int_value(msg_struct_t media_info_t, int intfield, int* rtnVal);
+*@brief This function get INT value with given field for media
+*@return void
+*@param[in] media_info_t media list handle
+*@param[in] intfield field value
+*@param[out] rtnVal return value
+*/
+void _msg_smil_cont_mgr_get_media_int_value(msg_struct_t media_info_t, int intfield, int* rtnVal);
+
+/**
+*@fn _msg_smil_cont_mgr_get_mms_body_struct_handle(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+*@brief This function returns msg mms data struct handle
+*@return mms data struct of current msg.
+*@param[in] smilContMgrHndle This is the handler to the SMILMessage Content Manager.
+*@param[out] None.
+*/
+msg_struct_t _msg_smil_cont_mgr_get_mms_body_struct_handle(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle);
+
+/**
+*@fn _msg_smil_cont_mgr_get_slide_time(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx, double *time);
+*@brief This API returns total slide duration after given slide index
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] slideIdx start slide index to get remain time
+*@param[in] bExcludeHp whether help page will be excluded from total slide time or not
+*@param[out] time calculated remain time
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_cont_mgr_get_slide_time(SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle, int slideIdx, MSG_BOOL bExcludeHp, double *time);
+#endif /*__MSG_CONTENT_MANAGER_SMIL_PLAYER_H__*/
+
diff --git a/viewer/smil-player/include/msg-smil-event-manager.h b/viewer/smil-player/include/msg-smil-event-manager.h
new file mode 100755
index 0000000..e4d4c6a
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-event-manager.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_EVENT_MANAGER_SMIL_PLAYER_H__
+#define __MSG_EVENT_MANAGER_SMIL_PLAYER_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-types.h"
+#include <Ecore.h>
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define MSG_MMS_SMIL_MAX_TIMER_IDX (MSG_MMS_SMIL_MEDIA_TYPES * 2) /* + 2 6 for the media (max 3 types of Media Begin/End) and 2 for the Page Begin/End. */
+#define MSG_MMS_SMIL_PAGE_MEDIA_IDX_ACTION 3
+#define MSG_MMS_SMIL_TIMER_CONVERT 1000
+#define MSG_MMS_SMIL_HELP_PAGE_DURATION 5000
+/*==================================================================================================
+ * STRUCTURES
+ *==================================================================================================*/
+typedef struct _SMIL_TIMER_DATA_S {
+ int mediaTimerDur[MSG_MMS_SMIL_MAX_TIMER_IDX][MSG_MMS_SMIL_PAGE_MEDIA_IDX_ACTION];
+ SMIL_PLAYER_PAGE_EVENT_E actionTypeOnPage;
+} SMIL_TIMER_DATA_S;
+
+typedef struct _SMIL_TIMER_CALLBACK_DATA_S {
+ int elementIdx; /*mediaIdx; This will carry the index to the elemnt (media/Page) whose timer is registered. -1 for Page, other values for Media.*/
+ SMIL_TIMER_DATA_S slideTimerInfo;
+ void *appUserData;
+ pfnSMILPlayerCb appSmilCb;
+ Ecore_Timer *timerHandle;
+ SMIL_SLIDE_EVENT_PARAM_S *curSlideParam;
+} SMIL_TIMER_CALLBACK_DATA_S;
+
+typedef struct _SMIL_EVENT_MGR_HANDLE_S {
+ SMIL_TIMER_CALLBACK_DATA_S *slideTimerCbData;
+ void *smilhandle;
+} SMIL_EVENT_MGR_HANDLE_S;
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+/**
+*@fn _msg_smil_create_event_mgr(void *cb, void *data , SMIL_EVENT_MGR_HANDLE_S **smilEvntMgrHndle);
+*@brief This function Initializes the Event Manager Handler.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] cb This is the call back to the Client.
+*@param[in] data This is the Client Instance Related data.
+*@param[in] smilEvntMgrHndle This is the handler to the SMIL Event Manager.
+*/
+MSG_SMIL_ERROR_E _msg_smil_create_event_mgr(void *cb, void *data, SMIL_EVENT_MGR_HANDLE_S **smilEvntMgrHndle);
+
+/**
+*@fn _msg_smil_destroy_event_mgr(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+*@brief This function destroys the handler and all the Event Manager related data.
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[out] None.
+*/
+void _msg_smil_destroy_event_mgr(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+/**
+*@fn _msg_smil_event_mgr_play_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, int curSlideIdx);
+*@brief This function fetches the slide info from the Content Manager,sends to the Call Back from the Client
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[in] curSlideIdx This represents the Slide Number to be Played.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_event_mgr_play_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, int curSlideIdx);
+
+/**
+*@fn _msg_smil_event_mgr_stop_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+*@brief This function stops the smil timer.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_event_mgr_stop_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+/**
+*@fn _msg_smil_event_mgr_pause_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle );
+*@brief This function kills the timer and calculates the remaining duration of the paused slide.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_event_mgr_pause_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+/**
+*@fn MSG_SMIL_ERROR_E _msg_smil_event_mgr_resume_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, int curSlideIdx );
+*@brief This function resumes the the paused slide and starts the timer with the remaining duration.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[in] curSlideIdx This is the Current Slide Index.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_event_mgr_resume_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, int curSlideIdx);
+
+/**
+*@fn _msg_smil_event_mgr_move_to_next_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+*@brief Facilitates the moving to next slide from the current if next slide is present.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_event_mgr_move_to_next_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+/**
+*@fn _msg_smil_event_mgr_slide_timer_cb(void* data);
+*@brief This function is the callback for the smil timer.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] data This is the data that is returned by the timer for use by the call back function.
+*@param[out] None.
+*/
+Eina_Bool _msg_smil_event_mgr_slide_timer_cb(void *data);
+
+/**
+*@fn _msg_smil_event_mgr_is_slide_active(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+*@brief This function is check if event slide is set or not
+*@return TRUE on success, else return FALSE
+*@param[in] smilEvntMgrHndle This is the handler to the SMILEvent Manager.
+*/
+MSG_BOOL _msg_smil_event_mgr_is_slide_active(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+SMIL_TIMER_CALLBACK_DATA_S *_msg_smil_event_mgr_get_timer_cb_data(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+SMIL_SLIDE_EVENT_PARAM_S *_msg_smil_event_mgr_get_slide_event_param_data(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+
+SMIL_SLIDE_INFO_S *_msg_smil_event_mgr_get_current_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_current_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, SMIL_SLIDE_INFO_S *singleSlide);
+
+double _msg_smil_event_mgr_get_slide_time(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_slide_time(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, double duration);
+
+MSG_BOOL _msg_smil_event_mgr_get_video_endofstream(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_video_endofstream(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, MSG_BOOL iseos);
+
+SMIL_PLAYER_PAGE_EVENT_E _msg_smil_event_mgr_get_page_action_type(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_page_action_type(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, SMIL_PLAYER_PAGE_EVENT_E page_event);
+
+MSG_BOOL _msg_smil_event_mgr_get_is_video_media(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_is_video_media(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, MSG_BOOL isvideo);
+
+MSG_BOOL _msg_smil_event_mgr_get_unsupported_content(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_unsupported_content(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, MSG_BOOL isunsupported);
+
+MSG_BOOL _msg_smil_event_mgr_get_invalid_video_ro(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle);
+MSG_BOOL _msg_smil_event_mgr_set_invalid_video_ro(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, MSG_BOOL isinvalid_ro);
+
+MSG_BOOL _msg_smil_event_mgr_set_last_slide(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, MSG_BOOL islast_slide);
+MSG_BOOL _msg_smil_event_mgr_set_render_event(SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle, SMIL_PLAYER_RENDER_EVENT_E render_event);
+
+#endif
diff --git a/viewer/smil-player/include/msg-smil-player-interface.h b/viewer/smil-player/include/msg-smil-player-interface.h
new file mode 100755
index 0000000..69dbd94
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-player-interface.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_SMIL_PLAYER_INTERFACE_H__
+#define __MSG_SMIL_PLAYER_INTERFACE_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-types.h"
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+ /**
+*@fn msg_smil_create_smil_player(msg_struct_t message, void *callBack, void *userData ,void **instance);
+*@brief This wrapper API shall facilitate the client to intitialize the process of the SMIL Player Creation.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] message This is the message details structure
+*@param[in] callBack This is the callBack function that the Application registers with the SMIL Player for communication from the Player's side.
+*@param[in] userData This is the application handler.
+*@param[out] instance This will have a void* to the instance created by the API.
+*/
+MSG_SMIL_ERROR_E msg_smil_create_smil_player(msg_struct_t message, void *callBack, void *userData , void **instance);
+
+/**
+*@fn msg_smil_destroy_smil_player(void *smilhandle);
+*@brief This wrapper API shall destroy smil player
+*@param[in] smilhandle Smil player handle.
+*/
+void msg_smil_destroy_smil_player(void *smilhandle);
+
+/**
+*@fn msg_smil_get_current_slide_idx(void *hSmilHandle);
+*@brief This wrapper API shall facilitate the client to fetch the current slide index.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] hSmilHandle This is the handler to the SMILMessage sent back to UI while creating SMIL Player.
+*@param[out] None.
+*/
+int msg_smil_get_current_slide_idx(void *hSmilHandle);
+
+/**
+*@fn msg_smil_get_current_slide_status(void *hSmilHandle);
+*@brief This wrapper API shall facilitate the client to get the current Slide Status.
+*@return SMIL_PLAYER_STATUS_E on success.
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[out] None.
+*/
+SMIL_PLAYER_STATUS_E msg_smil_get_current_slide_status(void *hSmilHandle);
+
+/**
+*@fn msg_smil_on_slide_event_handler(void **hSmilHandle, SMIL_PLAYER_EVENT_E playerEvent);
+*@brief This wrapper API shall give the client one gate way for all types of actions performed on the Slide.
+*@return MSG_SUCCESS on success , else failure return code
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] playerEvent This is the event that needs to be perfomed on the MMS message.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E msg_smil_on_slide_event_handler(void **hSmilHandle, SMIL_PLAYER_EVENT_E playerEvent);
+
+/**
+*@fn msg_smil_create_smil_player_layout(void *hSmilHandle, void *layout);
+*@brief This wrapper API shall create layout of SMILPlayer
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] layout This is layout window to be set to SMILPlayer.
+*@param[out] None.
+*/
+MSG_BOOL msg_smil_create_smil_player_layout(void *hSmilHandle, void *layout);
+
+/**
+*@fn msg_smil_set_smil_player_layout_size(void *hSmilHandle, SMIL_POSITION_S *left_top, SMIL_POSITION_S *right_bottom);
+*@brief This wrapper API shall set layout size of SMILPlayer. It must be called after calling msg_smil_create_smil_player_layout.
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] left_top x,y point info. of let-top position.
+*@param[in] right_bottom x,y point info. of right-bottom position.
+*@param[out] None.
+*/
+MSG_BOOL msg_smil_set_smil_player_layout_size(void *hSmilHandle, SMIL_POSITION_S *left_top, SMIL_POSITION_S *right_bottom);
+
+/*
+*@fn msg_smil_set_smil_player_help_page_cb(void *hSmilHandle, void *callBack, void *userData)
+*@brief This API shall change to render help page with player view
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] callBack This is the callBack function that the Application registers with the SMIL Player for help page.
+*@param[in] userData This is the application handler.
+*@param[out] None.
+*/
+MSG_BOOL msg_smil_set_smil_player_help_page_cb(void *hSmilHandle, void *callBack, void *userData);
+
+/**
+*@fn msg_smil_get_current_slide_info(void *hSmilHandle);
+*@brief This API shall facilitate the client to get the current Slide info.
+*@return SMIL_SLIDE_INFO_S on success.
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[out] None.
+*/
+SMIL_SLIDE_INFO_S *msg_smil_get_current_slide_info(void *hSmilHandle);
+
+/**
+*@fn msg_smil_get_slide_time(void *hSmilHandle, int slideIdx, double *slideTime);
+*@brief This API returns total slide duration after given slide index
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] slideIdx start slide index to get remain time
+*@param[in] bExcludeHp whether help page will be excluded from total slide time or not
+*@param[out] slideTime calculated remain time
+*@param[out] None.
+*/
+MSG_BOOL msg_smil_get_slide_time(void *hSmilHandle, int slideIdx, MSG_BOOL bExcludeHp, double *slideTime);
+#endif
diff --git a/viewer/smil-player/include/msg-smil-player.h b/viewer/smil-player/include/msg-smil-player.h
new file mode 100755
index 0000000..02dab1e
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-player.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_SMIL_PLAYER_H__
+#define __MSG_SMIL_PLAYER_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-content-manager.h"
+#include "msg-smil-event-manager.h"
+#include "msg-smil-render.h"
+#include <glib.h>
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define MSG_MMS_SMIL_SLIDEIDX_INCREMENT 1
+#define MSG_MMS_SMIL_SLIDEIDX_DECREMENT 1
+
+/*==================================================================================================
+ * STRUCTURES
+ *==================================================================================================*/
+typedef struct _SMIL_HANDLER_S {
+ SMIL_CONTENT_MGR_HANDLE_S *smilContMgrHndle; /* cont mgr handler*/
+ SMIL_EVENT_MGR_HANDLE_S *smilEvntMgrHndle; /* evnt mgr handler*/
+ SMIL_RENDERER_DATA_S *smilRenderer; /* smil render */
+} SMIL_HANDLER_S;
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+/**
+*@fn _msg_smil_create_smil_player(msg_struct_t message, void *callBack, void *userData ,void **instance);
+*@brief This API shall facilitate the client to intitialize the process of the SMIL Player Creation.
+*@return MSG_SMIL_SUCCESS on success , else failure return code
+*@param[in] message This is the message details structure
+*@param[in] callBack This is the callBack function that the Application registers with the SMIL Player for communication from the Player's side.
+*@param[in] userData This is the application handler.
+*@param[out] instance This will have a void* to the instance created by the SMIL Player.
+*/
+MSG_SMIL_ERROR_E _msg_smil_create_smil_player(msg_struct_t message, void *callBack, void *userData, void **instance);
+
+/**
+*@fn _msg_smil_destroy_smil_player(void *smilhandle);
+*@brief This API destroy smil player
+*@param[out] smilhandle SMIL player handle.
+*/
+void _msg_smil_destroy_smil_player(void *smilhandle);
+
+/**
+*@fn _msg_smil_get_content_mgr(void *hSmilHandle);
+*@brief This API shall fetch content manager handle.
+*@return returns content manager handle on Success, else return NULL.
+*@param[in] hSmilHandle This is the handler to the SMILMessage..
+*/
+SMIL_CONTENT_MGR_HANDLE_S *_msg_smil_get_content_mgr(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_get_event_mgr(void *hSmilHandle);
+*@brief This API shall fetch event manager handle.
+*@return returns event manager handle on Success, else return NULL.
+*@param[in] hSmilHandle This is the handler to the SMILMessage..
+*/
+SMIL_EVENT_MGR_HANDLE_S *_msg_smil_get_event_mgr(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_get_renderder(void *hSmilHandle);
+*@brief This API shall fetch renderer handle.
+*@return returns renderer handle on Success, else return NULL.
+*@param[in] hSmilHandle This is the handler to the SMILMessage..
+*/
+SMIL_RENDERER_DATA_S *_msg_smil_get_renderder(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_get_current_slide_idx(void *hSmilHandle);
+*@brief This API shall fetch the current slide index.
+*@return returns the current Slide index.
+*@param[in] hSmilHandle This is the handler to the SMILMessage..
+*/
+int _msg_smil_get_current_slide_idx(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_get_current_slide_status(void *hSmilHandle);
+*@brief This API shall facilitate the client to get the current Slide Status.
+*@return SMIL_PLAYER_STATUS_E on success.
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[out] None.
+*/
+SMIL_PLAYER_STATUS_E _msg_smil_get_current_slide_status(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_player_on_slide_event_handler(void **hSmilHandle, SMIL_PLAYER_EVENT_E playerEvent);
+*@brief This API shall give the client one gate way for all types of actions performed on the Slide.
+*@return MSG_SMIL_SUCCESS on success, else failure return code
+*@param[in SmilHandle This is the handler to the SMILMessage.
+*@param[in] playerEvent This is the action that needs to be performed on the current slide.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_player_on_slide_event_handler(void **hSmilHandle, SMIL_PLAYER_EVENT_E playerEvent);
+
+/**
+*@fn _msg_smil_create_smil_player_layout(void *hSmilHandle, void *layout);
+*@brief This API shall create layout of SMILPlayer.
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] layout This is layout window to be set to SMILPlayer
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_create_smil_player_layout(void *hSmilHandle, void *layout);
+
+/**
+*@fn _msg_smil_set_smil_player_layout_size(void *hSmilHandle, SMIL_POSITION_S* left_top, SMIL_POSITION_S* right_bottom);
+*@brief This API shall set layout window to SMILPlayer.
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] left_top x,y point info. of let-top position.
+*@param[in] right_bottom x,y point info. of right-bottom position.
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_set_smil_player_layout_size(void *hSmilHandle, SMIL_POSITION_S *left_top, SMIL_POSITION_S *right_bottom);
+
+/*
+*@fn _msg_smil_set_smil_player_help_page_cb(void *hSmilHandle, void *callBack, void *userData)
+*@brief This API let player viewer able to render help page with renderer handle
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] callBack This is the callBack function that the Application registers with the SMIL Player for help page.
+*@param[in] userData This is the application handler.
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_set_smil_player_help_page_cb(void *hSmilHandle, void *callBack, void *userData);
+
+/**
+*@fn _msg_smil_get_current_slide_info(void *hSmilHandle);
+*@brief This API shall facilitate the client to get the current Slide info.
+*@return SMIL_SLIDE_INFO_S on success.
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[out] None.
+*/
+SMIL_SLIDE_INFO_S *_msg_smil_get_current_slide_info(void *hSmilHandle);
+
+/**
+*@fn _msg_smil_get_slide_time(void *hSmilHandle, int slideIdx, double *slideTime);
+*@brief This API returns total slide duration after given slide index
+*@return TRUE on success , else FALSE return
+*@param[in] hSmilHandle This is the handler to the SMILMessage.
+*@param[in] slideIdx start slide index to get remain time
+*@param[in] bExcludeHp whether help page will be excluded from total slide time or not
+*@param[out] slideTime calculated remain time
+*@param[out] None.
+*/
+MSG_BOOL _msg_smil_get_slide_time(void *hSmilHandle, int slideIdx, MSG_BOOL bExcludeHp, double *slideTime);
+
+#endif
diff --git a/viewer/smil-player/include/msg-smil-render.h b/viewer/smil-player/include/msg-smil-render.h
new file mode 100755
index 0000000..4dd88c9
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-render.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_SMIL_RENDER_H__
+#define __MSG_SMIL_RENDER_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-types.h"
+#include "msg-smil-util.h"
+#include <msg.h>
+#include <stdio.h>
+#include <Ecore_X.h>
+#include <Ethumb.h>
+#include <Elementary.h>
+#include <ui-gadget-module.h>
+#include "msg-ui-viewer-drm-utility.h"
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define VIEWER_W (480.0)
+#define VIEWER_XPAD_RATIO (0.02)
+#define VIEWER_VIDEO_WIDTH 176
+#define VIEWER_VIDEO_HEIGHT 144
+#define VIEWER_TEXT_FONT_LEN 1024
+
+#define VIEWER_FONT_STYLE_BUF_LEN 10
+
+typedef unsigned char VIEWER_BYTE;
+typedef unsigned short VIEWER_WORD;
+typedef unsigned long VIEWER_DWORD;
+typedef unsigned long VIEWER_COLORREF;
+#define VIEWER_RGB(r, g, b) ((VIEWER_COLORREF)(((VIEWER_BYTE)(r) | ((VIEWER_WORD)((VIEWER_BYTE)(g)) << 8)) | (((VIEWER_DWORD)(VIEWER_BYTE)(b)) << 16)))
+
+/*==================================================================================================
+ * ENUMERATIONS
+ *==================================================================================================*/
+enum viewer_media_player_state {
+ MEDIA_PLAYER_STATE_NONE = 0X00,
+ MEDIA_PLAYER_STATE_INIT,
+ MEDIA_PLAYER_STATE_READY,
+ MEDIA_PLAYER_STATE_PLAYING,
+ MEDIA_PLAYER_STATE_PAUSED,
+ MEDIA_PLAYER_STATE_STOP
+};
+
+typedef enum {
+ VIEWER_IMAGE_TYPE_NONE = 0,
+ VIEWER_IMAGE_TYPE_NORMAL,
+ VIEWER_IMAGE_TYPE_DRM_IMAGE,
+ VIEWER_IMAGE_TYPE_DRM_IMAGE_RAW_DATA,
+ VIEWER_IMAGE_TYPE_DRM_VIDEO,
+ VIEWER_IMAGE_TYPE_DRM_SOUND,
+ VIEWER_IMAGE_TYPE_UNSUPPORTED,
+} SMIL_RENDER_IMAGE_TYPE_E;
+
+/*==================================================================================================
+ * STRUCTURES
+ *==================================================================================================*/
+typedef struct viewer_tagRGBQUAD {
+ VIEWER_BYTE rgbBlue;
+ VIEWER_BYTE rgbGreen;
+ VIEWER_BYTE rgbRed;
+ VIEWER_BYTE rgbReserved;
+} SMIL_RGBQUAD;
+
+typedef union {
+ SMIL_RGBQUAD rgbQuad;
+ VIEWER_COLORREF rgbColor;
+} SMIL_RGB_UNION;
+
+typedef struct _SMIL_FONT_SYTLE_S {
+ int font_size;
+ char font_color[VIEWER_RGB_COLOR_BUF_LEN + 1]; /*"#ffffff"*/
+ char font_style[VIEWER_FONT_STYLE_BUF_LEN + 1]; /*"link", "em", etc.*/
+} SMIL_FONT_SYTLE_S;
+
+typedef struct _SMIL_RENDERER_DATA_S {
+ void *smilhandle;
+ msg_struct_t msg_info_t;
+ Evas_Object *main_window;
+ Evas_Object *layout_main;
+ Evas_Object *viewer_scroller;
+ Evas_Object *viewer_content_box; /*it contans text(entry) and image*/
+ Evas_Object *viewer_bg_rect;
+ Evas_Object *viewer_body; /*it shows text , entry*/
+
+ char *viewer_body_text; /*set page text*/
+ Evas_Object *insert_image;
+ Evas_Object *insert_sound_icon; /*display invalid drm sound icon*/
+ Evas_Object *insert_unsupported_icon; /*display unsupported icon*/
+ Evas_Object *video_image;
+ Evas_Object *attach_list; /* attach list for help page */
+ unsigned char *video_image_buffer; /*Evas Object Image buffer*/
+ Ecore_Timer *video_update_timer;
+ MSG_BOOL is_skip_frame; /*it is used to skip 1 frame of videostream cb*/
+ int video_width;
+ int video_height;
+ int video_duration; /*video content's duration*/
+ Ecore_Idler *video_resize_idle;
+ Ecore_Idler *video_duration_idle;
+ Ecore_Idler *video_eos_idle;
+
+ int player_state;
+ int viewer_width;
+ int viewer_height;
+ int viewer_landscape_width;
+ int viewer_landscape_height;
+ int button_height;
+ int main_win_rotate; /*current rotation value of main window*/
+
+ pfnSMILHelpPageCb appSmilHelpPageCb;
+ void *appUserData;
+
+ VIEWER_COLORREF bgcolor;
+ MSG_BOOL ismute; /*sound, video mute mode when silent mode*/
+
+ MSG_UI_DRM_CONSUME_S display_drm_consume; /*drm consume handle for image*/
+ MSG_UI_DRM_CONSUME_S play_drm_consume; /*drm consume handle for sound, video*/
+
+ char *working_path;
+} SMIL_RENDERER_DATA_S;
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+MSG_SMIL_ERROR_E _msg_smil_create_render(SMIL_RENDERER_DATA_S **viewerRenderData);
+void _msg_smil_destroy_render(SMIL_RENDERER_DATA_S *viewerRenderData);
+MSG_BOOL _msg_smil_init_render(SMIL_RENDERER_DATA_S *viewerRenderData);
+
+/*Create and set layout to display viewer*/
+MSG_BOOL _msg_smil_render_create_layout(SMIL_RENDERER_DATA_S *viewerRenderData, Evas_Object *layout);
+MSG_BOOL _msg_smil_render_set_layout_size(SMIL_RENDERER_DATA_S *viewerRenderData, SMIL_POSITION_S *left_top, SMIL_POSITION_S *right_bottom);
+MSG_BOOL _msg_smil_render_set_mute(SMIL_RENDERER_DATA_S *viewerRenderData, MSG_BOOL ismute);
+MSG_BOOL _msg_smil_render_set_help_page_cb(SMIL_RENDERER_DATA_S *viewerRenderData, void *callBack, void *userData);
+
+/**
+*@fn _msg_smil_render_on_slide_render_handler(SMIL_RENDERER_DATA_S *viewerRenderData, SMIL_SLIDE_EVENT_PARAM_S *eventStatus);
+*@brief This API shall handle render event to display mms contents
+*@return MSG_SMIL_SUCCESS on success, else failure return code
+*@param[in] viewerRenderData This is the handler of SMIL_RENDERER_DATA_S.
+*@param[in] eventStatus This is the eventstatus of a current slide.
+*@param[out] None.
+*/
+MSG_SMIL_ERROR_E _msg_smil_render_on_slide_render_handler(SMIL_RENDERER_DATA_S *viewerRenderData, SMIL_SLIDE_EVENT_PARAM_S *eventStatus);
+MSG_BOOL _msg_smil_render_reload_mms(SMIL_RENDERER_DATA_S *viewerRenderData, SMIL_SLIDE_EVENT_PARAM_S *eventStatus);
+
+
+/*==================================================================================================
+ * Text related functions
+ *==================================================================================================*/
+MSG_BOOL _msg_smil_render_show_inserted_text(SMIL_RENDERER_DATA_S *viewerRenderData, const char *path);
+MSG_BOOL _msg_smil_render_show_help_page_attach_list(SMIL_RENDERER_DATA_S *viewerRenderData);
+
+/*==================================================================================================
+ * Media related functions
+ *==================================================================================================*/
+MSG_BOOL _msg_smil_render_show_inserted_audio(SMIL_RENDERER_DATA_S *viewerRenderData, const char *path);
+MSG_BOOL _msg_smil_render_show_inserted_image(SMIL_RENDERER_DATA_S *viewerRenderData, const char *path);
+MSG_BOOL _msg_smil_render_show_inserted_video(SMIL_RENDERER_DATA_S *viewerRenderData, const char *path);
+
+/*smil player sound and video related functions*/
+MSG_BOOL _msg_smil_render_pause(void *data, int mediaType);
+MSG_BOOL _msg_smil_render_resume(void *data, int mediaType);
+
+/**
+*@fn _msg_smil_render_stop_playing_file(void *data)
+*@brief This API shall stop and destroy mm player
+*@return TRUE on success , else FALSE return code
+*@param[in] data This is the smil render structure
+*/
+MSG_BOOL _msg_smil_render_stop_playing_file(void *data);
+
+/**
+*@fn _msg_smil_render_rotate_video_window(void *data)
+*@brief This API shall rotate video window according to rotated status of viewer's main window
+*@param[in] data This is the smil render structure
+*/
+void _msg_smil_render_rotate_video_window(void *data);
+
+#endif
diff --git a/viewer/smil-player/include/msg-smil-types.h b/viewer/smil-player/include/msg-smil-types.h
new file mode 100755
index 0000000..6cfada9
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-types.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_SMIL_TYPES_H__
+#define __MSG_SMIL_TYPES_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include <msg.h>
+#include <msg_storage.h>
+#include <msg_transport.h>
+#include "msg-ui-util.h"
+#include "msg-ui-viewer-types.h"
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define MSG_INVALID_INDEX 0
+#define MSG_MMS_SMIL_MEDIA_TYPES 3
+
+/*==================================================================================================
+ * ENUMERATIONS
+ *==================================================================================================*/
+typedef enum _MSG_SMIL_ERROR_E {
+ MSG_SMIL_SUCCESS = 0,
+ MSG_ERR_SMIL_UNKNOWN,
+ MSG_ERR_SMIL_NULL_MESSAGE,
+ MSG_ERR_SMIL_EVENT_NONE,
+ MSG_ERR_SMIL_INVALID_STORAGE,
+ MSG_ERR_SMIL_PAUSE_SLIDE_EVENT_FAILURE,
+ MSG_ERR_SMIL_PAUSE_SLIDE_CONTENT_FAILURE,
+ MSG_ERR_SMIL_PAUSE_SLIDE_RENDER_FAILURE, /*smil render pause control*/
+ MSG_ERR_SMIL_RESUME_SLIDE_RENDER_FAILURE, /*smil render resume control*/
+ MSG_ERR_SMIL_STOP_SLIDE_RENDER_FAILURE, /*smil render stop control*/
+ MSG_ERR_SMIL_UPDATE_CONTENT_MGR_FAILURE,
+ MSG_ERR_SMIL_INVALID_PARAMETER,
+ MSG_ERR_SMIL_INVALID_SLIDE,
+ MSG_ERR_SMIL_INVALID_MEDIA_TIMESTAMPS,/*All media in the slide have invalid timestamps*/
+ MSG_ERR_SMIL_TIMER_FAILURE,
+ MSG_ERR_SMIL_DATA_RETREIVAL_FAILURE,
+ MSG_ERR_SMIL_UI_DISPLAY_FAIURE,
+} MSG_SMIL_ERROR_E;
+
+typedef enum _SMIL_PLAYER_EVENT_E {
+ PLAYER_EVENT_NONE = 0,
+ PLAYER_EVENT_INIT,
+ PLAYER_EVENT_PLAY,
+ PLAYER_EVENT_PREVIEW_PLAY,
+ PLAYER_EVENT_STOP,
+ PLAYER_EVENT_PAUSE,
+ PLAYER_EVENT_RESUME,
+ PLAYER_EVENT_NEXT_SLIDE,
+ PLAYER_EVENT_PREV_SLIDE,
+ PLAYER_EVENT_MUTE,
+ PLAYER_EVENT_ROTATE_WINDOW,
+ PLAYER_EVENT_DESTROY_SCREEN,
+} SMIL_PLAYER_EVENT_E;
+
+typedef enum _SMIL_PLAYER_STATUS_E {
+ PLAYER_STATUS_NONE = 0,
+ PLAYER_STATUS_PLAYING,
+ PLAYER_STATUS_PLAY_END,
+ PLAYER_STATUS_STOPPED,
+ PLAYER_STATUS_PAUSED,
+ PLAYER_STATUS_INVALID,
+} SMIL_PLAYER_STATUS_E;
+
+typedef enum _SMIL_PLAYER_MEDIA_EVENT_E {
+ MEDIA_EVENT_NONE = 0,
+ MEDIA_EVENT_BEGIN,
+ MEDIA_EVENT_END,
+} SMIL_PLAYER_MEDIA_EVENT_E;
+
+typedef enum _SMIL_PLAYER_PAGE_EVENT_E {
+ PAGE_EVENT_PLAY = 0,
+ PAGE_EVENT_END,
+ PAGE_EVENT_INTERNAL_MEDIA,
+ PAGE_EVENT_MOVE_TO_NEXT,
+ PAGE_EVENT_MOVE_TO_PREV,
+ PAGE_EVENT_NONE,
+} SMIL_PLAYER_PAGE_EVENT_E;
+
+typedef enum _SMIL_PLAYER_RENDER_EVENT_E {
+ SMIL_RENDER_EVENT_NONE = -1,
+ SMIL_RENDER_EVENT_PAGE_PLAY_START = 0, /* Start playing the Page */
+ SMIL_RENDER_EVENT_PAGE_MEDIA_PLAY_START, /* Start Playing both Page and Media at the same time*/
+ SMIL_RENDER_EVENT_PAUSE_CURRENT_PAGE, /*Puase player by interrupted earjack off*/
+ SMIL_RENDER_EVENT_LAST_PAGE_PLAY_COMPLETE, /* For notifying the Client about the last slide */
+ SMIL_RENDER_EVENT_DESTROY_SCREEN, /*This Event is called to destroy current screen*/
+ SMIL_RENDER_EVENT_ERROR, /* Stop playing because of Error*/
+} SMIL_PLAYER_RENDER_EVENT_E;
+
+/*==================================================================================================
+ * STRUCTURES
+ *==================================================================================================*/
+/*Common Data for the Slide.*/
+typedef struct _SMIL_PAGE_INFO_S {
+ MSG_BOOL hasText;
+ MSG_BOOL hasImage;
+ MSG_BOOL hasVideo;
+ MSG_BOOL hasAudio;
+ MSG_BOOL isTexttop;
+ MSG_BOOL isHelpPage;
+ int pageDuration;
+ int mediaCnt;
+} SMIL_PAGE_INFO_S;
+
+/*Common Data for the Slide.*/
+typedef struct _SMIL_MASTER_SLIDE_INFO_S {
+ int pageCnt; /*total no of pages.*/
+ int regionCnt;
+ int attachCnt;
+ int transitionCnt;
+ int metaCnt;
+} SMIL_MASTER_SLIDE_INFO_S;
+
+/*Structure for Per Slide Information Queue Implementation.*/
+typedef struct _SMIL_SLIDE_INFO_S {
+ int pageIdx; /*Index of the Current page.*/
+ SMIL_PAGE_INFO_S *pageInfo;
+ SMIL_MASTER_SLIDE_INFO_S *commonData; /*Data common to ll the Slides.*/
+ SMIL_PLAYER_STATUS_E slideStatus; /*Slide's Current Status.*/
+
+ struct _SMIL_SLIDE_INFO_S *nextSlide; /*Address of the next Slide in the Queue.NULL if its the last slide.*/
+ struct _SMIL_SLIDE_INFO_S *prevSlide; /*Address of the next Slide in the Queue.NULL if its the first slide.*/
+} SMIL_SLIDE_INFO_S;
+
+typedef struct _SMIL_MEDIA_TIMER_S {
+ int mediaIdx;
+ SMIL_PLAYER_MEDIA_EVENT_E actionTypeOnMedia; /* This will define what action needs to be performed by the Client on the particular meida.*/
+} SMIL_MEDIA_TIMER_S;
+
+/* This is the structure that is sent to the client in its callback */
+typedef struct _SMIL_SLIDE_CLIENT_CB_PARAM_S {
+ int pageIdx;
+ int pageCnt;
+ SMIL_PLAYER_RENDER_EVENT_E clientCbEvent;
+ MSG_BOOL isLastSlide;
+} SMIL_SLIDE_CLIENT_CB_PARAM_S;
+
+typedef struct _SMIL_SLIDE_EVENT_PARAM_S {
+ SMIL_SLIDE_INFO_S *singleSlideInfo;
+ SMIL_PLAYER_RENDER_EVENT_E renderEvent;
+ SMIL_MEDIA_TIMER_S timerDataMedia[MSG_MMS_SMIL_MEDIA_TYPES]; /* Media Related Action - Start/End */
+ MSG_BOOL isLastSlide;
+ MSG_BOOL isVideoMedia;
+ MSG_BOOL isVideoRoInvalid; /*This is set if video content has valid drm ro or not*/
+ MSG_BOOL iseos; /*This is set when end of stream of sound or video is passed*/
+ MSG_BOOL isUnsupportedContent; /*This is set, if unsupported content is inserted on current page*/
+ double timerDur; /*This is set, page timer duration*/
+ SMIL_SLIDE_CLIENT_CB_PARAM_S clientCbParam;
+} SMIL_SLIDE_EVENT_PARAM_S;
+
+typedef struct SMIL_POSITION_S {
+ int x;
+ int y;
+} SMIL_POSITION_S;
+
+typedef MSG_SMIL_ERROR_E(*pfnSMILPlayerCb)(SMIL_SLIDE_CLIENT_CB_PARAM_S *eventStatus, void *appUserData);
+typedef MSG_SMIL_ERROR_E(*pfnSMILEventCb)(void *data, void *obj, void *event_info);
+typedef MSG_SMIL_ERROR_E(*pfnSMILHelpPageCb)(void *appUserData, void **attach_list, void *box);
+
+#endif
diff --git a/viewer/smil-player/include/msg-smil-util.h b/viewer/smil-player/include/msg-smil-util.h
new file mode 100755
index 0000000..43e3039
--- /dev/null
+++ b/viewer/smil-player/include/msg-smil-util.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MSG_SMIL_UTIL_H__
+#define __MSG_SMIL_UTIL_H__
+/*==================================================================================================
+ * INCLUDE HEADERS
+ *==================================================================================================*/
+#include "msg-smil-types.h"
+
+/*==================================================================================================
+ * DEFINITIONS
+ *==================================================================================================*/
+#define VIEWER_COLOR_HEXA_BUFFER_LEN 2
+#define VIEWER_HEXA_SIZE 16
+#define VIEWER_RGB_COLOR_BUF_LEN 7
+
+/*==================================================================================================
+ * ENUMERATIONS
+ *==================================================================================================*/
+
+typedef enum {
+ VIEWER_SMIL_REGION_IMAGE,
+ VIEWER_SMIL_REGION_TEXT,
+ VIEWER_SMIL_REGION_MAX
+} VIEWER_SMIL_REGION_TYPE_E;
+
+/*==================================================================================================
+ * FUNCTION DECLARATIONS
+ *==================================================================================================*/
+
+void _msg_smil_util_get_color_string(char *pszBuffer, int pszBuffer_len, int r, int g, int b);
+
+int _msg_smil_util_find_smallest(int num1, int num2);
+#endif