fix issues

Signed-off-by: zhuxu <zhuxu29@huawei.com>
This commit is contained in:
zhuxu
2022-03-22 15:59:17 +08:00
parent 42847e3667
commit 31506eadfd
208 changed files with 477 additions and 497 deletions
-1
View File
@@ -175,4 +175,3 @@
of your accepting any such warranty or additional liability. of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
@@ -78,7 +78,6 @@ private:
bool isOpenSessFailed_ = false; bool isOpenSessFailed_ = false;
std::mutex isOpenSessFailedlock_; std::mutex isOpenSessFailedlock_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_H #endif // DISTRIBUTED_CAMERA_DEVICE_H
@@ -80,7 +80,6 @@ private:
// The latest result metadata that replied to the camera service. // The latest result metadata that replied to the camera service.
common_metadata_header_t *latestConsumerResultMetadata_; common_metadata_header_t *latestConsumerResultMetadata_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_METADATA_PROCESSOR_H #endif // DISTRIBUTED_CAMERA_METADATA_PROCESSOR_H
@@ -77,6 +77,6 @@ private:
std::map<DHBase, std::string> dhBaseHashDCamIdMap_; std::map<DHBase, std::string> dhBaseHashDCamIdMap_;
std::map<std::string, OHOS::sptr<DCameraDevice>> dCameraDeviceMap_; std::map<std::string, OHOS::sptr<DCameraDevice>> dCameraDeviceMap_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_HOST_H #endif // DISTRIBUTED_CAMERA_HOST_H
@@ -74,6 +74,6 @@ private:
static AutoRelease autoRelease_; static AutoRelease autoRelease_;
static std::shared_ptr<DCameraProvider> instance_; static std::shared_ptr<DCameraProvider> instance_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_H #endif // DISTRIBUTED_CAMERA_PROVIDER_H
@@ -53,6 +53,6 @@ private:
std::list<std::shared_ptr<DImageBuffer>> idleList_ = {}; std::list<std::shared_ptr<DImageBuffer>> idleList_ = {};
std::list<std::shared_ptr<DImageBuffer>> busyList_ = {}; std::list<std::shared_ptr<DImageBuffer>> busyList_ = {};
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_BUFFER_MANAGER_H #endif // DISTRIBUTED_CAMERA_BUFFER_MANAGER_H
@@ -69,6 +69,6 @@ private:
int captureBufferCount_ = 0; int captureBufferCount_ = 0;
bool isBufferMgrInited_ = false; bool isBufferMgrInited_ = false;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_STREAM_H #endif // DISTRIBUTED_CAMERA_STREAM_H
@@ -84,6 +84,6 @@ private:
std::mutex l_; std::mutex l_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_IMAGE_BUFFER_H #endif // DISTRIBUTED_CAMERA_IMAGE_BUFFER_H
@@ -35,7 +35,6 @@ public:
virtual CamRetCode ReleaseStreams(const std::vector<int>& streamIds) override; virtual CamRetCode ReleaseStreams(const std::vector<int>& streamIds) override;
virtual CamRetCode Release() override; virtual CamRetCode Release() override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_OFFLINE_STREAM_OPERATOR_H #endif // DISTRIBUTED_CAMERA_OFFLINE_STREAM_OPERATOR_H
@@ -107,7 +107,6 @@ private:
OperationMode currentOperMode_ = OperationMode::NORMAL; OperationMode currentOperMode_ = OperationMode::NORMAL;
std::shared_ptr<CameraStandard::CameraMetadata> latestStreamSetting_; std::shared_ptr<CameraStandard::CameraMetadata> latestStreamSetting_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_STREAM_OPERATOR_H #endif // DISTRIBUTED_CAMERA_STREAM_OPERATOR_H
@@ -108,6 +108,6 @@ struct DCResolution {
(this->width_ == others.width_ && this->height_ < others.height_); (this->width_ == others.width_ && this->height_ < others.height_);
} }
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CONSTANTS_H #endif // DISTRIBUTED_CONSTANTS_H
+3 -4
View File
@@ -36,7 +36,6 @@ DCamRetCode MapToInternalRetCode(CamRetCode retCode);
uint64_t GetCurrentLocalTimeStamp(); uint64_t GetCurrentLocalTimeStamp();
void SplitString(const std::string &str, std::vector<std::string> &tokens, const std::string &delimiters); void SplitString(const std::string &str, std::vector<std::string> &tokens, const std::string &delimiters);
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_H
#endif // DISTRIBUTED_CAMERA_H
@@ -442,5 +442,5 @@ bool DCameraDevice::IsOpened()
{ {
return isOpened_; return isOpened_;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -604,5 +604,5 @@ void DMetadataProcessor::PrintDCameraMetadata(const common_metadata_header_t *me
} }
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -228,5 +228,5 @@ void DCameraHost::NotifyDCameraStatus(const std::shared_ptr<DHBase> &dhBase, int
dCameraHostCallback_->OnCameraStatus(dCameraId, CameraStatus::UN_AVAILABLE); dCameraHostCallback_->OnCameraStatus(dCameraId, CameraStatus::UN_AVAILABLE);
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -302,5 +302,5 @@ OHOS::sptr<DCameraDevice> DCameraProvider::GetDCameraDevice(const std::shared_pt
} }
return dCameraHost->GetDCameraDeviceByDHBase(dhBase); return dCameraHost->GetDCameraDeviceByDHBase(dhBase);
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -158,5 +158,5 @@ RetCode DBufferManager::DImageBufferToDCameraBuffer(const std::shared_ptr<DImage
return RC_OK; return RC_OK;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -358,5 +358,5 @@ bool DCameraStream::HasBufferQueue()
} }
return true; return true;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -238,5 +238,5 @@ bool DImageBuffer::operator==(const DImageBuffer& u)
} }
return u.GetPhyAddress() == phyAddr_; return u.GetPhyAddress() == phyAddr_;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -34,5 +34,5 @@ CamRetCode DOfflineStreamOperator::Release()
{ {
return CamRetCode::METHOD_NOT_SUPPORTED; return CamRetCode::METHOD_NOT_SUPPORTED;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -749,5 +749,5 @@ DCEncodeType DStreamOperator::ConvertDCEncodeType(std::string &srcEncodeType)
return DCEncodeType::ENCODE_TYPE_NULL; return DCEncodeType::ENCODE_TYPE_NULL;
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
+2 -2
View File
@@ -85,5 +85,5 @@ void SplitString(const std::string &str, std::vector<std::string> &tokens, const
tokens.push_back(str.substr(lastPos)); tokens.push_back(str.substr(lastPos));
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
+2 -2
View File
@@ -379,5 +379,5 @@ OHOS::sptr<OHOS::IBufferProducer> Test::StreamConsumer::CreateProducer(std::func
}); });
return producer; return producer;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
+3 -3
View File
@@ -173,6 +173,6 @@ public:
return 0; return 0;
} }
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif #endif // DISTRIBUTED_CAMERA_TEST_COMMON_H
@@ -27,5 +27,5 @@ void DCameraDeviceCallback::OnResult(uint64_t timestamp, const std::shared_ptr<C
{ {
DHLOGW("DCameraDeviceCallback::OnResult enter."); DHLOGW("DCameraDeviceCallback::OnResult enter.");
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -30,6 +30,6 @@ public:
virtual void OnError(ErrorType type, int32_t errorMsg) override; virtual void OnError(ErrorType type, int32_t errorMsg) override;
virtual void OnResult(uint64_t timestamp, const std::shared_ptr<CameraStandard::CameraMetadata> &result) override; virtual void OnResult(uint64_t timestamp, const std::shared_ptr<CameraStandard::CameraMetadata> &result) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_H #endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_H
@@ -62,5 +62,5 @@ int32_t DCameraDeviceCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel
} }
return 0; return 0;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -31,6 +31,6 @@ public:
int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option) override; MessageOption &option) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_CLIENT_STUB_H #endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_CLIENT_STUB_H
@@ -205,5 +205,5 @@ void DCameraDeviceProxy::Close()
DHLOGE("SendRequest failed, error code is %d.", ret); DHLOGE("SendRequest failed, error code is %d.", ret);
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -48,6 +48,6 @@ private:
static inline BrokerDelegator<DCameraDeviceProxy> delegator_; static inline BrokerDelegator<DCameraDeviceProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_CLIENT_PROXY_H #endif // DISTRIBUTED_CAMERA_DEVICE_CLIENT_PROXY_H
@@ -32,5 +32,5 @@ void DCameraHostCallback::OnCameraEvent(const std::string &cameraId, CameraEvent
{ {
DHLOGW("DCameraHostCallback::OnCameraEvent enter."); DHLOGW("DCameraHostCallback::OnCameraEvent enter.");
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -31,6 +31,6 @@ public:
virtual void OnFlashlightStatus(const std::string &cameraId, FlashlightStatus status) override; virtual void OnFlashlightStatus(const std::string &cameraId, FlashlightStatus status) override;
virtual void OnCameraEvent(const std::string &cameraId, CameraEvent event) override; virtual void OnCameraEvent(const std::string &cameraId, CameraEvent event) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_H #endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_H
@@ -71,5 +71,5 @@ int32_t DCameraHostCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &d
} }
return 0; return 0;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -31,6 +31,6 @@ public:
int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option) override; MessageOption &option) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_CLIENT_STUB_H #endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_CLIENT_STUB_H
@@ -207,5 +207,5 @@ CamRetCode DCameraHostProxy::SetFlashlight(const std::string &cameraId, bool &is
} }
return static_cast<CamRetCode>(reply.ReadInt32()); return static_cast<CamRetCode>(reply.ReadInt32());
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -45,6 +45,6 @@ private:
static inline BrokerDelegator<DCameraHostProxy> delegator_; static inline BrokerDelegator<DCameraHostProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_HOST_CLIENT_PROXY_H #endif // DISTRIBUTED_CAMERA_HOST_CLIENT_PROXY_H
@@ -87,5 +87,5 @@ CamRetCode DOfflineStreamOperatorProxy::Release()
} }
return static_cast<CamRetCode>(reply.ReadInt32()); return static_cast<CamRetCode>(reply.ReadInt32());
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -39,6 +39,6 @@ private:
static inline BrokerDelegator<DOfflineStreamOperatorProxy> delegator_; static inline BrokerDelegator<DOfflineStreamOperatorProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_OFFLINE_STREAM_OPERATOR_CLIENT_PROXY_H #endif // DISTRIBUTED_OFFLINE_STREAM_OPERATOR_CLIENT_PROXY_H
@@ -40,5 +40,5 @@ void DStreamOperatorCallback::OnFrameShutter(int32_t captureId, const std::vecto
{ {
DHLOGW("DStreamOperatorCallback::OnFrameShutter enter."); DHLOGW("DStreamOperatorCallback::OnFrameShutter enter.");
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -35,6 +35,6 @@ public:
virtual void OnFrameShutter(int32_t captureId, virtual void OnFrameShutter(int32_t captureId,
const std::vector<int32_t> &streamId, uint64_t timestamp) override; const std::vector<int32_t> &streamId, uint64_t timestamp) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_H #endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_H
@@ -148,5 +148,5 @@ int32_t DStreamOperatorCallbackStub::OnFrameShutterStub(MessageParcel &data, Mes
OnFrameShutter(captureId, streamIds, timestamp); OnFrameShutter(captureId, streamIds, timestamp);
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -36,6 +36,6 @@ private:
int32_t OnCaptureErrorStub(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t OnCaptureErrorStub(MessageParcel &data, MessageParcel &reply, MessageOption &option);
int32_t OnFrameShutterStub(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t OnFrameShutterStub(MessageParcel &data, MessageParcel &reply, MessageOption &option);
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_CLIENT_STUB_H #endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_CLIENT_STUB_H
@@ -384,5 +384,5 @@ CamRetCode DStreamOperatorProxy::ChangeToOfflineStream(
offlineOperator = OHOS::iface_cast<IOfflineStreamOperator>(remoteObj); offlineOperator = OHOS::iface_cast<IOfflineStreamOperator>(remoteObj);
return retCode; return retCode;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -60,6 +60,6 @@ private:
static inline BrokerDelegator<DStreamOperatorProxy> delegator_; static inline BrokerDelegator<DStreamOperatorProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_STREAM_OPERATOR_CLIENT_PROXY_H #endif // DISTRIBUTED_STREAM_OPERATOR_CLIENT_PROXY_H
@@ -63,5 +63,5 @@ DCamRetCode DCameraProviderCallback::UpdateSettings(const std::shared_ptr<DHBase
DHLOGW("DCameraProviderCallback::UpdateSettings enter."); DHLOGW("DCameraProviderCallback::UpdateSettings enter.");
return DCamRetCode::SUCCESS; return DCamRetCode::SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -38,6 +38,6 @@ public:
virtual DCamRetCode UpdateSettings(const std::shared_ptr<DHBase> &dhBase, virtual DCamRetCode UpdateSettings(const std::shared_ptr<DHBase> &dhBase,
const std::vector<std::shared_ptr<DCameraSettings>> &settings) override; const std::vector<std::shared_ptr<DCameraSettings>> &settings) override;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_H #endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_H
@@ -251,5 +251,5 @@ int32_t DCameraProviderCallbackStub::DCProviderUpdateSettingsStub(MessageParcel
} }
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -39,6 +39,6 @@ private:
int32_t DCProviderStopCaptureStub(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DCProviderStopCaptureStub(MessageParcel &data, MessageParcel &reply, MessageOption &option);
int32_t DCProviderUpdateSettingsStub(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DCProviderUpdateSettingsStub(MessageParcel &data, MessageParcel &reply, MessageOption &option);
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_CLIENT_STUB_H #endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_CLIENT_STUB_H
@@ -328,5 +328,5 @@ void DCameraProviderProxy::DCameraMemoryUnmap(BufferHandle *buffer)
buffer->virAddr = nullptr; buffer->virAddr = nullptr;
FreeBufferHandle(buffer); FreeBufferHandle(buffer);
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -54,6 +54,6 @@ private:
static inline BrokerDelegator<DCameraProviderProxy> delegator_; static inline BrokerDelegator<DCameraProviderProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_CLIENT_PROXY_H #endif // DISTRIBUTED_CAMERA_PROVIDER_CLIENT_PROXY_H
@@ -83,10 +83,10 @@ struct HdfDriverEntry g_dCameraHostDriverEntry = {
#ifndef __cplusplus #ifndef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
HDF_INIT(g_dCameraHostDriverEntry); HDF_INIT(g_dCameraHostDriverEntry);
#ifndef __cplusplus #ifndef __cplusplus
} }
#endif #endif // __cplusplus
@@ -84,10 +84,10 @@ struct HdfDriverEntry g_dCameraProviderConfigEntry = {
#ifndef __cplusplus #ifndef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
HDF_INIT(g_dCameraProviderConfigEntry); HDF_INIT(g_dCameraProviderConfigEntry);
#ifndef __cplusplus #ifndef __cplusplus
} }
#endif #endif // __cplusplus
@@ -102,6 +102,6 @@ public:
pEvent->content_ = parcel.ReadString(); pEvent->content_ = parcel.ReadString();
} }
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // HDI_IPC_DATA_UTILS_H #endif // HDI_IPC_DATA_UTILS_H
@@ -85,5 +85,5 @@ void DCameraDeviceCallbackProxy::OnResult(uint64_t timestamp,
return; return;
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -35,6 +35,6 @@ public:
private: private:
static inline BrokerDelegator<DCameraDeviceCallbackProxy> delegator_; static inline BrokerDelegator<DCameraDeviceCallbackProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_PROXY_H #endif // DISTRIBUTED_CAMERA_DEVICE_CALLBACK_PROXY_H
@@ -232,5 +232,5 @@ int32_t DCameraDeviceStub::DCDeviceStubClose(MessageParcel& data, MessageParcel&
Close(); Close();
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -39,6 +39,6 @@ private:
int32_t DCDeviceStubDisableResult(MessageParcel& data, MessageParcel& reply, MessageOption& option); int32_t DCDeviceStubDisableResult(MessageParcel& data, MessageParcel& reply, MessageOption& option);
int32_t DCDeviceStubClose(MessageParcel& data, MessageParcel& reply, MessageOption& option); int32_t DCDeviceStubClose(MessageParcel& data, MessageParcel& reply, MessageOption& option);
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_DEVICE_SERVER_STUB_H #endif // DISTRIBUTED_CAMERA_DEVICE_SERVER_STUB_H
@@ -104,5 +104,5 @@ void DCameraHostCallbackProxy::OnCameraEvent(const std::string &cameraId, Camera
DHLOGE("SendRequest failed, error code is %d.", ret); DHLOGE("SendRequest failed, error code is %d.", ret);
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -36,6 +36,6 @@ public:
private: private:
static inline BrokerDelegator<DCameraHostCallbackProxy> delegator_; static inline BrokerDelegator<DCameraHostCallbackProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_PROXY_H #endif // DISTRIBUTED_CAMERA_HOST_CALLBACK_PROXY_H
@@ -211,8 +211,8 @@ int32_t DCameraHostStub::OnRemoteRequest(int cmdId, MessageParcel &data,
} }
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
void *DCameraHostStubInstance() void *DCameraHostStubInstance()
{ {
@@ -57,8 +57,8 @@ private:
private: private:
std::shared_ptr<DCameraHost> dcameraHost_ = nullptr; std::shared_ptr<DCameraHost> dcameraHost_ = nullptr;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
void* DCameraHostStubInstance(); void* DCameraHostStubInstance();
@@ -104,5 +104,5 @@ int32_t DOfflineStreamOperatorStub::DOfflineStreamOperatorStubRelease(MessagePar
} }
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -34,6 +34,6 @@ public:
int32_t DOfflineStreamOperatorStubReleaseStreams(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DOfflineStreamOperatorStubReleaseStreams(MessageParcel &data, MessageParcel &reply, MessageOption &option);
int32_t DOfflineStreamOperatorStubRelease(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DOfflineStreamOperatorStubRelease(MessageParcel &data, MessageParcel &reply, MessageOption &option);
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_OFFLINE_STREAM_OPERATOR_SERVER_STUB_H #endif // DISTRIBUTED_OFFLINE_STREAM_OPERATOR_SERVER_STUB_H
@@ -159,5 +159,5 @@ void DStreamOperatorCallbackProxy::OnFrameShutter(int32_t captureId,
DHLOGE("SendRequest failed, error code is %d.", ret); DHLOGE("SendRequest failed, error code is %d.", ret);
} }
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -40,6 +40,6 @@ public:
private: private:
static inline BrokerDelegator<DStreamOperatorCallbackProxy> delegator_; static inline BrokerDelegator<DStreamOperatorCallbackProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_PROXY_H #endif // DISTRIBUTED_STREAM_OPERATOR_CALLBACK_PROXY_H
@@ -352,5 +352,5 @@ int32_t DStreamOperatorStub::DStreamOperatorStubChangeToOfflineStream(MessagePar
} }
return HDF_SUCCESS; return HDF_SUCCESS;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -42,6 +42,6 @@ private:
int32_t DStreamOperatorStubCancelCapture(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DStreamOperatorStubCancelCapture(MessageParcel &data, MessageParcel &reply, MessageOption &option);
int32_t DStreamOperatorStubChangeToOfflineStream(MessageParcel &data, MessageParcel &reply, MessageOption &option); int32_t DStreamOperatorStubChangeToOfflineStream(MessageParcel &data, MessageParcel &reply, MessageOption &option);
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_STREAM_OPERATOR_SERVER_STUB_H #endif // DISTRIBUTED_STREAM_OPERATOR_SERVER_STUB_H
@@ -263,5 +263,5 @@ DCamRetCode DCameraProviderCallbackProxy::UpdateSettings(const std::shared_ptr<D
} }
return static_cast<DCamRetCode>(reply.ReadInt32()); return static_cast<DCamRetCode>(reply.ReadInt32());
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
@@ -43,6 +43,6 @@ public:
private: private:
static inline BrokerDelegator<DCameraProviderCallbackProxy> delegator_; static inline BrokerDelegator<DCameraProviderCallbackProxy> delegator_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_PROXY_H #endif // DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_PROXY_H
@@ -244,8 +244,8 @@ int32_t DCameraProviderStub::OnRemoteRequest(uint32_t code, MessageParcel& data,
} }
return ret; return ret;
} }
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
void *DCameraProviderStubInstance() void *DCameraProviderStubInstance()
{ {
@@ -48,8 +48,8 @@ private:
private: private:
std::shared_ptr<DCameraProvider> dcameraProvider_ = nullptr; std::shared_ptr<DCameraProvider> dcameraProvider_ = nullptr;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
void* DCameraProviderStubInstance(); void* DCameraProviderStubInstance();
@@ -158,7 +158,6 @@ public:
virtual DCamRetCode Notify(const std::shared_ptr<DHBase> &dhBase, virtual DCamRetCode Notify(const std::shared_ptr<DHBase> &dhBase,
const std::shared_ptr<DCameraHDFEvent> &event) = 0; const std::shared_ptr<DCameraHDFEvent> &event) = 0;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // HDI_DISTRIBUTED_CAMERA_PROVIDER_H #endif // HDI_DISTRIBUTED_CAMERA_PROVIDER_H
@@ -155,7 +155,6 @@ public:
virtual DCamRetCode UpdateSettings(const std::shared_ptr<DHBase> &dhBase, virtual DCamRetCode UpdateSettings(const std::shared_ptr<DHBase> &dhBase,
const std::vector<std::shared_ptr<DCameraSettings>> &settings) = 0; const std::vector<std::shared_ptr<DCameraSettings>> &settings) = 0;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // HDI_DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_H #endif // HDI_DISTRIBUTED_CAMERA_PROVIDER_CALLBACK_H
+2 -3
View File
@@ -301,7 +301,6 @@ using DCameraHDFEvent = struct _DCameraHDFEvent {
*/ */
std::string content_; std::string content_;
}; };
} // end namespace DistributedHardware } // namespace DistributedHardware
} // end namespace OHOS } // namespace OHOS
#endif // DISTRIBUTED_CAMERA_PROVIDER_TYPES_H #endif // DISTRIBUTED_CAMERA_PROVIDER_TYPES_H
+3 -3
View File
@@ -55,6 +55,6 @@ private:
DataBuffer(const DataBuffer &) = delete; DataBuffer(const DataBuffer &) = delete;
DataBuffer &operator = (const DataBuffer &) = delete; DataBuffer &operator = (const DataBuffer &) = delete;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DATA_BUFFER_H
+3 -3
View File
@@ -38,6 +38,6 @@ public:
std::string devId_; std::string devId_;
std::string dhId_; std::string dhId_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_INDEX_H
+3 -3
View File
@@ -30,6 +30,6 @@ int64_t GetNowTimeStampUs();
std::string Base64Encode(const unsigned char *toEncode, unsigned int len); std::string Base64Encode(const unsigned char *toEncode, unsigned int len);
std::string Base64Decode(const std::string& basicString); std::string Base64Decode(const std::string& basicString);
bool IsBase64(unsigned char c); bool IsBase64(unsigned char c);
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_UTILS_TOOL_H
+2 -2
View File
@@ -115,5 +115,5 @@ DataBuffer::~DataBuffer()
data_ = nullptr; data_ = nullptr;
} }
} }
} } // namespace DistributedHardware
} } // namespace OHOS
+2 -2
View File
@@ -153,5 +153,5 @@ bool IsBase64(unsigned char c)
{ {
return (isalnum(c) || (c == '+') || (c == '/')); return (isalnum(c) || (c == '+') || (c == '/'));
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -57,4 +57,3 @@ ohos_shared_library("distributed_camera_sink_sdk") {
part_name = "distributed_camera" part_name = "distributed_camera"
} }
@@ -48,6 +48,6 @@ private:
std::shared_ptr<AppExecFwk::EventHandler> serviceHandler_; std::shared_ptr<AppExecFwk::EventHandler> serviceHandler_;
std::mutex initDmsLock_; std::mutex initDmsLock_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_SINK_HANDLER_IPC_H
@@ -155,5 +155,5 @@ void DCameraSinkHandlerIpc::OnSinkLocalDmsDied(const sptr<IRemoteObject>& remote
} }
localSink_ = nullptr; localSink_ = nullptr;
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -60,4 +60,3 @@ ohos_shared_library("distributed_camera_source_sdk") {
part_name = "distributed_camera" part_name = "distributed_camera"
} }
@@ -41,6 +41,6 @@ private:
std::map<std::string, std::shared_ptr<RegisterCallback>> regCallbacks_; std::map<std::string, std::shared_ptr<RegisterCallback>> regCallbacks_;
std::map<std::string, std::shared_ptr<UnregisterCallback>> unregCallbacks_; std::map<std::string, std::shared_ptr<UnregisterCallback>> unregCallbacks_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_SOURCE_CALLBACK_H
@@ -36,6 +36,6 @@ private:
using DCameraFunc = int32_t (DCameraSourceCallbackStub::*)(MessageParcel &data, MessageParcel &reply); using DCameraFunc = int32_t (DCameraSourceCallbackStub::*)(MessageParcel &data, MessageParcel &reply);
std::map<uint32_t, DCameraFunc> memberFuncMap_; std::map<uint32_t, DCameraFunc> memberFuncMap_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_SOURCE_CALLBACK_STUB_H
@@ -34,6 +34,6 @@ public:
virtual int32_t OnNotifyUnregResult(const std::string& devId, const std::string& dhId, const std::string& reqId, virtual int32_t OnNotifyUnregResult(const std::string& devId, const std::string& dhId, const std::string& reqId,
int32_t status, std::string& data) = 0; int32_t status, std::string& data) = 0;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_IDCAMERA_SOURCE_CALLBACL_H
@@ -51,11 +51,11 @@ private:
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
__attribute__((visibility("default"))) IDistributedHardwareSource *GetSourceHardwareHandler(); __attribute__((visibility("default"))) IDistributedHardwareSource *GetSourceHardwareHandler();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // __cplusplus
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_SOURCE_HANDLER_H
@@ -48,6 +48,6 @@ private:
std::shared_ptr<AppExecFwk::EventHandler> serviceHandler_; std::shared_ptr<AppExecFwk::EventHandler> serviceHandler_;
std::mutex initDmsLock_; std::mutex initDmsLock_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_SOURCE_HANDLER_IPC_H
@@ -44,7 +44,6 @@ public:
private: private:
static inline BrokerDelegator<DistributedCameraSourceProxy> delegator_; static inline BrokerDelegator<DistributedCameraSourceProxy> delegator_;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif // OHOS_DISTRIBUTED_CAMERA_SOURCE_PROXY_H
#endif
@@ -43,6 +43,6 @@ public:
const std::string& reqId) = 0; const std::string& reqId) = 0;
virtual int32_t DCameraNotify(const std::string& devId, const std::string& dhId, std::string& events) = 0; virtual int32_t DCameraNotify(const std::string& devId, const std::string& dhId, std::string& events) = 0;
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_IDISTRIBUTED_CAMERA_SOURCE_H
@@ -86,5 +86,5 @@ void DCameraSourceCallback::PopUnregCallback(std::string& reqId)
{ {
unregCallbacks_.erase(reqId); unregCallbacks_.erase(reqId);
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -78,5 +78,5 @@ int32_t DCameraSourceCallbackStub::NotifyUnregResultInner(MessageParcel &data, M
reply.WriteInt32(ret); reply.WriteInt32(ret);
return ret; return ret;
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -122,5 +122,5 @@ IDistributedHardwareSource *GetSourceHardwareHandler()
DHLOGI("DCameraSourceHandler GetSourceHardwareHandler Start"); DHLOGI("DCameraSourceHandler GetSourceHardwareHandler Start");
return &DCameraSourceHandler::GetInstance(); return &DCameraSourceHandler::GetInstance();
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -155,5 +155,5 @@ void DCameraSourceHandlerIpc::OnSourceLocalDmsDied(const sptr<IRemoteObject>& re
} }
localSource_ = nullptr; localSource_ = nullptr;
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -156,5 +156,5 @@ int32_t DistributedCameraSourceProxy::DCameraNotify(const std::string& devId, co
int32_t result = reply.ReadInt32(); int32_t result = reply.ReadInt32();
return result; return result;
} }
} } // namespace DistributedHardware
} } // namespace OHOS
@@ -49,6 +49,6 @@ private:
int32_t UmarshalValue(Json::Value& rootValue); int32_t UmarshalValue(Json::Value& rootValue);
int32_t UmarshalSettings(Json::Value& valueJson, std::shared_ptr<DCameraCaptureInfo>& captureInfo); int32_t UmarshalSettings(Json::Value& valueJson, std::shared_ptr<DCameraCaptureInfo>& captureInfo);
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_CAPTURE_INFO_H
@@ -52,6 +52,6 @@ public:
int32_t Marshal(std::string& jsonStr); int32_t Marshal(std::string& jsonStr);
int32_t Unmarshal(const std::string& jsonStr); int32_t Unmarshal(const std::string& jsonStr);
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_CHANNEL_INFO_H
@@ -39,6 +39,6 @@ public:
int32_t Marshal(std::string& jsonStr); int32_t Marshal(std::string& jsonStr);
int32_t Unmarshal(const std::string& jsonStr); int32_t Unmarshal(const std::string& jsonStr);
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_EVENT_H
@@ -43,6 +43,6 @@ public:
int32_t Marshal(std::string& jsonStr); int32_t Marshal(std::string& jsonStr);
int32_t Unmarshal(const std::string& jsonStr); int32_t Unmarshal(const std::string& jsonStr);
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_INFO_H
@@ -31,6 +31,6 @@ public:
int32_t Marshal(std::string& jsonStr); int32_t Marshal(std::string& jsonStr);
int32_t Unmarshal(const std::string& jsonStr); int32_t Unmarshal(const std::string& jsonStr);
}; };
} } // namespace DistributedHardware
} } // namespace OHOS
#endif #endif // OHOS_DCAMERA_METADATA_SETTING_H

Some files were not shown because too many files have changed in this diff Show More