Tizen 2.0 Release
[profile/ivi/org.tizen.video-player.git] / include / video-player.h
1 /*
2  * Copyright (c) [2012] Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef __VIDEO_PLAYER__
19 #define  __VIDEO_PLAYER__
20
21 #include <stdbool.h>
22 #include <utilX.h>
23 #include <Ecore_X.h>
24 #include <Elementary.h>
25
26
27 #include "mp-video-value-define.h"
28 #include "mp-video-type-define.h"
29
30 #define LVL0 (0)
31 #define LVL1 (1)
32 #define LVL2 (2)
33 #define LVL3 (3)
34 #define LVL4 (4)
35 #define LVL5 (5)
36 #define LVL6 (6)
37 #define LVL7 (7)
38
39 typedef enum
40 {
41         MP_UG_FAIL,
42         MP_UG_SUCCESS
43 } mp_ug_load_status;
44
45 typedef struct _VideoAppData            VideoAppData;
46
47
48 typedef struct
49 {
50         void (*VideoAppCtrlStart)                               (VideoAppData* pAppData);
51         void (*VideoAppCtrlStop)                                (VideoAppData* pAppData);
52         void (*VideoAppCtrlPause)                               (VideoAppData* pAppData);
53         void (*VideoAppCtrlResume)                              (VideoAppData* pAppData);
54         void (*VideoAppCtrlStopByAppPause)              (VideoAppData* pAppData);
55         void (*VideoAppCtrlStartByAppResume)    (VideoAppData* pAppData);
56         void (*VideoAppCtrlFFDown)                              (VideoAppData* pAppData);
57         void (*VideoAppCtrlRewDown)                             (VideoAppData* pAppData);
58         void (*VideoAppCtrlFFUp)                                (VideoAppData* pAppData);
59         void (*VideoAppCtrlRewUp)                               (VideoAppData* pAppData);
60         void (*VideoAppCtrlSpeedReset)                  (VideoAppData* pAppData);
61         void (*VideoAppCtrlSpeedFF)                             (VideoAppData* pAppData);
62         void (*VideoAppCtrlSpeedRew)                    (VideoAppData* pAppData);
63         void (*VideoAppCtrlRotateScreen)                (VideoAppData *pAppData, int nRotateState);
64         void (*VideoAppCtrlGetPosition)                 (VideoAppData* pAppData);
65         void (*VideoAppCtrlSetPosition)                 (VideoAppData* pAppData);
66         void (*VideoAppCtrlSetSubtitlePosition)         (VideoAppData* pAppData);
67         void (*VideoAppCtrlHideLayout)                  (VideoAppData* pAppData);
68         void (*VideoAppCtrlShowLayout)                  (VideoAppData* pAppData);
69         void (*VideoAppCtrlHideFinish)                  (VideoAppData* pAppData);
70         void (*VideoAppCtrlShowFinish)                  (VideoAppData* pAppData);
71         void (*VideoAppCtrlGetVideoResolution)  (VideoAppData* pAppData);
72         void (*VideoAppCtrlReqDurationTime)             (VideoAppData* pAppData);
73         void (*VideoAppCtrlChangeResolution)    (VideoAppData* pAppData);
74         void (*VideoAppCtrlBeginOfStream)               (VideoAppData* pAppData);
75         void (*VideoAppCtrlEndOfStream)                 (VideoAppData* pAppData);
76         void (*VideoAppCtrlExit)                                (VideoAppData* pAppData);
77         void (*VideoAppCtrlStartStreaming)              (VideoAppData* pAppData);
78         void (*VideoAppCtrlReLaunching)                 (VideoAppData* pAppData);
79         void (*VideoAppCtrlGetBufferingPosition)(VideoAppData* pAppData);
80
81
82         void (*VideoAppCtrlShowVolume)                  (VideoAppData *pAppData);
83         void (*VideoAppCtrlHideVolume)                  (VideoAppData *pAppData);
84 }VideoAppCtrlFunc;
85
86
87 struct _VideoAppData
88 {
89         Evas_Object*            pMainWindow;
90
91         int                     nDuration;
92         int                     nSetPosition;
93         int                     nCurPosition;
94         int                     nSubtitleDuration;
95         int                     nBufferingPosition;
96         int                     nPlayingSpeed;
97
98         int                     nVideoWidthResolution;
99         int                     nVideoHeightResolution;
100
101         char                    *szSubtitle;
102         char                    *szVideoTitle;
103         char                    *szMediaUri;
104         char                    *szPreMediaUri;
105         char                    *szNextMediaUri;
106
107         MpPlayerState       nPrePlayerState;
108         MpPlayerState       nCurPlayerState;
109         VideoAppCtrlFunc    VideoAppCtrlCallbackFunc;
110         bool                            bSeekComplete;
111         int                                     nSeekPosition;
112         MpPlayerState       nSeekPlayerState;
113
114         char                    *szProxyAddress;
115         char                    *szUserAgent;
116         char                    *szCookie;
117
118         bool                    bStartSeek;
119 };
120
121 #endif //__VIDEO_PLAYER__