1 #ifndef __DALI_VIDEO_PLAYER_PLUGIN_H__
2 #define __DALI_VIDEO_PLAYER_PLUGIN_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/signals/dali-signal.h>
30 * @brief VideoPlayerPlugin is an abstract interface, used by dali-adaptor to access video player plugin.
31 * A concrete implementation must be created for each platform and provided as dynamic library.
34 class VideoPlayerPlugin
38 typedef Signal< void () > VideoPlayerSignalType;
41 * @brief Video display rotation option
43 * @remarks The option is needed only for window surface rendering target
47 ROTATION_NONE, ///< Display isn't rotated. @SINCE_1_1.38
48 ROTATION_90, ///< Display is rotated 90 degree. @SINCE_1_1.38
49 ROTATION_180, ///< Display is rotated 180 degree. @SINCE_1_1.38
50 ROTATION_270 ///< Display is rotated 270 degree. @SINCE_1_1.38
63 virtual ~VideoPlayerPlugin(){}
66 * @brief Sets a URL of the video file to play.
69 * @param [in] url The url of video file
71 virtual void SetUrl( const std::string& url ) = 0;
74 * @brief Returns the URL of the video file.
76 * @return Url of string type
78 virtual std::string GetUrl() = 0;
81 * @brief Sets the player looping status.
84 * @param [in] looping The new looping status: true or false
86 virtual void SetLooping(bool looping) = 0;
89 * @brief Returns the player looping status.
92 * @return True if player is looping, false otherwise.
94 virtual bool IsLooping() = 0;
97 * @brief Starts the video playback.
100 virtual void Play() = 0;
103 * @brief Pauses the video playback.
106 virtual void Pause() = 0;
109 * @brief Stops the video playback.
112 virtual void Stop() = 0;
115 * @brief Sets the player mute status.
117 * @param[in] mute The new mute status, true is mute.
119 virtual void SetMute( bool mute ) = 0;
122 * @brief Returns the player mute status.
124 * @return True if player is mute.
126 virtual bool IsMuted() = 0;
129 * @brief Sets the player volume.
131 * @param[in] left The left volume scalar
132 * @param[in] right The right volume scalar
134 virtual void SetVolume( float left, float right ) = 0;
137 * @brief Gets current volume factor.
139 * @param[out] left The current left volume scalar
140 * @param[out] right The current right volume scalar
142 virtual void GetVolume( float& left, float& right ) = 0;
145 * @brief Sets video rendering target.
147 * @param[in] target The target for video rendering, window surface or native image source
149 virtual void SetRenderingTarget( Any target ) = 0;
152 * @brief Sets the position for playback.
155 * @param[in] millisecond The position for playback
157 virtual void SetPlayPosition( int millisecond ) = 0;
160 * @brief Returns the current position in milliseconds.
163 * @return The current position of playback
165 virtual int GetPlayPosition() = 0;
168 * @brief Sets video display rotation
170 * @param[in] rotation The rotation of display
172 virtual void SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation ) = 0;
175 * @brief Returns rotation of current video display
177 * @return The rotation of current display
179 virtual Dali::VideoPlayerPlugin::DisplayRotation GetDisplayRotation() = 0;
182 * @brief Connect to this signal to be notified when a video playback have finished.
185 * @return A signal object to connect with.
187 virtual VideoPlayerSignalType& FinishedSignal() = 0;