Tizen release 1.0
[apps/core/preloaded/video-player.git] / include / video-player.h
1 /*
2  * Copyright   2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * This file is part of org.tizen.video-player
5  * Written by  JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>
6  *
7  * PROPRIETARY/CONFIDENTIAL
8  *
9  * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
10  * You shall not disclose such Confidential Information and shall
11  * use it only in accordance with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
12  * SAMSUNG make no representations or warranties about the suitability
13  * of the software, either express or implied, including but not
14  * limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
15  * SAMSUNG shall not be liable for any damages suffered by licensee as
16  * a result of using, modifying or distributing this software or its derivatives.
17  *
18  */
19
20
21 #ifndef __VIDEO_PLAYER__
22 #define  __VIDEO_PLAYER__
23
24 #include <stdbool.h>
25 #include <utilX.h>
26 #include <Ecore_X.h>
27 #include <Elementary.h>
28 #include <appcore-efl.h>
29
30 #include "mp-video-value-define.h"
31 #include "mp-video-type-define.h"
32
33
34 typedef struct _VideoAppData            VideoAppData;
35
36
37 typedef struct
38 {
39         void (*VideoAppCtrlStart)                               (VideoAppData* pAppData);
40         void (*VideoAppCtrlStop)                                (VideoAppData* pAppData);
41         void (*VideoAppCtrlPause)                               (VideoAppData* pAppData);
42         void (*VideoAppCtrlResume)                              (VideoAppData* pAppData);
43         void (*VideoAppCtrlStopByAppPause)              (VideoAppData* pAppData);
44         void (*VideoAppCtrlStartByAppResume)    (VideoAppData* pAppData);
45         void (*VideoAppCtrlFFDown)                              (VideoAppData* pAppData);
46         void (*VideoAppCtrlRewDown)                             (VideoAppData* pAppData);
47         void (*VideoAppCtrlFFUp)                                (VideoAppData* pAppData);
48         void (*VideoAppCtrlRewUp)                               (VideoAppData* pAppData);
49         void (*VideoAppCtrlSetMute)                             (VideoAppData* pAppData);
50         void (*VideoAppCtrlSetScreenType)               (VideoAppData* pAppData);
51         void (*VideoAppCtrlSetScreenSize)               (VideoAppData* pAppData, int nScreenSize);
52         void (*VideoAppCtrlGetPosition)                 (VideoAppData* pAppData);
53         void (*VideoAppCtrlSetPosition)                 (VideoAppData* pAppData);
54         void (*VideoAppCtrlHideLayout)                  (VideoAppData* pAppData);
55         void (*VideoAppCtrlShowLayout)                  (VideoAppData* pAppData);
56         void (*VideoAppCtrlGetVideoResolution)  (VideoAppData* pAppData);
57         void (*VideoAppCtrlReqDurationTime)             (VideoAppData* pAppData);
58         void (*VideoAppCtrlChangeResolution)    (VideoAppData* pAppData);
59         void (*VideoAppCtrlBeginOfStream)               (VideoAppData* pAppData);
60         void (*VideoAppCtrlEndOfStream)                 (VideoAppData* pAppData);
61         void (*VideoAppCtrlExit)                                (VideoAppData* pAppData);
62         void (*VideoAppCtrlStartStreaming)              (VideoAppData* pAppData);
63         void (*VideoAppCtrlReLaunching)                 (VideoAppData* pAppData);
64         void (*VideoAppCtrlPlayPreMedia)                (VideoAppData* pAppData);
65         void (*VideoAppCtrlPlayNextMedia)               (VideoAppData* pAppData);
66         void (*VideoAppCtrlGetBufferingPosition)(VideoAppData* pAppData);
67 }VideoAppCtrlFunc;
68
69
70 struct _VideoAppData
71 {
72         bool                            bIsMute;
73
74         int                                     nDuration;
75         int                                     nSetPosition;
76         int                                     nCurPosition;
77         int                                     nSubtitleDuration;
78         int                                     nBufferingPosition;
79
80         int                                     nVideoWidthResolution;
81         int                                     nVideoHeightResolution;
82
83         char                            szSubtitle[STR_LEN_MAX];
84         char                            szVideoTitle[STR_LEN_MAX];
85
86         char                            szMediaUri[STR_LEN_MAX];
87         char                            szPreMediaUri[STR_LEN_MAX];
88         char                            szNextMediaUri[STR_LEN_MAX];
89         char                            szTagNameForVideoList[STR_LEN_MAX];
90
91         Evas_Object*            pMainWindow;
92
93         MpPlayerState           nPrePlayerState;
94         MpPlayerState           nCurPlayerState;
95         MpLaunchingAppType      nLaunchingAppType;
96         MpMediaSortType         nVideoSortType;
97         MpVideoListType         nVideoListType;
98         VideoPlayerType         nCurPlayerType;
99         VideoAppCtrlFunc        VideoAppCtrlCallbackFunc;
100
101         char                            szProxyAddress[STR_LEN_MAX];
102         char                            szUserAgent[STR_LEN_MAX];
103         char                            szCookie[STR_LEN_MAX];
104
105         int                                     nDlnaMediaID;
106         int                                     nDlnaSortType;
107 };
108
109 #endif //__VIDEO_PLAYER__