1 /*
2  * Copyright (c) 2020 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef PLAYER_TYPE_H
16 #define PLAYER_TYPE_H
17 namespace OHOS {
18 typedef enum {
19     PLAYER_SERVER_SET_SOURCE,
20     PLAYER_SERVER_PREPARE,
21     PLAYER_SERVER_PLAY,
22     PLAYER_SERVER_IS_PLAYING,
23     PLAYER_SERVER_PAUSE,
24     PLAYER_SERVER_STOP,
25     PLAYER_SERVER_REWIND,
26     PLAYER_SERVER_SET_VOLUME,
27     PLAYER_SERVER_SET_VIDEO_SURFACE,
28     PLAYER_SERVER_ENABLE_SINGLE_LOOPING,
29     PLAYER_SERVER_IS_SINGLE_LOOPING,
30     PLAYER_SERVER_GET_CURRENT_TIME,
31     PLAYER_SERVER_GET_DURATION,
32     PLAYER_SERVER_GET_VIDEO_WIDTH,
33     PLAYER_SERVER_GET_VIDEO_HEIGHT,
34     PLAYER_SERVER_RESET,
35     PLAYER_SERVER_RELEASE,
36     PLAYER_SERVER_SET_PLAYER_CALLBACK,
37     PLAYER_SERVER_GET_STATE,
38     PLAYER_SERVER_SET_SPEED,
39     PLAYER_SERVER_GET_SPEED,
40     PLAYER_SERVER_SET_PARAMETER,
41     PLAYER_SERVER_SET_AUDIO_STREAM_TYPE,
42     PLAYER_SERVER_GET_AUDIO_STREAM_TYPE,
43 } PlayerServerCall;
44 
45 typedef enum {
46     ON_PLAYBACK_COMPLETE,
47     ON_ERROR,
48     ON_INFO,
49     ON_VIDEO_SIZE_CHANGED,
50     ON_REWIND_TO_COMPLETE,
51     COMMAND_ERROR = 0x7fff
52 } PlayerClientCall;
53 
54 struct CallBackPara {
55     int funcId;
56     int type;
57     void* ret;
58     void* data;
59 };
60 
61 const int32_t DEFAULT_IPC_SIZE = 100;
62 
63 const char SERVICE_NAME[] = "PlayerServer";
64 }
65 #endif
66