opencv/modules/videoio/test
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
..
test_audio.cpp Merge pull request #20942 from MaximMilashchenko:AudioPatch 2021-10-26 14:33:53 +00:00
test_camera.cpp Merge pull request #19370 from OlivierLDff:patch-dshow-convertrgb 2021-01-29 10:18:09 +00:00
test_container_avi.cpp Framework for dynamic videoio backends, FFmpeg and GStreamer plugins 2019-02-26 13:50:30 +03:00
test_dynamic.cpp Merge pull request #14156 from mshabunin:videowriter-bad-test 2019-03-29 17:52:22 +03:00
test_ffmpeg.cpp Merge pull request #20978 from cudawarped:videocapture_read_raw_enchancement 2021-11-23 21:18:55 +00:00
test_gstreamer.cpp Merge pull request #18694 from zyp:gstreamer_gray16 2021-08-16 16:20:10 +00:00
test_main.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-17 21:05:34 +00:00
test_mfx.cpp Merge pull request #20614 from mshabunin:use-onevpl-load 2021-10-21 13:56:11 +00:00
test_microphone.cpp Merge pull request #19721 from MaximMilashchenko:Audio 2021-10-20 16:18:24 +03:00
test_plugins.cpp videoio(plugin): add query API for plugins 2021-04-19 14:25:45 +00:00
test_precomp.hpp Merge pull request #19460 from mikhail-nikolskiy:videoio-hw 2021-03-01 15:51:04 +00:00
test_video_io.cpp videoio(test): skip AV1 HW tests 2021-06-08 17:25:09 +00:00