1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Merge pull request #7854 from alalek:backports_2016

(2.4) Backports from master branch (#7854)
This commit is contained in:
Alexander Alekhin
2016-12-15 18:09:44 +02:00
committed by GitHub
parent 49e6bb2993
commit cc09f5a7de
61 changed files with 1546 additions and 966 deletions
+3
View File
@@ -286,6 +286,9 @@ else(ANDROID)
endif(ANDROID)
# step 5: build native part
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-const-variable -Woverloaded-virtual)
add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_sources} ${generated_cpp_sources}
${copied_files}
"${JAR_FILE}" "${JAR_FILE}.dephelper")
@@ -328,6 +328,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
@Override
public void run() {
do {
boolean hasFrame = false;
synchronized (JavaCameraView.this) {
try {
while (!mCameraFrameReady && !mStopThread) {
@@ -337,11 +338,14 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
e.printStackTrace();
}
if (mCameraFrameReady)
{
mChainIdx = 1 - mChainIdx;
mCameraFrameReady = false;
hasFrame = true;
}
}
if (!mStopThread && mCameraFrameReady) {
mCameraFrameReady = false;
if (!mStopThread && hasFrame) {
if (!mFrameChain[1 - mChainIdx].empty())
deliverAndDrawFrame(mCameraFrame[1 - mChainIdx]);
}