Fixed: video in msg body 97/64497/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 1 Apr 2016 11:52:11 +0000 (14:52 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Tue, 5 Apr 2016 08:34:44 +0000 (01:34 -0700)
Change-Id: I93370dc1622f1d797abb31f8adab0c4949ebba3b
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/Body/Controller/src/Page.cpp
src/Conversation/Body/View/inc/VideoPageViewItem.h
src/Conversation/Body/View/src/VideoPageViewItem.cpp

index 775f791..fc10d61 100644 (file)
@@ -266,7 +266,7 @@ void Page::addVideo(const std::string &videoFilePath)
 
     if(!newVideoFilePath.empty())
     {
-        long long fileSize = FileUtils::getFileSize(thumbFilePath);
+        long long fileSize = FileUtils::getFileSize(newVideoFilePath);
         // FIXME: if getVideoFrame returns false ?
         MediaUtils::getVideoFrame(videoFilePath, thumbFilePath);
         m_Body.addVideo(*this, newVideoFilePath, fileSize, thumbFilePath);
index 5a1d467..b1239e9 100644 (file)
@@ -32,6 +32,7 @@ namespace Msg
             virtual ~VideoPageViewItem();
 
             virtual Type getType() const;
+            virtual std::string getFileName() const;
     };
 }
 
index 6190d07..82fda1c 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "VideoPageViewItem.h"
+#include "FileUtils.h"
 
 using namespace Msg;
 
@@ -29,6 +30,11 @@ VideoPageViewItem::~VideoPageViewItem()
 {
 }
 
+std::string VideoPageViewItem::getFileName() const
+{
+    return FileUtils::getFileName(getResourcePath());
+}
+
 VideoPageViewItem::Type VideoPageViewItem::getType() const
 {
     return VideoType;