|
|
|
@ -187,12 +187,23 @@ void CameraWidget::showEvent(QShowEvent *event) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CameraWidget::stopVipcThread() { |
|
|
|
|
makeCurrent(); |
|
|
|
|
if (vipc_thread) { |
|
|
|
|
vipc_thread->requestInterruption(); |
|
|
|
|
vipc_thread->quit(); |
|
|
|
|
vipc_thread->wait(); |
|
|
|
|
vipc_thread = nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef QCOM2 |
|
|
|
|
EGLDisplay egl_display = eglGetCurrentDisplay(); |
|
|
|
|
assert(egl_display != EGL_NO_DISPLAY); |
|
|
|
|
for (auto &pair : egl_images) { |
|
|
|
|
eglDestroyImageKHR(egl_display, pair.second); |
|
|
|
|
assert(eglGetError() == EGL_SUCCESS); |
|
|
|
|
} |
|
|
|
|
egl_images.clear(); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CameraWidget::availableStreamsUpdated(std::set<VisionStreamType> streams) { |
|
|
|
@ -323,8 +334,8 @@ void CameraWidget::vipcConnected(VisionIpcClient *vipc_client) { |
|
|
|
|
stream_stride = vipc_client->buffers[0].stride; |
|
|
|
|
|
|
|
|
|
#ifdef QCOM2 |
|
|
|
|
egl_display = eglGetCurrentDisplay(); |
|
|
|
|
|
|
|
|
|
EGLDisplay egl_display = eglGetCurrentDisplay(); |
|
|
|
|
assert(egl_display != EGL_NO_DISPLAY); |
|
|
|
|
for (auto &pair : egl_images) { |
|
|
|
|
eglDestroyImageKHR(egl_display, pair.second); |
|
|
|
|
} |
|
|
|
@ -415,13 +426,6 @@ void CameraWidget::vipcThread() { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef QCOM2 |
|
|
|
|
for (auto &pair : egl_images) { |
|
|
|
|
eglDestroyImageKHR(egl_display, pair.second); |
|
|
|
|
} |
|
|
|
|
egl_images.clear(); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CameraWidget::clearFrames() { |
|
|
|
|