Commit Graph

1197 Commits

Author SHA1 Message Date
gottagofaster236
b4e3359448 Fix OBS Virtual Camera capture. 2023-04-05 08:04:35 +02:00
Alexander Smorkalov
f5fd3e7d65
Merge pull request #23367 from LaurentBerger:msmf_doc
Note for MSMF in doc
2023-03-24 17:16:52 +03:00
Alexander Smorkalov
d3cc507380 Added reference to Media Foundation. 2023-03-23 16:58:22 +03:00
ippei.i
a60408cda5
Merge pull request #23300 from ippei-i:CAP_PROP_AUTO_WB-and-CAP_PROP_WHITE_BALANCE_BLUE_U_support_in_CAP_DSHOW
Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DShow

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [OK] I agree to contribute to the project under Apache 2 License.
- [OK] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [OK] The PR is proposed to the proper branch
- [OK] There is a reference to the original bug report and related work
https://github.com/opencv/opencv/issues/19621
https://github.com/opencv/opencv/issues/21408

### Before apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

### After apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 0

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

### Test Code
[OpenCvVideoCapTest.zip](https://github.com/opencv/opencv/files/10825399/OpenCvVideoCapTest.zip)
2023-03-21 14:29:24 +03:00
Maksim Shabunin
aef1fc087d cmake: fix V4L config verification conflict with OBSENSOR 2023-03-19 10:58:47 +03:00
unknown
a2e04718ec te for MSMF in doc 2023-03-17 13:36:47 +01:00
Alexander Alekhin
0052d46b8e Merge pull request #23237 from hzcyf:feature/orbbec_femto_mega_support 2023-03-01 07:13:22 +00:00
Alexander Alekhin
bdff0949bb dnn(tflite): add 3rdparty flatbuffers with pre-generated schema 2023-02-21 16:06:19 +00:00
hzcyf
325fe7e663 add support for Orbbec Femto Mega RGB-D camera 2023-02-11 16:22:35 +08:00
Maksim Shabunin
e4acd74e87 Fix some clang 14 warnings 2023-02-07 01:19:00 +03:00
Lilo Huang
cb7fe597a5
Merge pull request #23172 from lilohuang:master
Adding HEVC/H265 FourCC support to MSMF video writer

* Adding HEVC/H265 fourcc to MSMF video writer

Adding HEVC/H265 fourcc to MSMF video writer. I have verified it with my own video input stream, and it works well on my workstation.

* Update video io testing

* Adding macro fence to get rid of compiler error

H265/HEVC encoder is only available in Windows or later. https://learn.microsoft.com/en-us/windows/win32/medfound/h-265---hevc-video-encoder

* Update test_video_io.cpp
2023-01-25 04:49:08 +00:00
Maksim Shabunin
c1e5c16ff3 Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
Alexander Alekhin
36815fe3f3 videoio(test): skip unstable Media.audio test 2023-01-09 10:06:10 +00:00
Christoph Rackwitz
a64b51dd94
Merge pull request #23108 from crackwitz:issue-23107
Usage of imread(): magic number 0, unchecked result

* docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread()

* doc/py_tutorials: check imread() result
2023-01-09 09:55:31 +00:00
Alexander Alekhin
dbd4a0e5e6 videoio(ffmpeg): update tests with new Windows wrapper 2022-12-26 02:32:11 +00:00
Maxim Milashchenko
62b3a20da5
Merge pull request #22930 from MaximMilashchenko:gstreamer_support
Support one-time audio video reading

* stream switching functionality

* audio+video pipeline with switch stream functionality

* audio video sync

* fixed sync

* removed switch swtream functionality

* changed test for gstreamer audio

* fixed error

* fixed error

* fixed issue

* fixed issue

* fixed error

* fixed error

* fixed error
2022-12-23 10:15:22 +00:00
Alexander Alekhin
8676d19dc3 videoio(ffmpeg): limit number of default threads 2022-12-22 04:45:29 +00:00
Alexander Alekhin
f4b23de9dd videoio(v4l): initialize variables 2022-12-21 03:28:09 +00:00
Alexander Smorkalov
9f201a8ebe
Merge pull request #22979 from alalek:fix_videio_test_limit_threads
videoio(test): reduce number of test threads
2022-12-19 10:01:43 +03:00
Alexander Alekhin
420db56ffd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-18 02:17:17 +00:00
Alexander Alekhin
cdaf4c7321 videoio(test): reduce number of test threads 2022-12-18 00:02:07 +00:00
hzc
47fb79bd8c
Merge pull request #22936 from hzcyf:orbbec_new_cam_support
videoio: add Orbbec Gemini 2 and Astra 2 camera support

### Test Result

| OS | Compiler | Camera | Result |
|-----|-----------|---------|--------|
|Windows11| (VS2022)MSVC17.3|Orbbec Gemini 2|Pass|
|Windows11| (VS2022)MSVC17.3|Orbbec Astra 2|Pass|
|Ubuntu22.04|GCC9.2|Orbbec Gemini 2|Pass|
|Ubuntu22.04|GCC9.2|Orbbec Astra 2|Pass|

### Pull Request Readiness Checklist
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] The feature is well documented and sample code can be built with the project CMake
2022-12-16 12:23:12 +03:00
Alexander Smorkalov
3f22f4727c
Merge pull request #22919 from asmorkalov:as/gstreamer_read_timeout
Address https://github.com/opencv/opencv/issues/22868
Used the same defaults as it's done for FFmpeg

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake


```
force_builders=Custom
build_image:Custom=gstreamer:16.04
buildworker:Custom=linux-1
```
2022-12-15 12:53:22 +03:00
Alexander Alekhin
04c3a534af Merge pull request #22958 from asmorkalov:as/ffmpeg_missing_include 2022-12-14 21:16:07 +00:00
Sergei Shutov
8bd17163c7
Merge pull request #22939 from stopmosk:21826-python-bindings-for-videocapturewaitany
Add Python bindings for VideoCapture::waitAny #21826

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2022-12-14 22:15:02 +03:00
Alexander Smorkalov
189e1b228d Fix missing FFmpeg include needed for av_get_pix_fmt_name 2022-12-14 13:09:37 +03:00
Vadim Levin
727feda935 fix: AVFoundation inconsistent camera indices 2022-12-12 17:15:46 +03:00
Alexander Alekhin
39087fecdc
Merge pull request #22942 from alalek:videoio_test_update_hw_checks
* videoio(test): update PSNR check for H264/265

* videoio(test): reduce size for ffmpeg tests on 32-bit platforms
2022-12-12 12:38:14 +00:00
Alexander Alekhin
24d7eb0ca5 videoio(test): test skip due to non-updated FFmpeg wrapper 2022-12-08 17:18:29 +00:00
Maksim Shabunin
6ad216576d videoio/FFmpeg: added CV_16UC1 read/write support 2022-12-07 12:12:31 +03:00
Maksim Shabunin
5862b50217 videoio: fixed FFmpeg plugin build 2022-12-01 20:26:08 +03:00
Alexander Smorkalov
1192779d05
Merge pull request #22792 from tailsu:sd/avfoundation-orientation-meta
Add support for CAP_PROP_ORIENTATION_AUTO to AVFoundation backend
2022-11-30 14:25:09 +03:00
Stefan Dragnev
a462f49b99 add support for CAP_PROP_ORIENTATION_AUTO to AVFoundation backend
* extract rotateFrame as free function, rename to applyMetadataRotation
* LegacyCapture::get() always return 0, if cap is null
2022-11-25 17:25:13 +01:00
Amir Hassan
da4ac6b7ef
Merge pull request #22706 from kallaballa:libavdevice_for_ffmpeg_v4l2
Introduce libavdevice to make v4l2 available to the ffmpeg backend

* introduce libavdevice to make v4l2 available to the ffmpeg backend

* downgrade the min required libavdevice version to 53.2.0

* make libavdevice optional

* create OCV_OPTION OPENCV_FFMPEG_ENABLE_LIBAVDEVICE and add definition through ocv_add_external_target

* move OCV_OPTION 'OPENCV_FFMPEG_ENABLE_LIBAVDEVICE' to detect_ffmpeg.cmake
2022-11-11 22:28:02 +00:00
Alexander Smorkalov
f644634aa6
Merge pull request #22702 from kallaballa:ffmpeg_environment_variables
Dump the values of OPENCV_FFMPEG_CAPTURE_OPTIONS and OPENCV_FFMPEG_WRITER_OPTIONS to debug log
2022-10-27 12:18:52 +03:00
kallaballa
547f4c2c5a print a debug message if the environment variables OPENCV_FFMPEG_CAPTURE_OPTIONS and OPENCV_FFMPEG_WRITER_OPTIONS are set 2022-10-27 00:27:17 +02:00
Alexander Smorkalov
a6fadfe1c2 libav for jetson tk1 does not provide libavutil/display.h. 2022-10-25 10:21:20 +03:00
Hashem Zavvari
6eb34716b8
Merge pull request #22635 from hzawary:4.x
Setting CAP_PROP_AUTO_EXPOSURE on VideoCapture with backend DSHOW does not change anything. Now with this implementation the property can be used with value 1 for availability.
2022-10-18 11:13:08 +03:00
Alexander Alekhin
762481411d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-10-15 16:44:47 +00:00
Alexander Smorkalov
0ac67ee8d9
Merge pull request #22343 from komakai:android_cam_polling
Poll for frame data if acquisition fails after OnCaptureCompleted
2022-09-19 08:51:13 +03:00
Alexander Alekhin
66b3155a48 Merge pull request #22332 from komakai:android-cam-stride 2022-09-18 14:26:11 +00:00
Giles Payne
b3adffe437 Android Camera: poll for frame data if acquisition fails after OnCaptureCompleted 2022-09-18 13:41:36 +09:00
Alexander Smorkalov
a6017ac550
Merge pull request #22145 from danopdev:issues-22141
Fixed  time value obtained on some frames at the end of the video #22141
2022-09-15 19:18:58 +03:00
Alexander Smorkalov
48e50a7674 Extended video timestamp test to cover fix for the issue #22141. 2022-09-15 18:03:23 +03:00
Dan
122250b554 fix #22490 2022-09-15 13:24:18 +02:00
Dan
13823f117b #22214 and #22198 2022-09-14 14:19:04 +02:00
Alexander Smorkalov
ac91c45b0f
Merge pull request #22498 from alalek:update_ffmpeg_4.x
ffmpeg/4.x: update FFmpeg wrapper 2022.09
2022-09-14 09:34:12 +03:00
Henrik Dobbe Flemmen
6481cfd048 Update the fourcc codes link 2022-09-14 09:25:57 +03:00
Alexander Alekhin
fb3fc5322c videoio(ffmpeg): update tests with new Windows wrapper 2022-09-12 13:09:40 +00:00
cudawarped
46d988e2cb
Merge pull request #22248 from cudawarped:ffmpeg_rtsp_low_fps
* Allow the number of threads FFMpeg uses to be selected during VideoCapture::open().
Reset interupt timer in grab if
err = avformat_find_stream_info(ic, NULL);
is interupted but open is successful.

* Correct the returned number of threads and amend test cases.

* Update container test case.

* Reverse changes added to existing videoio_container test case and include test combining thread change and raw read in the newly added videoio_read test case.
2022-09-12 09:12:28 +03:00
Alexander Alekhin
2ac62bccec videoio(test): fix build warning 2022-09-05 16:53:08 +00:00
Alexander Smorkalov
67fa8a2f47
Merge pull request #22236 from mizo:v4l2-multi-planar-v2
V4L2: Add multi-planar capture support
2022-08-26 12:51:19 +03:00
Alexander Smorkalov
560eba91e5
Merge pull request #22347 from bu3w:filter-camera-streaming-by-format
select correct MediaType in MSMF backend.
2022-08-26 12:49:47 +03:00
Alexander Smorkalov
42561e1233
Merge pull request #22333 from cudawarped:fix_for_21101
Fix video codec fourcc #21101
2022-08-26 12:34:33 +03:00
Daisuke Mizobuchi
a001ab3a44 V4L2: Add multi-planar capture support
Devices which only support multi-planar capture cannot be processed as
single-planar.

Add multi-planar support to v4l driver.
2022-08-23 15:52:04 +09:00
MENG Yu
6432f02996 select correct MediaType in MSMF backend. 2022-08-22 12:09:28 +08:00
Zihao Mu
1fb8d60fd2 remove whitespace 2022-08-22 11:14:59 +08:00
Alexander Smorkalov
e14c3cff85 Merge pull request #22403 from Biswa96:add-locale-header 2022-08-19 10:01:23 +00:00
Biswapriyo Nath
984e42b0bc videoio: Include missing locale header for std::wstring_convert
This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_msmf.cpp:1020: error: 'wstring_convert' is not a member of 'std'
 1020 |                                     std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
      |                                          ^~~~~~~~~~~~~~~
opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:230:26: error: 'wstring_convert' is not a member of 'std'
  230 |                     std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
      |                          ^~~~~~~~~~~~~~~

The locale header is required according to C++ standard.
See https://en.cppreference.com/w/cpp/locale/wstring_convert
2022-08-19 13:15:58 +05:30
Alexander Smorkalov
0702685e7e Merge pull request #22395 from hzcyf:infinite_loop_fix 2022-08-19 07:11:09 +00:00
Alexander Smorkalov
7deb8f568f Merge pull request #22377 from Biswa96:condition_variable 2022-08-18 11:31:21 +00:00
hzcyf
11c5a6bb4d Fix infinite loop in obsensor 2022-08-18 12:22:22 +08:00
Alexander Smorkalov
9fcf015214 Merge pull request #22376 from zihaomu:issue_22373 2022-08-15 10:00:11 +00:00
Zihao Mu
d3dcef4b8b add new check for vidcap.h 2022-08-15 16:44:25 +08:00
Alexander Alekhin
2ebdc04787 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-08-14 15:50:42 +00:00
Biswapriyo Nath
c2c539e3cc
videoio: Include missing condition_variable header
This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.hpp:160:10: error: 'condition_variable' in namespace 'std' does not name a type
  160 |     std::condition_variable streamStateCv_;
      |          ^~~~~~~~~~~~~~~~~~
2022-08-14 19:26:08 +05:30
Jochen Sprickerhof
496eed950f
Add missing header for LIBAVCODEC_VERSION_INT 2022-08-08 23:33:28 +02:00
Alexander Smorkalov
88555948d0 Merge pull request #22339 from asenyaev:asen/obsensor_fix_for_win 2022-08-05 06:59:45 +00:00
Alexander Smorkalov
8bfe620fcc Merge pull request #22313 from mateusztabaka:getline 2022-08-03 09:30:22 +00:00
Andrey Senyaev
129319b0bc Fix in obsensor for VS 14 2022-08-03 12:14:15 +03:00
cudawarped
7ce83f2a95 Skip new test until pr built into windows ffmpeg dll. 2022-08-03 09:41:06 +03:00
cudawarped
4b05765174 Initial fix to try and return a valid fourcc when _opencv_avcodec_get_name fails. 2022-08-02 17:18:42 +03:00
Giles Payne
3390da6beb Fix for frame stride wider than frame width for 1080p issue 2022-08-02 21:00:22 +09:00
hzcyf
e951edeed3 fix linkage issue when enable BUILD_opencv_world (#22312) 2022-08-01 14:38:22 +08:00
Mateusz Tabaka
a89868928b Fix compilation error on CentOS 7 (gcc 4.8)
libstdc++ that comes with gcc 4.8 doesn't
define `getline(basic_istream<char>&&, std::string&)`
even if it's part of the c++11 standard.
However we can still use the following:
`getline(basic_istream<char>&, std::string&)`.
2022-07-27 13:24:25 +00:00
hzc
fc3e393516
videoio: add support for obsensor (Orbbec RGB-D Camera ) (#22196)
* videoio: add support for obsensor (Orbbec RGB-D Camera )

* obsensor: code format issues fixed and some code optimized

* obsensor: fix typo and format issues

* obsensor: fix crosses initialization error
2022-07-26 14:35:34 +03:00
Long Nguyen
199c2d2fd0 Define STRSAFE_NO_DEPRECATE for both clang and gcc mingw-w64 2022-07-15 18:01:15 +07:00
Alexander Alekhin
66567933d7 Merge pull request #22163 from philipphutterer:vcap-frame-type 2022-07-01 12:16:45 +00:00
Philipp Hutterer
90f2e1f8b5 Frame type property for ffmpeg video capture 2022-06-26 17:30:31 +02:00
Alexander Alekhin
2a4926f417 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-06-26 14:22:24 +00:00
Alexander Alekhin
397e9bc8d6 Merge pull request #22137 from danopdev:issues-22126 2022-06-25 15:21:55 +00:00
dan
2366f2cb2e issues-22126 2022-06-25 15:12:59 +02:00
Sean McBride
35f1a90df7
Merge pull request #22149 from seanm:sprintf
Replaced sprintf with safer snprintf

* Straightforward replacement of sprintf with safer snprintf

* Trickier replacement of sprintf with safer snprintf

Some functions were changed to take another parameter: the size of the buffer, so that they can pass that size on to snprintf.
2022-06-25 06:48:22 +03:00
dan
44c2519d75 issues-22141 2022-06-23 15:09:17 +02:00
Stefan Dragnev
d09bd6f862 correct direction of displaymatrix rotation 2022-06-13 14:15:39 +00:00
Alexander Alekhin
dda2e9374b Merge pull request #22018 from RidgeRun:gstreamer-consider-video-meta-if-available 2022-06-08 20:25:24 +00:00
Alexander Alekhin
e585453c2e videoio(test): skip failed tests in misconfigured environments 2022-05-25 06:40:03 +00:00
Michael Gruner
6a22c5b2b5 Consider video meta on GStreamer video capture
Some GStreamer elements may produce buffers with very non
standard strides, offsets and/or even transport each plane
in different, non-contiguous pointers. This non-standard
layout is communicated via GstVideoMeta structures attached
to the buffers. Given this, when a GstVideoMeta is available,
one should parse the layout from it instead of generating
a generic one from the caps.

The GstVideoFrame utility does precisely this: if the buffer
contains a video meta, it uses that to fill the format and
memory layout. If there is no meta available, the layout is
inferred from the caps.
2022-05-22 20:08:44 -06:00
Martin Tůma
df2e7fa6eb
Merge pull request #21992 from tumicdq:v4l2
* Added support for 4B RGB V4L2 pixel formats

Added support for V4L2_PIX_FMT_XBGR32 and V4L2_PIX_FMT_ABGR32 pixel
formats.

* Added workaround for missing V4L2_PIX_FMT_ABGR32 and V4L2_PIX_FMT_XBGR32
defines
2022-05-19 12:37:10 +00:00
OpenCV Developers
d9a444ca1a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-05-14 11:23:21 +00:00
Yulv-git
15ac54d5d6 Fix some typos in modules/. 2022-04-30 13:40:07 +08:00
Alexander Alekhin
271f7df343 videoio(ffmpeg): avoid memory leaks 2022-04-05 15:51:56 +00:00
Alexander Alekhin
1b3a06a02a videoio(ffmpeg): avoid memory leaks 2022-04-04 18:52:24 +00:00
Alexander Alekhin
38228709c8 Merge pull request #21644 from sturkmen72:patch-5 2022-04-01 22:43:33 +00:00
Maksim Shabunin
5440fd6cb4 videoio: initial FFmpeg 5.0 support 2022-03-30 18:15:53 +03:00
Suleyman TURKMEN
b060151625 add test (DISABLED_open_from_web) 2022-03-30 15:01:02 +03:00
Stefano Allegretti
2a218b96c4
Fix VideoCapture::open() brief description 2022-03-23 15:55:30 +01:00
Alexander Alekhin
eb067fee55 videoio(ffmpeg): fix memory leak 2022-03-13 04:08:51 +00:00
cudawarped
76aff84788
Merge pull request #21561 from cudawarped:ffmpeg_prefer_tcp_default
Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp

* Make the VideoCapture ffmpeg backends default rtsp connection type prefer_tcp.

* Ensure that the ffmpeg version of avformat is checked.
2022-02-10 19:45:34 +03:00
David Fan
574320ec3f
Merge pull request #21500 from Kanaderu:fix-gst-audio-win
videoio: added explicit gst-audio dependency for windows

* Update detect_gstreamer.cmake

videoio: added explicit gst-audio dependency for win32

* Fixed whitespace
2022-01-23 17:02:14 +03:00
Lukas Yoder
9592537840
Merge pull request #20363 from SentToDevNull:master
Updated To Modern Version of Aravis USB 3 Vision Protocol Library

* updated aravis backend to support aravis-0.8

* bugfix for aravis-0.8 support
2022-01-13 23:22:36 +03:00
Alexander Alekhin
aebb65e983 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-12 13:26:10 +00:00
Alexander Alekhin
05dbaf7672 videoio(msmf): use info message in SourceReaderCB destructor 2022-01-10 12:16:01 +03:00
Alexander Alekhin
f948a2d0c0 Merge pull request #21305 from alalek:cmake_plugins_lowercase_internal_names 2021-12-21 18:37:40 +00:00
Alexander Alekhin
c80b270678 cmake: force lowercase plugins internal names 2021-12-21 16:34:48 +00:00
Alexander Alekhin
4dbba5ac98 videoio: add non zero check 2021-12-21 14:32:19 +00:00
Alexander Alekhin
a22dd28e02 videoio: fix ffmpeg standalone build 2021-12-20 15:03:21 +00:00
Maksim Shabunin
bc3da25a4a videoio: added gst-audio dependency 2021-12-20 13:25:08 +03:00
Maxim Milashchenko
db4ab1c936
Merge pull request #21264 from MaximMilashchenko:AudioGStreamer
Audio GStreamer: added support .wav .flac audio formats

* added support .wav, lossless compressed audio formats

* fixed docs

* fixes

* videoio(gstreamer-audio): extra tests, improve error handling

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-12-16 19:43:02 +00:00
Alexander Alekhin
7620456486 videoio(MSMF): add queue for async ReadSample() 2021-12-13 21:02:24 +00:00
Alexander Alekhin
0c5b6e5556 videoio(MSMF): add queue for async ReadSample() 2021-12-10 16:01:08 +00:00
MaximMilashchenko
cb08c15616
Merge pull request #21145 from MaximMilashchenko:AudioUpdate
Audio MSMF: added the ability to set sample per second

* Audio MSMF: added the ability to set sample per second

* changed the valid sampling rate check

* fixed docs

* add test

* fixed warning

* fixed error

* fixed error
2021-12-04 10:37:10 +00:00
Alexander Alekhin
8b4fa2605e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-03 12:32:49 +00:00
Alexander Alekhin
f61883b227 Merge pull request #21165 from utibenkei:fix_android_ndk_camera_order_of_u_and_v 2021-12-02 17:16:35 +00:00
Jong Sin Kim
2da1f9181a
Merge pull request #21170 from JJJoonngg:4.x
Check buffer size when frameWidth * frameHeight bigger than allocated buffer size
2021-12-02 13:48:11 +00:00
utibenkei
68667d6057 fix_android_ndk_camera_order_of_u_and_v 2021-11-30 01:44:22 +09:00
yuki takehara
a6277370ca
Merge pull request #21107 from take1014:remove_assert_21038
resolves #21038

* remove C assert

* revert C header

* fix several points in review

* fix test_ds.cpp
2021-11-27 18:34:52 +00:00
Alexander Alekhin
cc1fbe0956 Merge pull request #21108 from ShuangLiu1992:patch-1 2021-11-24 20:10:37 +00:00
cudawarped
97c6ec6d49
Merge pull request #20978 from cudawarped:videocapture_read_raw_enchancement
Add capacity to Videocapture to return the extraData from FFmpeg when required

* Update rawMode to append any extra data recieved during the initial negotiation of an RTSP stream or during the parsing of an MPEG4 file header.
For h264[5] RTSP streams this ensures the parameter sets if available are always returned on the first call to grab()/read() and has two purposes:
1) To ensure the parameter sets are available even if they are not transmitted in band.  This is common for axis ip camera's.
2) To allow callers of VideoCapture::grab()[read()] to write to split the raw stream over multiple files by appending the parameter sets to the begining of any new files.
For (1) there is no alternative, for (2) if the parameter sets were provided in band it would be possible to parse the raw bit stream and search for the parameter sets however that would be a lot of work when that information is already provided by FFMPEG.
For MPEG4 files this information is only suplied in the header and is required for decoding.

Two properties are also required to enable the raw encoded bitstream to be written to multiple files, these are;
1) an indicator as to whether the last frame was a key frame or not - each new file needs to start at a key frame to avoid storing unusable frame diffs,
2) the length in bytes of the paramater sets contained in the last frame - required to split the paramater sets from the frame without having to parse the stream.  Any call to VideoCapture::get(CAP_PROP_LF_PARAM_SET_LEN) returning a number greater than zero indicates the presense of a parameter set at the begining of the raw bitstream.

* Adjust test data to account for extraData

* Address warning.

* Change added property names and remove paramater set start code check.

* Output extra data on calls to retrieve instead of appending to the first packet.

* Reverted old test case and added new one to evaluate new functionality.

* Add missing definition.

* Remove flag from legacy api.
Add property to determine if returning extra data is supported.
Always allow extra data to be returned on calls to cap.retrieve()
Update test case.

* Update condition which indicates CAP_PROP_CODEC_EXTRADATA_INDEX is not supported in test case.

* Include compatibility for windows dll if not updated.
Enforce existing return status convention.

* Fix return error and missing test constraints.
2021-11-23 21:18:55 +00:00
ShuangLiu1992
fa222b0ea2
Update cap_android_camera.cpp
since u and v Pixel ptr have been swapped the compare condition should be updated too
2021-11-23 15:03:18 +00:00
Alexander Alekhin
ac4b592b4e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
Alexander Alekhin
473f10877c doc(videoio): fix apiPreference note, replace DSHOW(deprecated)->MSMF 2021-11-16 17:08:11 +00:00
Fabrice Fontaine
4c92a2869b modules/videoio/src/cap_ffmpeg_impl.hpp: fix build with gcc 4.8
Fix the following build failure with gcc 4.8:

In file included from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp💯0,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg.cpp:50:
/home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_hw.hpp: In constructor 'HWAccelIterator::HWAccelIterator(cv::VideoAccelerationType, bool, AVDictionary*)':
/home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg_hw.hpp:939:23: error: use of deleted function 'std::basic_istringstream<char>& std::basic_istringstream<char>::operator=(const std::basic_istringstream<char>&)'
             s_stream_ = std::istringstream(accel_list);
                       ^
In file included from /home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/complex:45:0,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/core/include/opencv2/core/cvstd.inl.hpp:47,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/core/include/opencv2/core.hpp:3306,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/include/opencv2/videoio.hpp:46,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/precomp.hpp:57,
                 from /home/buildroot/autobuild/instance-3/output-1/build/opencv4-4.5.4/modules/videoio/src/cap_ffmpeg.cpp:42:
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/sstream:272:11: note: 'std::basic_istringstream<char>& std::basic_istringstream<char>::operator=(const std::basic_istringstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istringstream : public basic_istream<_CharT, _Traits>
           ^
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-none-linux-gnueabi/include/c++/4.8.3/sstream:272:11: error: use of deleted function 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)'

Fixes:
 - http://autobuild.buildroot.org/results/60f8846b435dafda0ced412d59ffe15bdff0810d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-11-12 09:50:17 +01:00
jcong
d2c1f1131b videoio: drop unnecessary offset for accessing video output buffer
Fix: #21021

NDK API AMediaCodec_getOutputBuffer() returns MediaCodecBuffer::data()
which is actually ABuffer::data(). The returned buffer address is already
adjusted by offset.

More info:
    ABuffer::base() returns base address without offset
    ABuffer::data() returns base + offset

Change-Id: I2936339ce4fa9acf657a5a7d92adc1275d7b28a1
2021-11-09 17:23:34 +08:00
Alexander Alekhin
7842181b47 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-05 09:27:46 +00:00
Alexander Alekhin
b3e16c6423 videoio(dshow): eliminate build warnings from MSVC-Clang 2021-11-02 19:22:47 +00:00
MaximMilashchenko
0a71063530
Merge pull request #20942 from MaximMilashchenko:AudioPatch
Audio patch

* fixed microphone, audio position

* fixed docs

* changed AudioOpenCheck
2021-10-26 14:33:53 +00:00
Alexander Alekhin
6a2077cbd8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-23 15:33:31 +00:00
Maksim Shabunin
7febec49b2
Merge pull request #20614 from mshabunin:use-onevpl-load
videoio: use oneVPL load mechanism, encoder bitrate estimation

* videoio: updated oneVPL support - use mfxLoad

* videoio: advanced bitrate estimation for MFX encoder

* videoio: improved MediaSDK/oneVPL/libva detection

* videoio(ffmpeg): don't try oneVPL

* videoio(test): tune checks of videoio_mfx.read_write_raw tests

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-21 13:56:11 +00:00
MaximMilashchenko
f36c268b9e
Merge pull request #19721 from MaximMilashchenko:Audio
add audio support in cap_msmf

* audio msmf

* fixed warnings

* minor fix

* fixed SampleTime MSMF

* minor fix, fixed audio test, retrieveAudioFrame

* fixed warnings

* impelemented sync audio and video stream with start offset

* fixed error

* fixed docs

* fixed audio sample

* CAP_PROP_AUDIO_POS, minor fixed

* fixed warnings

* videoio(MSMF): update audio test checks, add debug logging

* fixed

* fixed desynchronization of time positions, warnings

* fixed warnings

* videoio(audio): tune tests checks

* videoio(audio): update properties description

* build warnings

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-20 16:18:24 +03:00
Michel Promonet
9a9e457dd6 Allow to set av_log_set_level to reduce ffmpeg level below AV_LOG_ERROR 2021-10-19 10:46:41 +02:00
Alexander Alekhin
39ee5c5a46 plugins: reverse candidates order to fetch higher versions first 2021-10-08 20:34:07 +00:00
Alexander Alekhin
cca4c47781 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-08 11:05:45 +00:00
Jonas Vautherin
9537a909f7
Merge pull request #20801 from JonasVautherin:fix-gst-error-handling
* Fix gst error handling

* Use the return value instead of the error, which gives no guarantee of being NULL in case of error
* Test err pointer before accessing it
* Remove unreachable code

* videoio(gstreamer): restore check in writer code

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-08 02:07:04 +00:00
Alexander Alekhin
c49cfefe88 videoio: fix plugins handling if no filesystem available 2021-10-06 17:29:00 +00:00
Alexander Alekhin
37c3f0d8a0 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-02 17:57:18 +00:00
Jonas Vautherin
de5b6386e0 Fix gst_initializer
Use the return value of gst_init_check instead of testing the error pointer
2021-10-02 15:42:13 +00:00
fortemSteve
c7e0888982
Merge pull request #20591 from fortemSteve:ffmpeg_get_stream_open_time
Add CAP_PROP_STREAM_OPEN_TIME

* Added CAP_PROP_STREAM_OPEN_TIME to videoio module - can be used to query the time at which the stream was opened, in seconds since Jan 1 1970 (midnight, UTC). Useful for RTSP and other live video where absolute timestamps are needed. Only applicable to ffmpeg backends

* use nanoseconds instead of seconds to mark the stream open time, and change the cap prop name to CAP_PROP_STREAM_OPEN_TIME_NSEC

* use microseconds for CAP_PROP_STREAM_OPEN_TIME (nanoseconds rolls over too soon, and milliseconds/seconds requires a division)

* fix whitespace issue
2021-09-09 21:23:49 +00:00
Nicolai Behmann
fdaa6ff9e3
Merge pull request #20475 from nibeh:patch-1
* Added exposure and gain props, maximized pixel clk

* removed pixel clock maximization

pixel clock maximization is not suitable for all use cases, so I removed it from PR.
2021-08-24 12:31:54 +03:00
zyp
8dcec034ed
Merge pull request #18694 from zyp:gstreamer_gray16
* videoio/gstreamer: Add support for GRAY16_LE.

* videoio/gstreamer: added BGRA/BGRx support

Co-authored-by: Maksim Shabunin <maksim.shabunin@gmail.com>
2021-08-16 16:20:10 +00:00
Iyad Ahmed
917cd13ce2
Merge pull request #20549 from iyadahmed:video_capture_timeout_set_get
* VideoCapture add open/read timeout params to FFMPEG backend

* Fix wrong enum name

* Fix wrong enum name
2021-08-13 23:12:05 +03:00
Iyad Ahmed
4300bb2e1f
Merge pull request #20541 from iyadahmed:video_capture_timeout_prop
* VideoCapture timeout set/get

* Common formatting for enum values

* Fix enum values wrongly in videoio.hpp

* Define timeout enum values in public api and align with master
2021-08-12 19:51:02 +03:00
Saikat Nanda
21d0f40751 Fix YUV indexes + YUV Planner detection condition 2021-08-09 21:41:00 -04:00
Alexander Alekhin
4ff76cad2a cmake: fix cross-compilation problems
- unexpected pkg-config module (we should not use host binary)
- bump cmake_minimum_required to 3.5 in toolchain files
2021-08-05 11:42:58 +00:00
Alexander Alekhin
4015a5486c cmake: process modules in the same CMake scope 2021-07-22 15:22:42 +00:00
Alexander Alekhin
9e42e04b4a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-10 13:01:03 +00:00
kikaxa
926535469d
fix videoio/src/container_avi.cpp VideoInputStream alignment 2021-07-07 18:31:53 +03:00
Rafael H Tibães
bf489feef1
Merge pull request #20327 from tibaes:MSMF-Slow-Webcam-Startup
* fixes MSMF slow webcam startup

* add variable to change MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS at runtime
2021-06-30 22:08:24 +00:00
Alexander Alekhin
ba98cd97e5 videoio(test): skip AV1 HW tests
- FFMPEG: "[av1 @ 0000027ac07d1340] Your platform doesn't suppport hardware accelerated AV1 decoding."
2021-06-08 17:25:09 +00:00
Alexander Alekhin
1b5fe91624 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-08 05:04:57 +00:00