[4.0] Added checker of video texture 42/155742/1 accepted/tizen/4.0/unified/20171017.212927 submit/tizen_4.0/20171017.144330 submit/tizen_4.0/20171017.145254
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 16 Oct 2017 05:07:02 +0000 (14:07 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 16 Oct 2017 05:07:09 +0000 (14:07 +0900)
This reverts commit 564809729023bfa0963fef565eea9f1b8678a869.

Change-Id: I37057aa50fa635865b840cc44b2a1b460e229ed3

build/tizen/Makefile.am
build/tizen/configure.ac
dali-extension/video-player/tizen-video-player.cpp
dali-extension/video-player/tizen-video-player.h
packaging/dali-extension.spec

index 4ad3df7..228a26b 100644 (file)
@@ -64,6 +64,7 @@ libdali_video_player_plugin_la_CXXFLAGS = -DDALI_COMPILATION \
                       $(DALI_CFLAGS) \
                       $(ECORE_WAYLAND_CFLAGS) \
                       $(CAPI_MEDIA_PLAYER_CFLAGS) \
+                      $(CAPI_SYSTEM_INFO_CFLAGS) \
                       -I../../dali-extension/video-player \
                       -Werror -Wall
 
@@ -71,7 +72,8 @@ libdali_video_player_plugin_la_LIBADD = \
                       $(DLOG_LIBS) \
                       $(DALI_LIBS) \
                       $(ECORE_WAYLAND_LIBS) \
-                      $(CAPI_MEDIA_PLAYER_LIBS)
+                      $(CAPI_MEDIA_PLAYER_LIBS) \
+                      $(CAPI_SYSTEM_INFO_LIBS)
 
 libdali_video_player_plugin_la_LDFLAGS = \
                       -rdynamic
index d534bce..0adc7d4 100644 (file)
@@ -27,6 +27,7 @@ PKG_CHECK_MODULES([DALI], [dali-core dali-adaptor dali-toolkit])
 # ToDO Videoplayer plugin separation
 PKG_CHECK_MODULES(CAPI_MEDIA_PLAYER, capi-media-player)
 PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
+PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
 
 devincludepath=${includedir}
 AC_SUBST(devincludepath)
index cbb2c19..1e22c5f 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/common/stage.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/integration-api/debug.h>
+#include <system_info.h>
 
 // INTERNAL INCLUDES
 
@@ -66,7 +67,6 @@ static void MediaPacketVideoDecodedCb( media_packet_h packet, void* user_data )
 static void EmitPlaybackFinishedSignal( void* user_data )
 {
   TizenVideoPlayer* player = static_cast< TizenVideoPlayer* >( user_data );
-  DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.\n" );
 
   if( player == NULL )
   {
@@ -74,8 +74,6 @@ static void EmitPlaybackFinishedSignal( void* user_data )
     return;
   }
 
-  DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.\n" );
-
   if( !player->mFinishedSignal.Empty() )
   {
     DALI_LOG_ERROR( "EmitPlaybackFinishedSignal.3\n" );
@@ -685,6 +683,8 @@ void TizenVideoPlayer::SetDisplayArea( DisplayArea area )
 
   )
   {
+    area.x = ( area.x < 0 ) ? 0: area.x;
+    area.y = ( area.y < 0 ) ? 0: area.y;
     int error = player_set_display_roi_area( mPlayer, area.x, area.y, area.width, area.height );
     LogPlayerError( error );
   }
@@ -739,5 +739,21 @@ void TizenVideoPlayer::Backward( int millisecond )
   }
 }
 
+bool TizenVideoPlayer::IsVideoTextureSupported()
+{
+  bool featureFlag = true;
+  int error = SYSTEM_INFO_ERROR_NONE;
+
+  error = system_info_get_platform_bool( "tizen.org/feature/multimedia.raw_video", &featureFlag );
+
+  if( error != SYSTEM_INFO_ERROR_NONE )
+  {
+    DALI_LOG_ERROR( "Plugin can't check platform feature\n" );
+    return false;
+  }
+
+  return featureFlag;
+}
+
 } // namespace Plugin
 } // namespace Dali;
index 975a718..2dc2b0a 100644 (file)
@@ -173,6 +173,11 @@ public:
    */
   void Backward( int millisecond );
 
+  /**
+   * @brief Dali::VideoPlayer::IsVideoTextureSupported()
+   */
+  bool IsVideoTextureSupported();
+
 private:
 
   /**
index d017b07..9f5ebd7 100644 (file)
@@ -57,6 +57,7 @@ Summary:    Plugin to play a video file for Dali
 Group:      System/Libraries
 BuildRequires: pkgconfig(ecore-wayland)
 BuildRequires: pkgconfig(capi-media-player)
+BuildRequires: pkgconfig(capi-system-info)
 
 %description video-player-plugin
 VideoPlayer plugin to play a video file for Dali