mirror of
https://github.com/openharmony/distributed_camera.git
synced 2026-07-21 04:05:22 -04:00
!124 【分布式相机】修复相机应用多机位模式更改设置后黑屏问题
Merge pull request !124 from zhuxu/master
This commit is contained in:
+6
-6
@@ -336,16 +336,16 @@ void DCameraSinkController::OnSessionState(int32_t state)
|
||||
DHLOGI("DCameraSinkController::OnSessionState %s new thread session state: %d",
|
||||
GetAnonyString(dhId_).c_str(), sessionState_);
|
||||
std::lock_guard<std::mutex> autoLock(autoLock_);
|
||||
int32_t ret = StopCapture();
|
||||
if (ret != DCAMERA_OK) {
|
||||
DHLOGE("DCameraSinkController::OnSessionState session state: %d, %s stop capture failed, ret: %d",
|
||||
sessionState_, GetAnonyString(dhId_).c_str(), ret);
|
||||
}
|
||||
ret = CloseChannel();
|
||||
int32_t ret = CloseChannel();
|
||||
if (ret != DCAMERA_OK) {
|
||||
DHLOGE("DCameraSinkController::OnSessionState session state: %d, %s close channel failed, ret: %d",
|
||||
sessionState_, GetAnonyString(dhId_).c_str(), ret);
|
||||
}
|
||||
ret = StopCapture();
|
||||
if (ret != DCAMERA_OK) {
|
||||
DHLOGE("DCameraSinkController::OnSessionState session state: %d, %s stop capture failed, ret: %d",
|
||||
sessionState_, GetAnonyString(dhId_).c_str(), ret);
|
||||
}
|
||||
}).detach();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ int32_t DCameraChannelSinkImpl::ReleaseSession()
|
||||
if (softbusSession_ == nullptr) {
|
||||
return DCAMERA_OK;
|
||||
}
|
||||
DCameraSoftbusAdapter::GetInstance().sourceSessions_.erase(softbusSession_->GetMySessionName());
|
||||
DCameraSoftbusAdapter::GetInstance().sinkSessions_.erase(softbusSession_->GetMySessionName());
|
||||
int32_t ret = DCameraSoftbusAdapter::GetInstance().DestroySoftbusSessionServer(softbusSession_->GetMySessionName());
|
||||
if (ret != DCAMERA_OK) {
|
||||
DHLOGE("DCameraChannelSinkImpl ReleaseSession %s failed, ret: %d", mySessionName_.c_str(), ret);
|
||||
|
||||
Reference in New Issue
Block a user