[4.0] Added APIs for codec and seek in VideoView
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-video-player.cpp
index fbd0ebc..4cd9ef6 100644 (file)
@@ -38,6 +38,7 @@ public:
   {
     mMuted = false;
     mLooping = false;
+    mPlayPosition = 0;
   }
 
   void SetMuted( bool muted )
@@ -68,6 +69,16 @@ public:
     }
   }
 
+  int GetPlayPosition()
+  {
+    return mPlayPosition;
+  }
+
+  void SetPlayPosition( int pos )
+  {
+    mPlayPosition = pos;
+  }
+
 public:
 
   std::string mUrl;
@@ -79,6 +90,7 @@ private:
 
   bool mMuted;
   bool mLooping;
+  int mPlayPosition;
 };
 
 inline VideoPlayer& GetImplementation( Dali::VideoPlayer& player )
@@ -202,11 +214,12 @@ void VideoPlayer::SetRenderingTarget( Any target )
 
 void VideoPlayer::SetPlayPosition( int millisecond )
 {
+  Internal::Adaptor::GetImplementation( *this ).SetPlayPosition( millisecond );
 }
 
 int VideoPlayer::GetPlayPosition()
 {
-  return 0;
+  return Internal::Adaptor::GetImplementation( *this ).GetPlayPosition();
 }
 
 void VideoPlayer::SetDisplayArea( DisplayArea area )
@@ -235,5 +248,19 @@ void VideoPlayer::Backward( int millisecond )
 {
 }
 
+bool VideoPlayer::IsVideoTextureSupported()
+{
+  return ToolkitApplication::DECODED_IMAGES_SUPPORTED;
+}
+
+void VideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type )
+{
+}
+
+Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const
+{
+  return Dali::VideoPlayerPlugin::CodecType::DEFAULT;
+}
+
 } // namespace Dali;