X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fvideo-view%2Fvideo-view.h;h=88728ee5a892df0f370bc4ec68c3597232637faf;hp=8fa6fcc265157b569e8069a47faea61daa12d518;hb=b97b29c76acefabbae2c0a4e9ecc261bf9dd8036;hpb=baeb5ad3a0b2b1535c48dfb25f3d7ace66cde857 diff --git a/dali-toolkit/public-api/controls/video-view/video-view.h b/dali-toolkit/public-api/controls/video-view/video-view.h old mode 100644 new mode 100755 index 8fa6fcc..88728ee --- a/dali-toolkit/public-api/controls/video-view/video-view.h +++ b/dali-toolkit/public-api/controls/video-view/video-view.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_VIDEO_VIEW_H__ -#define __DALI_TOOLKIT_VIDEO_VIEW_H__ +#ifndef DALI_TOOLKIT_VIDEO_VIEW_H +#define DALI_TOOLKIT_VIDEO_VIEW_H /* - * 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. @@ -59,15 +59,17 @@ namespace Internal DALI_INTERNAL * @SINCE_1_1.38 * */ -class DALI_IMPORT_API VideoView: public Control +class DALI_TOOLKIT_API VideoView: public Control { public: // Signal typedef Signal< void (VideoView&) > VideoViewSignalType; ///< Video playback finished signal type @ SINCE_1_1.38 +public: + /** - * @brief The start and end property ranges for this control. + * @brief Enumeration for the start and end property ranges for this control. * @SINCE_1_0.0 */ enum PropertyRange @@ -75,33 +77,111 @@ public: PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 }; + /** + * @brief Enumeration for the instance of properties belonging to the VideoView class. + * @SINCE_1_1.38 + */ struct Property { + /** + * @brief Enumeration for the instance of properties belonging to the VideoView class. + * @SINCE_1_1.38 + */ enum { /** - * @brief name "video", video file url as string type or Property::Map + * @brief name "video", video file url as string type or Property::Map. * @SINCE_1_1.38 + * @REMARK_INTERNET + * @REMARK_STORAGE */ VIDEO = PROPERTY_START_INDEX, /** - * @brief name "looping", looping status, true or false + * @brief name "looping", looping status, true or false. * @SINCE_1_1.38 */ LOOPING, /** - * @brief name "muted", mute status, true or false + * @brief name "muted", mute status, true or false. * @SINCE_1_1.38 */ MUTED, /** - * @brief name "volume", left and right volume scalar as float type, Property::Map with two values ( "left" and "right" ) + * @brief name "volume", left and right volume scalar as float type, Property::Map with two values ( "left" and "right" ). * @SINCE_1_1.38 */ - VOLUME + VOLUME, + + /** + * @brief name "underlay", Video rendering by underlay, true or false + * This shows video composited underneath the window by the system. This means it may ignore rotation of the video-view + * If false, video-view shows decoded frame images sequentially. + * If Platform or video plugin doesn't support decoded frame images, this should always be true. + * @SINCE_1_2.62 + * @REMARK_RAWVIDEO + */ + UNDERLAY, + + /** + * @brief The play position (millisecond) of the video. + * @details Name "playPosition", type Property::INTEGER + * @SINCE_1_3_9 + */ + PLAY_POSITION, + + /** + * @brief The display mode of the video. + * @SINCE_1_3_15 + */ + DISPLAY_MODE + }; + }; + + /** + * @brief The values of this enum determine how the video should be display mode to the view + * @SINCE_1_3_15 + */ + struct DisplayMode + { + /** + * @brief The values of this enum determine how the video should be display mode to the view. + * @SINCE_1_3_15 + */ + enum Type + { + /** + * @brief Letter box + * @SINCE_1_3_15 + */ + LETTER_BOX = 0, + /** + * @brief Origin size + * @SINCE_1_3_15 + */ + ORIGIN_SIZE, + /** + * @brief Full-screen + * @SINCE_1_3_15 + */ + FULL_SCREEN, + /** + * @brief Cropped full-screen + * @SINCE_1_3_15 + */ + CROPPED_FULL, + /** + * @brief 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) + * @SINCE_1_3_15 + */ + ORIGIN_OR_LETTER, + /** + * @brief Region of Interest + * @SINCE_1_3_15 + */ + DST_ROI }; }; @@ -112,13 +192,12 @@ public: * @SINCE_1_1.38 * @return A handle to a newly allocated Dali ImageView * - * @note VideoView will not display anything */ static VideoView New(); /** * @brief Creates an initialized VideoView. - * If the string is empty, VideoView will not display anything + * If the string is empty, VideoView will not display anything. * * @SINCE_1_1.38 * @REMARK_INTERNET @@ -129,21 +208,46 @@ public: static VideoView New( const std::string& url ); /** - * @brief Create an uninitialized VideoView + * @brief Creates an initialized VideoView. + * @SINCE_1_3_9 + * @param[in] swCodec Video rendering by H/W codec if false + * @return A handle to a newly allocated Dali ImageView + * + * @note If platform or target does not support sw codec, video-view shows an error message and video by default codec type + */ + static VideoView New( bool swCodec ); + + /** + * @brief Creates an initialized VideoView. + * If the string is empty, VideoView will not display anything. + * + * @SINCE_1_3_9 + * @REMARK_INTERNET + * @REMARK_STORAGE + * @param[in] url The url of the video resource to display + * @param[in] swCodec Video rendering by H/W codec if false + * @return A handle to a newly allocated Dali VideoView + * + * @note If platform or target does not support sw codec, video-view shows an error message and video by default codec type + */ + static VideoView New( const std::string& url, bool swCodec ); + + /** + * @brief Creates an uninitialized VideoView. * @SINCE_1_1.38 */ VideoView(); /** - * @brief Destructor + * @brief Destructor. * - * This is non-virtual since derived Handel types must not contain data or virtual methods + * This is non-virtual since derived Handel types must not contain data or virtual methods. * @SINCE_1_1.38 */ ~VideoView(); - /* - * @brief Copy constructor + /** + * @brief Copy constructor. * * @SINCE_1_1.38 * @param[in] videoView VideoView to copy. The copied VideoView will point at the same implementation @@ -154,20 +258,20 @@ public: * @brief Assignment operator. * * @SINCE_1_1.38 - * @param[in] videoView The VideoView to assign from. - * @return The updated VideoView. + * @param[in] videoView The VideoView to assign from + * @return The updated VideoView */ VideoView& operator=( const VideoView& videoView ); /** - * @brief Downcast a handle to VideoView handle. + * @brief Downcasts a handle to VideoView handle. * - * If handle points to a VideoView the downcast produces valid - * handle. If not the returned handle is left uninitialized. + * If handle points to a VideoView, the downcast produces valid handle. + * If not, the returned handle is left uninitialized. * * @SINCE_1_1.38 * @param[in] handle Handle to an object - * @return handle to a VideoView or an uninitialized handle + * @return Handle to a VideoView or an uninitialized handle */ static VideoView DownCast( BaseHandle handle ); @@ -206,10 +310,10 @@ public: void Backward( int millisecond ); /** - * @brief Connect to this signal to be notified when a video playback have finished. + * @brief Connects to this signal to be notified when a video playback is finished. * * @SINCE_1_1.38 - * @return A signal object to connect with. + * @return A signal object to connect with */ VideoViewSignalType& FinishedSignal(); @@ -220,7 +324,7 @@ public: // Not intended for application developers * @brief Creates a handle using the Toolkit::Internal implementation. * * @SINCE_1_1.38 - * @param[in] implementation The VideoView implementation. + * @param[in] implementation The VideoView implementation */ DALI_INTERNAL VideoView( Internal::VideoView& implementation ); @@ -228,7 +332,7 @@ public: // Not intended for application developers * @brief Allows the creation of this VideoView from an Internal::CustomActor pointer. * * @SINCE_1_1.38 - * @param[in] internal A pointer to the internal CustomActor. + * @param[in] internal A pointer to the internal CustomActor */ DALI_INTERNAL VideoView( Dali::Internal::CustomActor* internal ); /// @endcond @@ -243,4 +347,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_VIDEO_VIEW_H__ +#endif // DALI_TOOLKIT_VIDEO_VIEW_H