Commit Graph

816 Commits

Author SHA1 Message Date
Vadim Pisarevsky
ccaedaedc8 Merge pull request #2047 from GregoryMorse:patch-4 2014-09-17 12:48:45 +00:00
Vadim Pisarevsky
533dd85299 Merge pull request #3225 from jormansa:bug_#3631 2014-09-17 10:40:42 +00:00
jormansa
1d2d579bd6 bug fixed 2014-09-15 18:09:44 +02: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
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
StevenPuttemans
34103ef1cb fixing setting the locale back to what should be expected
fix should be applyed for every window interface and generation
2014-08-05 16:20:08 +02:00
Vadim Pisarevsky
7cefaa49dd Merge pull request #2816 from ehren:avcapturesession_leak 2014-07-25 13:18:06 +00:00
Martijn Liem
9c285da329 Bugfix for bug #3767
Fixed a memory leak in cap_dshow.cpp in videoInput::setVideoSettingCamera(). The leak was caused by not releasing an IBaseFilter object created in a call to getDevice(). Tho object is now properly released.
2014-07-23 12:33:51 +02:00
Vadim Pisarevsky
39020fc9cf Merge pull request #2898 from PhilLab:2.4 2014-07-18 09:26:50 +00:00
Roman Donchenko
d262b04d99 Merge pull request #2903 from mmaraya:2.4 2014-07-11 14:15:59 +00:00
Vadim Pisarevsky
39127d942e Merge pull request #2908 from mmaraya:bug_3737 2014-07-07 13:29:38 +00:00
Alexander Alekhin
dcf96b2da7 Merge pull request #2922 from ilya-lavrenov:mac_fix 2014-07-02 12:18:11 +00:00
Ilya Lavrenov
070be56e14 fixed warnings 2014-07-01 14:32:16 +04:00
Alexander Alekhin
5c8cd76893 fix bug with invalid signature size (should not be less than signatureLength()) 2014-06-30 16:03:20 +04:00
Mike Maraya
7936faf9a3 Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737) 2014-06-27 08:34:40 -04:00
Mike Maraya
5c85f816c9 Revert "Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737)"
This reverts commit 56683e6d11.
2014-06-27 08:20:22 -04:00
Mike Maraya
56683e6d11 Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737) 2014-06-27 08:02:01 -04:00
Mike Maraya
fbac578c79 Fixes resizeWindow() on OS X (Bug #3200) 2014-06-27 23:26:09 -04:00
unknown
ade46bd428 Fixed typos in comments 2014-06-26 16:29:45 +02:00
Neo Alienson
b6e25a9fc7 Fix typos 2014-06-16 18:48:10 +08:00
Ehren Metcalfe
cd3aa0184a Fix resource leak with iOS camera due to failure to remove AVCaptureSession input/outputs on stop (Bug #3389) 2014-05-31 19:41:16 -04:00
Vadim Pisarevsky
44acfc38a1 Merge pull request #2739 from StevenPuttemans:bug_1523 2014-05-19 17:33:36 +04:00
StevenPuttemans
12207ac763 fix coordinate problem with large images - bug 1523 2014-05-19 13:07:44 +02:00
Yash Vadalia
7e56cfafbc fixed a syntax error in cap_giganetix.cpp
Ticket 3458 (http://code.opencv.org/issues/3458)
2014-05-13 19:59:37 +05:30
Luis Zarrabeitia
bb5a22c504 highgui: fix segfault on CvCapture_GStreamer::retrieveFrame
CvCapture_GStreamer::retrieveFrame assumes that RGB videos are 24BPP.
This is not necesarily the case, unless we explicitly tell GStreamer
that we want 24BPP RGB streams.

Adding bpp=(int)24 to the appsink caps.
2014-05-11 19:00:14 -04:00
Adrian Stratulat
4fb5680d91 Documentation - minor fix-ups 2014-04-23 17:30:27 +00:00
Artur Wieczorek
f27a886314 Fix for issue #3645 (http://code.opencv.org/issues/3645).
Implement missing features in CvCaptureCAM_VFW class.

Implemented missing CvCaptureCAM_VFW::setProperty() member function (handling CV_CAP_PROP_FRAME_WIDTH, CV_CAP_PROP_FRAME_HEIGHT, CV_CAP_PROP_FPS properties).
Extended CvCaptureCAM_VFW::setProperty()/getProperty() functions to handle also CV_CAP_PROP_FPS property.
Minor refactoring of CvCaptureCAM_VFW class.
2014-04-21 17:10:58 +02:00
David Rolland
cb8ddb1179 Corrected bug #1437. Corrected the cast of two short values from an lParam. lParam contains two signed-short, the position can be negative when another mouse event happens with a mouse_move (mouse_click, etc.)
The Microsoft documentation specifies NOT to use LOWORD and HIWORD macros to extract the x/y positions as it won't work correctly with multiple monitors. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms645607(v=vs.85).aspx.
2014-04-09 18:24:21 +12:00
Roman Donchenko
8af175b81b Merge pull request #2521 from atrebbi:#3620 2014-03-24 18:54:00 +04:00
Roman Donchenko
9aa6528fd7 Merge pull request #2504 from asmorkalov:android_camera_locks_24 2014-03-24 12:06:51 +04:00
Alessandro Trebbi
c4a63f6a86 - 2014-03-23 22:00:16 +01:00
Ilya Lavrenov
20b6191842 doc fix 2014-03-23 16:20:00 +04:00
Alexander Smorkalov
0dba5bdc4a Multiple fixes in camera.
Fixed constant value for focus mode FOCUS_MODE_CONTINUES_PHOTO;
Add setters and getters for exposure lock and white balance lock flags;
Excluded camera restart for all setters except frame size.
2014-03-21 17:26:05 +04:00
Dave Hughes
b184d7f27b Fix for #3554
v4l2_scan_controls_enumerate_menu is unused and causes ioctl error on
RaspberryPi and possibly other Video4Linux variants. See
http://www.raspberrypi.org/forum/viewtopic.php?f=43&t=65026 for more
detail.
2014-03-05 02:44:40 +00:00
Ilya Lavrenov
099ea91823 typos 2014-03-04 12:47:40 +04:00
Roman Donchenko
af8aa8a2fa Merge pull request #2433 from ilya-lavrenov:typos 2014-03-03 12:20:35 +04:00
Ilya Lavrenov
eedf86402d typos 2014-03-02 21:04:17 +04:00
Alexander Smorkalov
dbb7aa7856 Highgui_Tiff.decode_tile16384x16384 disabled for Android.
Last changes in test leads to SIGKILL on Android.
SIGKILL is called by out of memory killer.
2014-02-25 10:36:20 +04:00
Matti Picus
dc50dc7254 fix merge 2014-02-21 13:54:58 +02:00
Matti Picus
f5330a44e8 merge with origin 2014-02-21 11:59:49 +02:00
Matti Picus
31c8f2ec57 fix code, it turns out only TIFFReadRGBATile needs buffer pointer mangling 2014-02-20 22:12:22 +02:00
Matti Picus
46d128e073 add test (needs updated opencv_extra repo) 2014-02-20 22:10:22 +02:00
Alexander Shishkov
77df5948e7 removed trailing spaces 2014-02-18 13:56:26 +04:00
Alexander Shishkov
cc529d971b removed tabs 2014-02-17 17:37:02 +04:00