From a42cde9b2a8b0d645013beca25949999ce32e76f Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Mon, 29 Aug 2016 17:43:53 +0300 Subject: [PATCH] Fixed: page duration Change-Id: Ie14c8c93328ff40a43f198f6e317ae30c420c366 Signed-off-by: Denis Dolzhenko --- src/Common/MsgEngine/inc/MsgPage.h | 4 ++-- src/Conversation/Body/Controller/src/Body.cpp | 2 +- src/Viewer/Controller/inc/SmilPage.h | 2 +- src/Viewer/Controller/src/SmilPage.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Common/MsgEngine/inc/MsgPage.h b/src/Common/MsgEngine/inc/MsgPage.h index c5cf27e..5195dd6 100644 --- a/src/Common/MsgEngine/inc/MsgPage.h +++ b/src/Common/MsgEngine/inc/MsgPage.h @@ -55,13 +55,13 @@ namespace Msg /** * @brief Sets page duration. - * @param[in] duration page duration in seconds. + * @param[in] duration page duration in milliseconds. */ virtual void setPageDuration(int duration) = 0; /** * @brief Gets page duration. - * @return duration page duration in seconds. + * @return duration page duration in milliseconds. */ virtual int getPageDuration() const = 0; }; diff --git a/src/Conversation/Body/Controller/src/Body.cpp b/src/Conversation/Body/Controller/src/Body.cpp index 8300efb..cfe4670 100644 --- a/src/Conversation/Body/Controller/src/Body.cpp +++ b/src/Conversation/Body/Controller/src/Body.cpp @@ -116,7 +116,7 @@ void Body::addAttachment(const std::string &filePath) void Body::addFileToPage(MessageMms &msg,const std::string &filePath) { - static const int defaultPageDuration = 5; // sec + static const int defaultPageDuration = 5000; // sec if(!filePath.empty()) { MsgPage &msgPage = msg.addPage(); diff --git a/src/Viewer/Controller/inc/SmilPage.h b/src/Viewer/Controller/inc/SmilPage.h index f9d49b0..fbf36fd 100644 --- a/src/Viewer/Controller/inc/SmilPage.h +++ b/src/Viewer/Controller/inc/SmilPage.h @@ -71,7 +71,7 @@ namespace Msg virtual void onItemClicked(SmilSaveAllItemView &item); private: - int m_Duration; + int m_Duration; // seconds std::string m_MediaPath; Evas_Object *m_pVideoSink; bool m_HasAudio; diff --git a/src/Viewer/Controller/src/SmilPage.cpp b/src/Viewer/Controller/src/SmilPage.cpp index 42b0f32..13f125e 100644 --- a/src/Viewer/Controller/src/SmilPage.cpp +++ b/src/Viewer/Controller/src/SmilPage.cpp @@ -122,7 +122,7 @@ const MsgMedia *SmilPage::getMedia(const MsgPage &page, MsgMedia::Type type) con void SmilPage::build(const MsgPage &page) { - m_Duration = page.getPageDuration(); + m_Duration = page.getPageDuration() / 1000.0 + 0.5; const MsgMediaList &list = page.getMediaList(); for(int i = 0; i < list.getLength(); ++i) -- 2.7.4