Add api for get the internal media player handle of the VideoView
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-video-player.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 6e539eb..957681e
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,10 +34,15 @@ class VideoPlayer: public Dali::BaseObject
 public:
 
   VideoPlayer()
+  : mUrl(),
+    mVolumeLeft( 0.0f ),
+    mVolumeRight( 0.0f ),
+    mFinishedSignal(),
+    mMuted( false ),
+    mLooping( false),
+    mPlayPosition( 0 ),
+    mDisplyMode( Dali::VideoPlayerPlugin::DisplayMode::DST_ROI )
   {
-    mMuted = false;
-    mLooping = false;
-    mPlayPosition = 0;
   }
 
   void SetMuted( bool muted )
@@ -78,6 +83,22 @@ public:
     mPlayPosition = pos;
   }
 
+  Dali::VideoPlayerPlugin::DisplayMode::Type GetDisplayMode() const
+  {
+    return mDisplyMode;
+  }
+
+  void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
+  {
+    mDisplyMode = mode;
+  }
+
+  Any GetMediaPlayer()
+  {
+    return NULL;
+  }
+
+
 public:
 
   std::string mUrl;
@@ -90,6 +111,7 @@ private:
   bool mMuted;
   bool mLooping;
   int mPlayPosition;
+  Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode;
 };
 
 inline VideoPlayer& GetImplementation( Dali::VideoPlayer& player )
@@ -261,5 +283,20 @@ Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const
   return Dali::VideoPlayerPlugin::CodecType::DEFAULT;
 }
 
+void VideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
+{
+  Internal::Adaptor::GetImplementation( *this ).SetDisplayMode( mode );
+}
+
+Dali::VideoPlayerPlugin::DisplayMode::Type VideoPlayer::GetDisplayMode() const
+{
+  return Internal::Adaptor::GetImplementation( *this ).GetDisplayMode();
+}
+
+Any VideoPlayer::GetMediaPlayer()
+{
+  return Internal::Adaptor::GetImplementation( *this ).GetMediaPlayer();
+}
+
 } // namespace Dali;