1 /*
2  * Copyright (c) 2021-2022 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 
16 #ifndef RECORDER_COMMON_H
17 #define RECORDER_COMMON_H
18 
19 #define RECORDER_SERVICE_NAME "RecorderServer"
20 
21 namespace OHOS {
22 namespace Media {
23 enum RecFunc {
24     REC_FUNC_CONNECT,
25     REC_FUNC_DISCONNECT,
26     REC_FUNC_SET_VIDEOSOURCE,
27     REC_FUNC_SET_VIDEOENCODER,
28     REC_FUNC_SET_VIDEOSIZE,
29     REC_FUNC_SET_VIDEOFRAMERATE,
30     REC_FUNC_SET_VIDEOENCODINGBITRATE,
31     REC_FUNC_SET_CAPTURERATE,
32     REC_FUNC_GET_SURFACE,
33     REC_FUNC_SET_AUDIOSOURCE,
34     REC_FUNC_SET_AUDIOENCODER,
35     REC_FUNC_SET_AUDIOSAMPLERATE,
36     REC_FUNC_SET_AUDIOCHANNELS,
37     REC_FUNC_SET_AUDIOENCODINGBITRATE,
38     REC_FUNC_SET_MAXDURATION,
39     REC_FUNC_SET_OUTPUTFORMAT,
40     REC_FUNC_SET_OUTPUTPATH,
41     REC_FUNC_SET_OUTPUTFILE,
42     REC_FUNC_SET_NEXTOUTPUTFILE,
43     REC_FUNC_SET_MAXFILESIZE,
44     REC_FUNC_SET_RECORDERCALLBACK,
45     REC_FUNC_PREPARE,
46     REC_FUNC_START,
47     REC_FUNC_PAUSE,
48     REC_FUNC_RESUME,
49     REC_FUNC_STOP,
50     REC_FUNC_RESET,
51     REC_FUNC_RELEASE,
52     REC_FUNC_SET_FILESPLITDURATION,
53     REC_FUNC_SET_PARAMETER,
54     REC_FUNC_SET_DATASOURCE,
55     REC_FUNC_BUTT,
56 };
57 
58 enum RecAnonymousFunc {
59     REC_ANONYMOUS_FUNC_ON_ERROR,
60     REC_ANONYMOUS_FUNC_ON_INFO,
61     REC_ANONYMOUS_FUNC_BUTT,
62 };
63 
64 static constexpr int32_t DEFAULT_IPC_SIZE = 100;
65 }  // namespace Media
66 }  // namespace OHOS
67 #endif  // RECORDER_COMMON_H
68