1 /* 2 * Copyright (C) 2021 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_PRIVATE_PARAM_H 17 #define RECORDER_PRIVATE_PARAM_H 18 19 #include <memory> 20 #include <refbase.h> 21 #include "recorder_param.h" 22 #include "surface.h" 23 24 namespace OHOS { 25 namespace Media { 26 enum RecorderPrivateParamType : uint32_t { 27 PRIVATE_PARAM_TYPE_BEGIN = PRIVATE_PARAM_SECTION_START, 28 SURFACE, 29 OUTPUT_FORMAT, 30 APP_INFO, 31 }; 32 33 struct SurfaceParam : public RecorderParam { SurfaceParamSurfaceParam34 SurfaceParam() : RecorderParam(RecorderPrivateParamType::SURFACE), surface_(nullptr) {} 35 ~SurfaceParam() = default; 36 sptr<Surface> surface_; 37 }; 38 39 struct OutputFormat : public RecorderParam { OutputFormatOutputFormat40 explicit OutputFormat(int32_t format) : RecorderParam(RecorderPrivateParamType::OUTPUT_FORMAT), format_(format) {} 41 ~OutputFormat() = default; 42 int32_t format_; 43 }; 44 45 struct AppInfo : public RecorderParam { AppInfoAppInfo46 AppInfo(int32_t appUid, int32_t appPid, uint32_t appTokenId) 47 : RecorderParam(RecorderPrivateParamType::APP_INFO), 48 appUid_(appUid), 49 appPid_(appPid), 50 appTokenId_(appTokenId) 51 {} 52 ~AppInfo() = default; 53 int32_t appUid_; 54 int32_t appPid_; 55 uint32_t appTokenId_; 56 }; 57 } // namespace Media 58 } // namespace OHOS 59 #endif 60