Open dkurt opened 1 month ago
Discussed on OpenCV weekly sync about potential improvements:
std::vector
but allow user pass just pointer/buffer_size.We have something similar in cudacodec module:
RawVideoSource
object is an iterator over encoded data stream (https://github.com/opencv/opencv_contrib/blob/b236c71c2f8d983403c35a0cea8bec0432a4b0fe/modules/cudacodec/include/opencv2/cudacodec.hpp#L508-L555) and can be used to construct VideoReader
(https://github.com/opencv/opencv_contrib/blob/b236c71c2f8d983403c35a0cea8bec0432a4b0fe/modules/cudacodec/include/opencv2/cudacodec.hpp#L604).
Following example in the test decodes key frames (if I understand corretly): https://github.com/opencv/opencv_contrib/blob/b236c71c2f8d983403c35a0cea8bec0432a4b0fe/modules/cudacodec/test/test_video.cpp#L178-L209
Pull Request Readiness Checklist
Suppoted backends:
resolves https://github.com/opencv/opencv/issues/24400
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request