#define DALI_TOOLKIT_INTERNAL_VIDEO_VIEW_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
// EXTERNAL INCLUDES
#include <dali/public-api/object/property-map.h>
-#include <dali/public-api/images/native-image.h>
-#include <dali/devel-api/adaptor-framework/video-player.h>
-#include <dali/integration-api/adaptors/trigger-event-factory.h>
#include <dali/public-api/object/property-notification.h>
#include <dali/public-api/object/property-conditions.h>
#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/images/image-operations.h>
#include <dali/public-api/rendering/texture.h>
+#include <dali/devel-api/adaptor-framework/video-player.h>
+#include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
{
protected:
- VideoView();
+ VideoView( Dali::VideoSyncMode syncMode );
virtual ~VideoView();
public:
/**
- * @copydoc Toolkit::VideoView::New()
+ * @copydoc Toolkit::DevelVideoView::New()
*/
- static Toolkit::VideoView New();
+ static Toolkit::VideoView New( VideoSyncMode syncMode );
/**
* @brief Sets a video url to play.
*/
int GetDisplayMode() const;
+ /**
+ * @brief Gets internal media player.
+ */
+ Any GetMediaPlayer();
+
+ /**
+ * @brief Play the resize or move animation with synchronization between UI(transparent hole) and video player
+ *
+ * The resize and move animation's play() function is called.
+ * If the animation is played, UI and video player will work synchronization.
+ *
+ * @param[in] videoView The current VideoView
+ * @param[in] animation The animation for video view's resize or move.
+ */
+ void PlayAnimation( Dali::Animation animation );
+
private: // From Control
/**
* @copydoc Toolkit::Control::OnInitialize()
*/
- virtual void OnInitialize();
+ void OnInitialize() override;
+
+ /**
+ * @copydoc Toolkit::Control::OnSceneConnection()
+ */
+ void OnSceneConnection( int depth ) override;
/**
- * @copydoc Toolkit::Control::OnStageConnect()
+ * @copydoc Toolkit::Control::OnSceneDisconnection()
*/
- virtual void OnStageConnection( int depth );
+ void OnSceneDisconnection() override;
/**
- * @copydoc Toolkit::Control::OnStageDisconnection()
+ * @copydoc Toolkit::Control::OnSizeSet()
*/
- virtual void OnStageDisconnection();
+ void OnSizeSet( const Vector3& targetSize ) override;
/**
* @copydoc Toolkit::Control::GetNaturalSize
*/
- virtual Vector3 GetNaturalSize();
+ Vector3 GetNaturalSize() override;
/**
* @copydoc Toolkit::Control::GetHeightForWidth()
*/
- virtual float GetHeightForWidth( float width );
+ float GetHeightForWidth( float width ) override;
/**
* @copydoc Toolkit::Control::GetWidthForHeight()
*/
- virtual float GetWidthForHeight( float height );
+ float GetWidthForHeight( float height ) override;
private:
*/
void ApplyBackupProperties();
+ /*
+ * @brief FrameRender's callback function
+ *
+ * This function means the resize/move animation is finished,
+ * so Ui and video player's synchronization can be finished.
+ *
+ */
+ void FrameRenderCallback( int frameID );
+
+ /*
+ * @brief Set frameRender Callback function
+ *
+ * This function is added for listenr the resize/move animation is finished,
+ *
+ */
+ void SetFrameRenderCallback();
+
+
+ /*
+ * @brief resize/move animation finished callback function
+ *
+ * This function is called the resize/move animation is finished,
+ *
+ */
+ void OnAnimationFinished( Dali::Animation& animation );
+
private:
Dali::VideoPlayer mVideoPlayer;
Dali::Property::Map mPropertyBackup;
int mCurrentVideoPlayPosition;
+ int mFrameID;
+
bool mIsPlay;
bool mIsUnderlay;
+
+ Dali::VideoSyncMode mSyncMode;
};
} // namespace Internal