opencv/modules
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
..
calib3d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-23 15:33:31 +00:00
core Merge pull request #21081 from alalek:issue_17261 2021-11-18 18:23:00 +00:00
dnn Merge pull request #20406 from MarkGHX:gsoc_2021_webnn 2021-11-23 21:15:31 +00:00
features2d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-30 14:26:17 +00:00
flann Improves FLANN's heap allocations by a memory pool 2021-08-11 17:34:15 +09:00
gapi Merge pull request #21022 from sivanov-work:async_mfp_demux 2021-11-22 14:53:38 +03:00
highgui highgui(win32): fix trackbar setRange 2021-11-06 15:19:22 +00:00
imgcodecs Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
imgproc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
java android: drop sourceCompatibility/targetCompatibility options 2021-10-06 16:49:02 +00:00
js Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
ml Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-08-14 18:24:00 +00:00
objc cmake: fix tracking detail headers 2021-04-01 12:21:18 +00:00
objdetect Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
photo Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
python python: properly handle step for multichannel case 2021-10-29 18:29:19 +00:00
stitching Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-01 09:44:24 +00:00
ts Merge pull request #20847 from alalek:fix_build_js_simd_tests 2021-10-09 05:59:24 +00:00
video Update perf_bgfg_mog2.cpp, perf_bgfg_knn.cpp 2021-09-29 14:57:13 +00:00
videoio Merge pull request #20978 from cudawarped:videocapture_read_raw_enchancement 2021-11-23 21:18:55 +00:00
world vtk 9.0 autoinit fix 2021-05-18 10:20:54 +03:00