G-API: oneVPL - Implement simple MFP demux provider with auto provider selector#20926
G-API: oneVPL - Implement simple MFP demux provider with auto provider selector#20926sivanov-work wants to merge 15 commits intoopencv:4.xfrom
Conversation
| #ifdef HAVE_ONEVPL | ||
| #ifdef _WIN32 | ||
| #define NOMINMAX | ||
| #include <atlbase.h> |
| TEST(OneVPL_Source_MFP, decode_header) | ||
| { | ||
| using namespace cv::gapi::wip::onevpl; | ||
| MFPDemuxDataProvider provider("C:\\Users\\sivanov\\github\\opencv_extra\\testdata\\highgui\\video\\sample_322x242_15frames.yuv420p.libx264.mp4"); |
There was a problem hiding this comment.
use checking for EXTRA availability
ec36abb to
89e3dae
Compare
| std::string reason; | ||
| }; | ||
|
|
||
| struct GAPI_EXPORTS DataProviderUnsupportedException : public DataProviderException { |
There was a problem hiding this comment.
Why do we need custom exception type?
There was a problem hiding this comment.
to catch & process provider-related error.
Current implementations of DataProviderDispatcher uses exception catching to select relevant provider impl: raw or demux
| AV1, | ||
| JPEG, | ||
|
|
||
| UNCOMPRESSED = std::numeric_limits<uint16_t>::max() |
There was a problem hiding this comment.
Seems to me I don't get an idea of that
There was a problem hiding this comment.
enum class may be ABI unstable by adding another one enum item. so it chosen large enough and UNCOMPRESSES initialized as max value of underlyied type (uint16_t).
P.S. It is used for base value initializer for codecId member
P.P.S. Maybe it is more clear to rename it to LAST_VALUE or something like @TolyaTalamanov what do you think?
|
|
||
| static const char *to_cstr(CodecID codec); | ||
|
|
||
| virtual ~IDataProvider() {}; |
4fe2adb to
21b9703
Compare
|
Closed because new Async Version of Demultiplexer was implemented in #21022 |
Implement new media source provider by using Microsoft Media Foundation which carry out video stream demultiplexing.
IDataProvider updated and it responsible for getting CodecID based on its owning source data
Implemented DataProviderDispatcher which try on specific provider for oneVPL source based on cfg params and file format
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Build Configuration