Tizen 2.0 Release
[profile/ivi/org.tizen.video-player.git] / include / mp-video-player-mgr.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 _MP_VIDEO_PLAYER_MGR_H_
19 #define _MP_VIDEO_PLAYER_MGR_H_
20
21
22 #include <player.h>
23 #include <sound_manager.h>
24 #include <image_util.h>
25 #include <mm_util_imgp.h>
26
27
28 typedef enum
29 {
30         DISPLAY_METHOD_LETTER_BOX               = 0,
31         DISPLAY_METHOD_ORIGIN_SIZE,
32         DISPLAY_METHOD_FULL_SCREEN,
33         DISPLAY_METHOD_CROPPED_FULL,
34         DISPLAY_METHOD_CUSTOM_ROI,
35 }MpPlayerMgrDisplayMethod;
36
37
38 typedef enum
39 {
40         VIDEO_SCREEN_UNKNOWN                    = 0,
41         VIDEO_SCREEN_PORTRAIT,
42         VIDEO_SCREEN_LANDSCAPE,
43         VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN,
44         VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN,
45 }MpVideoRotation;
46
47
48 typedef enum
49 {
50         SOUND_EFFECT_NORMAL                             = 0,
51         SOUND_EFFECT_VOICE,
52         SOUND_EFFECT_MOVIE,
53         SOUND_EFFECT_51CH,
54         SOUND_EFFECT_MAX,
55 }MpSoundEffectType;
56
57
58 typedef enum
59 {
60         FILE_STREAM_TYPE_NOTHING                = 0,
61         FILE_STREAM_TYPE_VIDEO_AUDIO,
62         FILE_STREAM_TYPE_AUDIO,
63         FILE_STREAM_TYPE_VIDEO,
64         FILE_STREAM_TYPE_MAX,
65 }MpFileStreamType;
66
67 bool    MpPlayerMgrIsActive(void);
68 bool    MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *PlayerSubtitleCbFunc, void *pUserData);
69
70 bool    MpPlayerMgrCreate       (const char* szPath);
71 bool    MpPlayerMgrDestroy      (void);
72
73 bool    MpPlayerMgrRealize      (void);
74 bool    MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData);
75
76 bool    MpPlayerMgrUnrealize(void);
77
78 bool    MpPlayerMgrPlay         (void);
79 bool    MpPlayerMgrStop         (void);
80 bool    MpPlayerMgrResume       (void);
81 bool    MpPlayerMgrPause        (void);
82
83 int     MpPlayerMgrGetPosition(void);
84 void    MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData);
85 void    MpPlayerMgrSetSubtitlePosition(unsigned int nPos);
86
87 void    MpPlayerMgrSetMute(bool bMuteEnable);
88 bool    MpPlayerMgrGetMute(void);
89
90 bool    MpPlayerMgrSetSurroundFilters(int nSurround);
91
92
93 int     MpPlayerMgrGetDuration(void);
94 bool    MpPlayerMgrSetOverlayXid(void* pOverlayXid);
95 bool    MpPlayerMgrSetEvasSinkID(void *pEvasSinkID);
96
97 bool    MpPlayerMgrSetSoundPriority(void);
98 int     MpPlayerMgrSetPlaySpeed(float nSpeedValue);
99 int     MpPlayerMgrGetVideoWidthResolution(void);
100 int     MpPlayerMgrGetVideoHeightResolution(void);
101 bool    MpPlayerMgrSetSubtitle(char* szSubtitlePath);
102
103 int     MpPlayerMgrSetDisplayArea(int nX, int nY, int nWidth, int nHeight);
104 bool    MpPlayerMgrSetRotate(MpVideoRotation nRotation);
105 bool    MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode);
106
107 bool    MpPlayerMgrSetUseragentForStreaming(const char* szUserAgent);
108 bool    MpPlayerMgrSetProxyAddressForStreaming(const char* szProxyAddress);
109 bool    MpPlayerMgrSetCookieForStreaming(const char* szCookie);
110
111 bool    MpPlayerMgrStartCapture();
112 bool    MpPlayerMgrCaptureVideo(void *pCallbackFunc, void *pUserData);
113
114 int     MpPlayerMgrGetBufferingPosition(void);
115 bool    MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData);
116 int     MpPlayerMgrGetFileStreamType(void);
117 bool    MpPlayerMgrSetScaling(bool bScale);
118 void MpPlayerMgrSetVolume(float volume);
119 float MpPlayerMgrGetVolume(void);
120
121 player_state_e MpPlayerMgrGetPlayerState(void);
122
123 int MpPlayerMgrGetClosedCaptionCount(void);
124
125 #endif