Merge "Modifies HalCamera::clientStreamEnding() method" into rvc-dev
diff --git a/evs/manager/1.1/HalCamera.cpp b/evs/manager/1.1/HalCamera.cpp
index 6e6f77d..38297bb 100644
--- a/evs/manager/1.1/HalCamera.cpp
+++ b/evs/manager/1.1/HalCamera.cpp
@@ -257,7 +257,7 @@
}
-void HalCamera::clientStreamEnding(sp<VirtualCamera> client) {
+void HalCamera::clientStreamEnding(const VirtualCamera* client) {
{
std::lock_guard<std::mutex> lock(mFrameMutex);
auto itReq = mNextRequests->begin();
@@ -269,7 +269,7 @@
}
}
- const uint64_t clientId = reinterpret_cast<const uint64_t>(client.get());
+ const uint64_t clientId = reinterpret_cast<const uint64_t>(client);
if (itReq != mNextRequests->end()) {
mNextRequests->erase(itReq);
@@ -282,7 +282,7 @@
auto itCam = mClients.begin();
while (itCam != mClients.end()) {
- if (itCam->promote() == client.get()) {
+ if (itCam->promote() == client) {
break;
} else {
++itCam;
diff --git a/evs/manager/1.1/HalCamera.h b/evs/manager/1.1/HalCamera.h
index 7e010a6..efc5c25 100644
--- a/evs/manager/1.1/HalCamera.h
+++ b/evs/manager/1.1/HalCamera.h
@@ -94,7 +94,7 @@
const int64_t timestamp);
Return<EvsResult> clientStreamStarting();
- void clientStreamEnding(sp<VirtualCamera> client);
+ void clientStreamEnding(const VirtualCamera* client);
Return<void> doneWithFrame(const BufferDesc_1_0& buffer);
Return<void> doneWithFrame(const BufferDesc_1_1& buffer);
Return<EvsResult> setMaster(sp<VirtualCamera> virtualCamera);
diff --git a/evs/manager/1.1/VirtualCamera.cpp b/evs/manager/1.1/VirtualCamera.cpp
index 8b94a15..6204a78 100644
--- a/evs/manager/1.1/VirtualCamera.cpp
+++ b/evs/manager/1.1/VirtualCamera.cpp
@@ -90,10 +90,10 @@
}
mFramesHeld.clear();
- }
- // Drop our reference to our associated hardware camera
- mHalCamera.clear();
+ // Drop our reference to our associated hardware camera
+ mHalCamera.clear();
+ }
}