Commit Graph

6681 Commits

Author SHA1 Message Date
Alexander Smorkalov
1f4fe3bb27 GStreamer 1.0 backport from master branch. 2014-09-30 12:30:09 +04:00
Maksim Shabunin
a160158cb3 Merge pull request #3272 from mgeorg:reset_ffmpeg_mutex_2_4 2014-09-29 12:07:22 +00:00
Vadim Pisarevsky
6a53cb9307 Merge pull request #3266 from mshabunin:arm_warning 2014-09-27 13:06:44 +00:00
Vadim Pisarevsky
1920232268 Merge pull request #3260 from a-wi:MSMF_file_error 2014-09-27 13:06:18 +00:00
Manfred Georg
7f4eb4f6c6 set ffmpeg mutex to NULL on destruction.
The Mutex manager registered with ffmpeg must reset the mutex to NULL after destruction, otherwise ffmpeg will give the invalid mutex to the next mutex manager when it asks it to CREATE a new mutex.
See ffmpeg code: http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/utils.c;h=28c5785398fcf11a3d3c70a8cd09e9df798e2734;hb=HEAD#l3423

Cherry picked from head (file has moved but issue is the same).
Conflicts:
	modules/videoio/src/cap_ffmpeg_impl.hpp
2014-09-26 10:19:34 -07:00
Maksim Shabunin
e88a36621e Fixed warning during cross compile for ARM 2014-09-25 12:27:48 +04:00
Vadim Pisarevsky
467f5fc90f Merge pull request #3261 from a-wi:CMake_FFMPEG_config 2014-09-24 17:03:08 +00:00
Artur Wieczorek
93d1ceae43 Use FFMPEG capture only if HAVE_FFMPEG flag is defined. 2014-09-24 02:11:59 +02:00
Artur Wieczorek
073a7ff95a Fixed CMake issue with FFMPEG highgui configuration
Currently, FFMPEG source files are included in highgui project file regardless of CMake WITH_FFMPEG option.
After applying this PR FFMPEG files are included only if WITH_FFMPEG option is enabled.
2014-09-23 23:46:03 +02:00
Artur Wieczorek
5bf1a4c08c Fixed MSMF file capture error while opening the file containing unsupported video stream format 2014-09-23 20:21:53 +02:00
bhack
32f6e1a554 Fix for bug #3469 CV_XADD failing in clang+nvcc combination
Taken from 3f07655231
2014-09-23 12:39:16 +02:00
Vadim Pisarevsky
10bbcca11e Merge pull request #3251 from a-wi:MSMF_camera_errors 2014-09-23 08:42:57 +00:00
Vadim Pisarevsky
19b3aab23f Merge pull request #3244 from tstellarAMD:2.4-ocl-inline-fix-v2 2014-09-23 07:19:38 +00:00
Vadim Pisarevsky
df28bb5ccd Merge pull request #3190 from StevenPuttemans:fix_simpleblobdetector 2014-09-23 07:18:01 +00:00
StevenPuttemans
d4ec359f11 Fixing errors 2014-09-22 22:12:27 +02:00
Artur Wieczorek
3603102c89 Fixed assertion warning in MSMF frame grabber 2014-09-22 19:38:04 +02:00
Artur Wieczorek
a615102947 Fixed MSMF video capture initialization 2014-09-22 19:35:36 +02:00
Vadim Pisarevsky
9c91d0103f Merge pull request #3247 from a-wi:CMake_MSMF_configuration 2014-09-22 15:31:09 +00:00
StevenPuttemans
03662c0589 fix blobdetector 2014-09-22 13:58:45 +02:00
Artur Wieczorek
7c354c14f7 CMake configuration for MSMF capture 2014-09-21 21:03:41 +02:00
Artur Wieczorek
d2ba09e6ff Fix linking error under Win 7 - do not import MinCore_Downlevel.lib if target is Win 7 or earlier. 2014-09-19 22:46:09 +02:00
Tom Stellard
934394c5e2 ocl: Don't use 'inline' attribute on functions
In C99 'inline' is not a hint to the compiler to inline the function,
it is an attribute that affects the linkage of the function.  'inline'
functions are required to have a definition in a different compiliation
unit, so compilers are free to delete 'inline' functions if they want to.

This issue can be seen in Clang when compiling at -O0.  Clang
will sometimes delete 'inline' functions which creates an invalid
program.

Issue 3746: http://code.opencv.org/issues/3746
2014-09-19 16:13:57 -04:00
Vadim Pisarevsky
6c3cadbd73 Merge pull request #3240 from a-wi:MSMF_compilation_errors 2014-09-19 17:36:13 +00:00
Vadim Pisarevsky
4dda2002f6 Merge pull request #3241 from WilhelmHannemann:bugfix_brute_force_match_cl 2014-09-19 17:35:07 +00:00
Artur Wieczorek
539f8032dc Fixed compilation errors under VS 2010 and Win 7 2014-09-19 17:07:52 +02:00
WilhelmHannemann
150487feda Bugfix brute_force_match.cl (see http://code.opencv.org/issues/2837): wrong results for non-float descriptors in OpenCL BruteForceMatcher 2014-09-19 16:41:54 +02:00
Vadim Pisarevsky
3516e14e05 Merge branch 'bug_3172' of https://github.com/elmarb/opencv into bfmatcher_fix;
use different fix for the problem, embedded right into the BFMatcher.
2014-09-19 15:31:21 +04:00
E Braun
d82b918a7b fix for bug 3172 2014-09-19 14:47:43 +04:00
E Braun
f60726b090 Revert "fix for bug 3172"
This reverts commit ed2cdb71e5.
2014-09-19 14:47:43 +04:00
E Braun
1675b23a64 fix for bug 3172 2014-09-19 14:47:43 +04:00
E Braun
aa9da6e433 regression test for bug 3172 2014-09-19 14:47:43 +04:00
Benoit Seguin
084835ec30 Fixing a line where integer data was treated as floating point data. 2014-09-18 14:03:13 +02:00
Vadim Pisarevsky
ccaedaedc8 Merge pull request #2047 from GregoryMorse:patch-4 2014-09-17 12:48:45 +00:00
Vadim Pisarevsky
c5de129c36 Merge pull request #3222 from dmitrygribanov:dg/2.4-stitching-wave-correction-bugfix 2014-09-17 10:54:02 +00:00
Vadim Pisarevsky
533dd85299 Merge pull request #3225 from jormansa:bug_#3631 2014-09-17 10:40:42 +00:00
Philipp Hasper
bac492fff6 Doc: Fixing indentation 2014-09-17 09:30:19 +02:00
jormansa
1d2d579bd6 bug fixed 2014-09-15 18:09:44 +02:00
Andrey Pavlenko
80687c8a56 Merge pull request #3219 from mshabunin:png_iccp_strip_24 2014-09-15 13:54:19 +00:00
Dmitry Gribanov
8a1d3929cc Feature based stitching's wave correction bugfix.
When we have similar matrices in input, then algorithm returns matrices
with NaN values.
2014-09-15 17:04:08 +04:00
Alexander Smorkalov
343f4b3026 OpenCV version++. 2014-09-15 14:55:25 +04:00
Maksim Shabunin
882426a9b2 Stripped iCCP chunk from png files 2014-09-15 12:48:28 +04:00
Vadim Pisarevsky
cf15b9e8ad Merge pull request #3204 from parafin:ximea_unix-2.4 2014-09-14 18:44:23 +00:00
GregoryMorse
b9d5f3f6e9 Add support for WinRT in the MF capture framework by removing the disallowed calls to enumerate devices and create a sample grabber sink and adding framework for the MediaCapture interface and a custom sink which interfaces with the sample grabber callback interface. The change requires discussion for making it completely functional as redundancy is required given that if the source is a video file, the old code pathways must be used. Otherwise all IMFMediaSession, IMFMediaSource, and IMFActivate code must use a MediaCapture code path and all sink code must use the CMediaSink custom sink.
Support for the custom sink is extended to non-WinRT not for compatibility as Windows Vista client is a minimum regardless, but because it offers more flexibility, could be faster and is able to be used as an optionally different code path during sink creation based on a future configuration parameter.

My discussion and proposal to finish this change:
 Devices are so easily enumerated through WinRT Windows.Devices namespace that wrapping the calls in a library is quite a chore for little benefit though to get the various modes and formats could still be a worthwhile project. For now conditional compilation to remove videodevices and any offending non-video file related activity in videodevice. In my opinion, this is a different , far less fundamental and important change which can possibly be done as a future project and also much more easily implemented in C++/CX.

ImageGrabber has the IMFSampleGrabberSinkCallback replaced with a base class (SharedSampleGrabber) which also be is base class for ImageGrabberRT. This change is necessary as the custom sink does not require a thread to pump events which is done through MediaCapture already. IMFSampleGrabberSinkCallback is the common element between both models and that piece can be shared. Initializing the new ImageGrabberRT is as simple as passing an already initialized MediaCapture object and any video format/encoding parameters.

The concurrency event is necessary to wait for completion and is the way the underlying, IAsyncAction wrappers in the task library work as well. Native WIN32 event objects would be an option if HAVE_CONCURRENCY is not defined. I could even imagine doing it with sleep/thread yield and InterlockedCompareExchange yet I am not enthusiastic about that approach either. Since there is a specific compiler HAVE_ for concurrency, I do not like pulling it in though I think for WinRT it is safe to say we will always have it available though should probably conditionally compile with the Interlocked option as WIN32 events would require HAVE_WIN32.

It looks like C++/CX cannot be used for the IMediaExtension sink (which should not be a problem) as using COM objects requires WRL and though deriving from IMediaExtension can be done, there is little purpose without COM. Objects from C++/CX can be swapped to interact with objects from native C++ as Inspectable* can reinterpret_cast to the ref object IInspectable^ and vice-versa. A solution to the COM class with C++/CX would be great so we could have dual support. Also without #define for every WRL object in use, the code will get quite muddy given that the */^ would need to be ifdef'd everywhere.

Update cap_msmf.cpp

Fixed bugs and completed the change.  I believe the new classes need to be moved to a header file as the file has become to large and more classes need to be added for handling all the asynchronous problems (one wrapping IAsyncAction in a task and another for making a task out of IAsyncAction).  Unfortunately, blocking on the UI thread is not an option in WinRT so a synchronous architecture is considered "illegal" by Microsoft's standards even if implementable (C++/CX ppltasks library throws errors if you try it).  Worse, either by design or a bug in the MF MediaCapture class with Custom Sinks causes a crash if stop/start previewing without reinitializing (spPreferredPreviewMediaType is fatally nulled).  After decompiling Windows.Media.dll, I worked around this in my own projects by using an activate-able custom sink ID which strangely assigns 1 to this pointer allowing it to be reinitialized in what can only be described as a hack by Microsoft.  This would add additional overhead to the project to implement especially for static libraries as it requires IDL/DLL exporting followed by manifest declaration.  Better to document that it is not supported.

Furthermore, an additional class for IMFAttributes should be implemented to make clean architecture for passing around attributes as opposed to directly calling non-COM interface calls on the objects and making use of SetProperties which would also be a set up for an object that uses the RuntimeClass activation ID.

The remaining changes are not difficult and will be complete soon along with debug tracing messages.

Update and rename cap_msmf.h to cap_msmf.hpp

Successful test - samples are grabbed

Library updated and cleaned up with comments, marshaling, exceptions and linker settings
Fixed trailing whitespace

VS 2013 support and cleanup consistency plus C++/CX new object fixed

VS 2013 Update 2 library bug fix integrated

Various minor cleanup

Create agile_wrl.h

a-wi's changes integrated

Update cap_msmf.hpp

Update cap_msmf.cpp

Regression test fixes and simplifications
2014-09-10 17:21:38 +08:00
Igor Kuzmin
0421da78b3 XIMEA cam support: allow on OS X too 2014-09-09 19:17:13 +04:00
Igor Kuzmin
b027a84fa1 XIMEA cam support: use correct library for 64 bit Linux 2014-09-09 19:15:03 +04:00
Igor Kuzmin
fbbf4e380f fix for issue 3858 (remove unneeded #include's)
also use correct include path on Linux
2014-09-09 19:10:05 +04:00
Vadim Pisarevsky
faed8f43d6 Merge pull request #3194 from stonier:2.4 2014-09-09 06:33:15 +00:00
Alexander Smorkalov
35768ed638 Python tests added to -tests deb package. 2014-09-08 18:11:12 +04:00
Daniel Stonier
161f50962d make sure children are included in the moveToThread 2014-09-08 04:31:37 +09:00
Daniel Stonier
e638b9e805 support invokation of cv windows from parallel threads to an external qt application. 2014-09-08 03:19:56 +09:00