#define DALI_VIDEO_PLAYER_PLUGIN_H
/*
- * Copyright (c) 2019 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/signals/dali-signal.h>
+#include <dali/public-api/actors/actor.h>
#include <dali/public-api/math/rect.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
-
class Any;
-typedef Dali::Rect< int > DisplayArea;
+typedef Dali::Rect<int> DisplayArea;
/**
* @brief VideoPlayerPlugin is an abstract interface, used by dali-adaptor to access video player plugin.
class VideoPlayerPlugin
{
public:
-
- typedef Signal< void () > VideoPlayerSignalType;
+ typedef Signal<void()> VideoPlayerSignalType;
/**
* @brief Video display rotation option
*/
enum DisplayRotation
{
- ROTATION_NONE, ///< Display isn't rotated. @SINCE_1_1.38
- ROTATION_90, ///< Display is rotated 90 degree. @SINCE_1_1.38
- ROTATION_180, ///< Display is rotated 180 degree. @SINCE_1_1.38
- ROTATION_270 ///< Display is rotated 270 degree. @SINCE_1_1.38
+ ROTATION_NONE, ///< Display isn't rotated. @SINCE_1_1.38
+ ROTATION_90, ///< Display is rotated 90 degree. @SINCE_1_1.38
+ ROTATION_180, ///< Display is rotated 180 degree. @SINCE_1_1.38
+ ROTATION_270 ///< Display is rotated 270 degree. @SINCE_1_1.38
};
/**
*/
enum class CodecType
{
- DEFAULT, ///< Codec which has higher priority as default. Platform selects it. Usually the H/W codec has higher priority than S/W codec if it exist.
- HW, ///< H/W codec
- SW ///< S/W codec
+ DEFAULT, ///< Codec which has higher priority as default. Platform selects it. Usually the H/W codec has higher priority than S/W codec if it exist.
+ HW, ///< H/W codec
+ SW ///< S/W codec
};
/**
{
enum Type
{
- LETTER_BOX = 0, /**< Letter box */
- ORIGIN_SIZE, /**< Origin size */
- FULL_SCREEN, /**< Full-screen */
- CROPPED_FULL, /**< Cropped full-screen */
- ORIGIN_OR_LETTER, /**< Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size) */
- DST_ROI /**< Region of Interest */
+ LETTER_BOX = 0, /**< Letter box */
+ ORIGIN_SIZE, /**< Origin size */
+ FULL_SCREEN, /**< Full-screen */
+ CROPPED_FULL, /**< Cropped full-screen */
+ ORIGIN_OR_LETTER, /**< Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size) */
+ DST_ROI /**< Region of Interest */
};
};
* @brief Constructor.
* @SINCE_1_1.38
*/
- VideoPlayerPlugin(){}
+ VideoPlayerPlugin()
+ {
+ }
/**
* @brief Destructor.
* @SINCE_1_1.38
*/
- virtual ~VideoPlayerPlugin(){}
+ virtual ~VideoPlayerPlugin()
+ {
+ }
/**
* @brief Sets a URL of the video file to play.
* @SINCE_1_1.38
* @param [in] url The url of video file
*/
- virtual void SetUrl( const std::string& url ) = 0;
+ virtual void SetUrl(const std::string& url) = 0;
/**
* @brief Returns the URL of the video file.
* @SINCE_1_1.38
* @param[in] mute The new mute status, true is mute.
*/
- virtual void SetMute( bool mute ) = 0;
+ virtual void SetMute(bool mute) = 0;
/**
* @brief Returns the player mute status.
* @param[in] left The left volume scalar
* @param[in] right The right volume scalar
*/
- virtual void SetVolume( float left, float right ) = 0;
+ virtual void SetVolume(float left, float right) = 0;
/**
* @brief Gets current volume factor.
* @param[out] left The current left volume scalar
* @param[out] right The current right volume scalar
*/
- virtual void GetVolume( float& left, float& right ) = 0;
+ virtual void GetVolume(float& left, float& right) = 0;
/**
* @brief Sets video rendering target.
* @SINCE_1_1.38
* @param[in] target The target for video rendering, window surface or native image source
*/
- virtual void SetRenderingTarget( Any target ) = 0;
+ virtual void SetRenderingTarget(Any target) = 0;
/**
* @brief Sets the position for playback.
*
* @param[in] millisecond The position for playback
*/
- virtual void SetPlayPosition( int millisecond ) = 0;
+ virtual void SetPlayPosition(int millisecond) = 0;
/**
* @brief Returns the current position in milliseconds.
* @SINCE_1_2.46
* param[in] area The left-top position and size of the video display area
*/
- virtual void SetDisplayArea( DisplayArea area ) = 0;
+ virtual void SetDisplayArea(DisplayArea area) = 0;
/**
* @brief Sets video display rotation
* @SINCE_1_1.38
* @param[in] rotation The rotation of display
*/
- virtual void SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation ) = 0;
+ virtual void SetDisplayRotation(Dali::VideoPlayerPlugin::DisplayRotation rotation) = 0;
/**
* @brief Returns rotation of current video display
* @SINCE_1_2.46
* @param[in] millisecond The position for forward playback
*/
- virtual void Forward( int millisecond ) = 0;
+ virtual void Forward(int millisecond) = 0;
/**
* @brief Seeks backward by the specified number of milliseconds.
* @SINCE_1_2.46
* @param[in] millisecond The position for backward playback
*/
- virtual void Backward( int millisecond ) = 0;
+ virtual void Backward(int millisecond) = 0;
/**
* @brief Checks whether the video texture is supported
* @brief Sets codec type
* @param[in] type The CodecType
*/
- virtual void SetCodecType( VideoPlayerPlugin::CodecType type ) = 0;
+ virtual void SetCodecType(VideoPlayerPlugin::CodecType type) = 0;
/**
* @brief Gets codec type
* @brief Sets the display mode for playback.
* @param[in] mode of playback
*/
- virtual void SetDisplayMode( VideoPlayerPlugin::DisplayMode::Type mode ) = 0;
+ virtual void SetDisplayMode(VideoPlayerPlugin::DisplayMode::Type mode) = 0;
/**
* @brief Returns the current display mode.
*/
virtual Any GetMediaPlayer() = 0;
+ /**
+ * @brief calls synchronization function in window system
+ * This function is called, the synchronization is started between UI(transparent hole) and video player.
+ */
+ virtual void StartSynchronization() = 0;
+
+ /**
+ * @brief calls desynchronization function in window system
+ * This function is called, the synchronization is finished between UI(transparent hole) and video player.
+ */
+ virtual void FinishSynchronization() = 0;
};
-} // namespace Dali;
+} // namespace Dali
#endif // DALI_VIDEO_PLAYER_PLUGIN_H