717a24351029439239b14c8c4922203ae14b40a7
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-video-player.h
1 #ifndef __DALI_TOOLKIT_VIDEO_PLAYER_H__
2 #define __DALI_TOOLKIT_VIDEO_PLAYER_H__
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-handle.h>
23 #include <dali/public-api/object/base-object.h>
24
25 #include <dali/devel-api/adaptor-framework/video-player-plugin.h>
26
27 namespace Dali
28 {
29
30 class Any;
31
32 namespace Internal
33 {
34 namespace Adaptor
35 {
36
37 class VideoPlayer;
38
39 }
40 }
41
42 /**
43  * @brief VideoPlayer class is used for video playback.
44  * @SINCE_1_1.38
45  */
46 class VideoPlayer: public BaseHandle
47 {
48 public:
49
50   VideoPlayer();
51
52   ~VideoPlayer();
53
54   static VideoPlayer New();
55
56   VideoPlayer( const VideoPlayer& player );
57
58   VideoPlayer& operator=( const VideoPlayer& player );
59
60   static VideoPlayer DownCast( BaseHandle handle );
61
62   void SetUrl( const std::string& url );
63
64   std::string GetUrl();
65
66   void SetLooping(bool looping);
67
68   bool IsLooping();
69
70   void Play();
71
72   void Pause();
73
74   void Stop();
75
76   void SetMute( bool mute );
77
78   bool IsMuted();
79
80   void SetVolume( float left, float right );
81
82   void GetVolume( float& left, float& right );
83
84   void SetRenderingTarget( Any target );
85
86   void SetPlayPosition( int millisecond );
87
88   int GetPlayPosition();
89
90   void SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation );
91
92   Dali::VideoPlayerPlugin::DisplayRotation GetDisplayRotation();
93
94   Dali::VideoPlayerPlugin::VideoPlayerSignalType& FinishedSignal();
95
96 private:
97
98   VideoPlayer( Internal::Adaptor::VideoPlayer* internal );
99
100 };
101
102 } // namespace Dali;
103
104 #endif