Merge branch '0128_tizen20'
[apps/core/preloaded/video-player.git] / include / mp-video-player-mgr.h
1 /*
2  * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
3  * 
4  *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
5  * 
6  *    Licensed under the Flora License, Version 1.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  * 
10  *        http://www.tizenopensource.org/license
11  * 
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19
20 #ifndef _MP_VIDEO_PLAYER_MGR_H_
21 #define _MP_VIDEO_PLAYER_MGR_H_
22
23
24 #include <player.h>
25 #include <sound_manager.h>
26 #include <image_util.h>
27 #include <mm_util_imgp.h>
28
29
30 typedef enum
31 {
32         DISPLAY_METHOD_LETTER_BOX               = 0,
33         DISPLAY_METHOD_ORIGIN_SIZE,
34         DISPLAY_METHOD_FULL_SCREEN,
35         DISPLAY_METHOD_CROPPED_FULL,
36         DISPLAY_METHOD_CUSTOM_ROI,
37 }MpPlayerMgrDisplayMethod;
38
39
40 typedef enum
41 {
42         VIDEO_SCREEN_UNKNOWN                    = 0,
43         VIDEO_SCREEN_PORTRAIT,
44         VIDEO_SCREEN_LANDSCAPE,
45         VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN,
46         VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN,
47 }MpVideoRotation;
48
49
50 typedef enum
51 {
52         SOUND_EFFECT_NORMAL                             = 0,
53         SOUND_EFFECT_VOICE,
54         SOUND_EFFECT_MOVIE,
55         SOUND_EFFECT_51CH,
56         SOUND_EFFECT_MAX,
57 }MpSoundEffectType;
58
59
60 typedef enum
61 {
62         FILE_STREAM_TYPE_NOTHING                = 0,
63         FILE_STREAM_TYPE_VIDEO_AUDIO,
64         FILE_STREAM_TYPE_AUDIO,
65         FILE_STREAM_TYPE_VIDEO,
66         FILE_STREAM_TYPE_MAX,
67 }MpFileStreamType;
68
69 bool    MpPlayerMgrIsActive(void);
70 bool    MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *PlayerSubtitleCbFunc, void *pUserData);
71
72 bool    MpPlayerMgrCreate       (const char* szPath);
73 bool    MpPlayerMgrDestroy      (void);
74
75 bool    MpPlayerMgrRealize      (void);
76 bool    MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData);
77
78 bool    MpPlayerMgrUnrealize(void);
79
80 bool    MpPlayerMgrPlay         (void);
81 bool    MpPlayerMgrStop         (void);
82 bool    MpPlayerMgrResume       (void);
83 bool    MpPlayerMgrPause        (void);
84
85 int     MpPlayerMgrGetPosition(void);
86 void    MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData);
87 void    MpPlayerMgrSetSubtitlePosition(unsigned int nPos);
88
89 void    MpPlayerMgrSetMute(bool bMuteEnable);
90 bool    MpPlayerMgrGetMute(void);
91
92 bool    MpPlayerMgrSetSurroundFilters(int nSurround);
93
94
95 int     MpPlayerMgrGetDuration(void);
96 bool    MpPlayerMgrSetOverlayXid(void* pOverlayXid);
97 bool    MpPlayerMgrSetEvasSinkID(void *pEvasSinkID);
98
99 bool    MpPlayerMgrSetSoundPriority(void);
100 int     MpPlayerMgrSetPlaySpeed(float nSpeedValue);
101 int     MpPlayerMgrGetVideoWidthResolution(void);
102 int     MpPlayerMgrGetVideoHeightResolution(void);
103 bool    MpPlayerMgrSetSubtitle(char* szSubtitlePath);
104
105 int     MpPlayerMgrSetDisplayArea(int nX, int nY, int nWidth, int nHeight);
106 bool    MpPlayerMgrSetRotate(MpVideoRotation nRotation);
107 bool    MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode);
108
109 bool    MpPlayerMgrSetUseragentForStreaming(const char* szUserAgent);
110 bool    MpPlayerMgrSetProxyAddressForStreaming(const char* szProxyAddress);
111 bool    MpPlayerMgrSetCookieForStreaming(const char* szCookie);
112
113 bool    MpPlayerMgrStartCapture();
114 bool    MpPlayerMgrCaptureVideo(void *pCallbackFunc, void *pUserData);
115
116 int     MpPlayerMgrGetBufferingPosition(void);
117 bool    MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData);
118 int     MpPlayerMgrGetFileStreamType(void);
119 bool    MpPlayerMgrSetScaling(bool bScale);
120 void MpPlayerMgrSetVolume(float volume);
121 float MpPlayerMgrGetVolume(void);
122
123 player_state_e MpPlayerMgrGetPlayerState(void);
124
125 int MpPlayerMgrGetClosedCaptionCount(void);
126
127 #endif