mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 21:20:18 +08:00
97c6ec6d49
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. |
||
---|---|---|
.. | ||
test_audio.cpp | ||
test_camera.cpp | ||
test_container_avi.cpp | ||
test_dynamic.cpp | ||
test_ffmpeg.cpp | ||
test_gstreamer.cpp | ||
test_main.cpp | ||
test_mfx.cpp | ||
test_microphone.cpp | ||
test_plugins.cpp | ||
test_precomp.hpp | ||
test_video_io.cpp |