Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d0474a9b
Commit
d0474a9b
authored
Oct 26, 2016
by
E Sommerlade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed use of std::lock outside of ifdefs
parent
118c1b4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
detection_based_tracker.cpp
modules/objdetect/src/detection_based_tracker.cpp
+12
-0
No files found.
modules/objdetect/src/detection_based_tracker.cpp
View file @
d0474a9b
...
...
@@ -139,13 +139,24 @@ class cv::DetectionBasedTracker::SeparateDetectionWork
}
void
setParameters
(
const
cv
::
DetectionBasedTracker
::
Parameters
&
params
)
{
#ifdef USE_STD_THREADS
std
::
unique_lock
<
std
::
mutex
>
mtx_lock
(
mtx
);
#else
pthread_mutex_lock
(
&
mutex
);
#endif
parameters
=
params
;
#ifndef USE_STD_THREADS
pthread_mutex_unlock
(
&
mutex
);
#endif
}
inline
void
init
()
{
#ifdef USE_STD_THREADS
std
::
unique_lock
<
std
::
mutex
>
mtx_lock
(
mtx
);
#else
pthread_mutex_lock
(
&
mutex
);
#endif
stateThread
=
STATE_THREAD_STOPPED
;
isObjectDetectingReady
=
false
;
shouldObjectDetectingResultsBeForgot
=
false
;
...
...
@@ -153,6 +164,7 @@ class cv::DetectionBasedTracker::SeparateDetectionWork
objectDetectorThreadStartStop
.
notify_one
();
#else
pthread_cond_signal
(
&
(
objectDetectorThreadStartStop
));
pthread_mutex_unlock
(
&
mutex
);
#endif
}
protected
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment