Skip to content

G-API: oneVPL Implement asynchronous MFP demux data provider #21022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Nov 22, 2021

Conversation

sivanov-work
Copy link
Contributor

@sivanov-work sivanov-work commented Nov 8, 2021

This PR is descendant of sync version:
#20926

the IDataProvider base interface changed: fetch_data was improved from raw memory to mfx bitstream, CodecId is not requried in this case

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Build Configuration

force_builders=Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
build_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

Xbuild_image:Custom=centos:7
Xbuildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

Xbuild_image:Custom=ubuntu-openvino-2021.3.0:20.04
build_image:Custom Win=openvino-2021.2.0
build_image:Custom Mac=openvino-2021.2.0

Xtest_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1
test_opencl:Custom=ON
Xtest_bigdata:Custom=1
Xtest_filter:Custom=*
build_image:Custom=gapi-onevpl-2021.6.0

@sivanov-work sivanov-work changed the base branch from master to 4.x November 8, 2021 13:02
@alalek
Copy link
Member

alalek commented Nov 8, 2021

Please reuse CI instructions from #20926 to enable oneVPL builder configuration

* @return fetched bytes count.
*/
virtual size_t fetch_data(size_t out_data_bytes_size, void* out_data) = 0;

#ifdef HAVE_ONEVPL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that using ifdefs in a public header works. Please, remove the guard and handle it in the sources

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you added #else with assert? I think other reviewers need to check on that


// close reader
provider_state.store(State::Exhausted);
buffer_storage_non_empty_cond.notify_all();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will notify_one work here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had idea to upgrade fetch_bitstream for multithreading version, if required. but not for now.

Is there any drawback for notify all instead of one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think more than one thread should wake in your case, since others will be still blocked if I get it correctly. There is no major difference though. Feel free to resolve this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not want to debug code to find when it get stucked when something changed, semantically close reader means broadcast

GAPI_LOG_WARNING(nullptr, "[" << this << "] " <<
"\"mfxImplDescription.mfxDecoderDescription.decoder.CodecID\" "
"is absent, total param count" << codec_params.size());
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must throw unsupported exception instead of return

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

try {
provider = std::make_shared<MFPAsyncDemuxDataProvider>(file_path);
GAPI_LOG_INFO(nullptr, "MFP data provider created");
} catch (const DataProviderUnsupportedException& ex) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is supposed to throw Unsupported exception at least. Any other kind of exception must be considered as unpredictable error and must be not catched here but deliver to application level (missing file, access rights etc)

if (!is_stream_selected) {
GAPI_LOG_WARNING(nullptr, "[" << this << "] couldn't find video stream with supported params");
// TODO print codec supported list
throw DataProviderUnsupportedException("couldn't find supported video stream");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to print it ultimately

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or video codec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stream is suppose :)
if only audio stream is present in container then it is unsupported stream, not codec


TEST_P(OneVPL_Source_MFPDispatcherTest, open_and_decode_file)
{
if (!initTestDataPathSilent()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be removed as agreement of opecv test implementation

}
using namespace cv::gapi::wip::onevpl;

source_t path = findDataFile(std::get<0>(GetParam()), false);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be always true

Copy link
Contributor

@smirnov-alexey smirnov-alexey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. Please, seek additional reviewers

@sivanov-work sivanov-work removed the request for review from TolyaTalamanov November 15, 2021 09:57
Copy link
Contributor

@AsyaPronina AsyaPronina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of files are only reviewed, will proceed tomorrow

* declare untagged struct mfxBitstream.
*
* IDataProvider makes sense only for HAVE_VPL is ON and to keep IDataProvider
* interface API/ABI compiant between core library and user application layer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiant -> compliant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

*/
virtual size_t fetch_data(size_t out_data_bytes_size, void* out_data) = 0;
virtual bool fetch_bitstream_data(std::shared_ptr<mfx_bitstream> &in_out_bitsream) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is intended to be not copied, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's filled by Microsoft Foundation Primitives implementation there is no clear point: copy or not - it depends.
Anyway, this huge work happens in different thread: MFP async call, but current thread which is caller of fetch_bitstream_data just pulls for cooked up bitstream

@@ -7,10 +7,11 @@
#ifndef GAPI_STREAMING_ONEVPL_ONEVPL_DATA_PROVIDER_INTERFACE_HPP
#define GAPI_STREAMING_ONEVPL_ONEVPL_DATA_PROVIDER_INTERFACE_HPP
#include <exception>
#include <limits>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it used somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was, but no anymore. will be deleted

#else // HAVE_ONEVPL
struct IDataProvider::mfx_bitstream {
mfx_bitstream() {
GAPI_Assert(false && "Reject to create `mfxBitstream` till library compiled without VPL/MFX support");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be to replace till with more common word - because?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

namespace onevpl {

IDataProvider::Ptr DataProviderDispatcher::create(const std::string& file_path,
const std::vector<CfgParam> cfg_params) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const &?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, i missed it


ComPtrGuard<IMFStreamDescriptor> stream_descriptor =
createCOMPtrGuard(stream_descriptor_tmp);
is_stream_selected = false; // deselect until find supported stream found
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find is extra here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

" - " << is_codec_supported)
} else {
GAPI_LOG_WARNING(nullptr, "[" << this << "] " <<
"Cannot media GUID subtype for stream by index: " <<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot get ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank

if (!is_stream_selected) {
GAPI_LOG_WARNING(nullptr, "[" << this << "] couldn't find video stream with supported params");
// TODO print codec supported list
throw DataProviderUnsupportedException("couldn't find supported video stream");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or video codec?

hr = MFCreateSourceReaderFromMediaSource(source.get(), attributes.get(),
&source_reader_tmp);
if (FAILED(hr)) {
throw DataProviderSystemErrorException(HRESULT_CODE(hr), "Cannot create MFCreateSourceReaderFromMediaSource");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Cannot create MFCreateSourceReaderFromMediaSource" -> "Cannot create IMFSourceReader"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

// Ask for the first sample.
request_next(hr, 0, 0);
} else {
throw DataProviderSystemErrorException(HRESULT_CODE(hr), "Cannot ReadSample");
Copy link
Contributor

@AsyaPronina AsyaPronina Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Cannot ReadSample"" or something which is already handled on the 457 line?

if (FAILED(hr)) {
        throw DataProviderSystemErrorException(HRESULT_CODE(hr), "Cannot create MFCreateSourceReaderFromMediaSource");

This is confusing. How can we reach this else statement at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, thanks

@sivanov-work
Copy link
Contributor Author

UTs failed on CI, waiting #20995 to be merged

@dmatveev dmatveev self-assigned this Nov 18, 2021
@dmatveev dmatveev added this to the 4.5.5 milestone Nov 18, 2021
@@ -29,6 +29,23 @@ struct GAPI_EXPORTS DataProviderSystemErrorException : public DataProviderExcept
std::string reason;
};

struct GAPI_EXPORTS DataProviderUnsupportedException : public DataProviderException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know at the moment, maybe

virtual const char* what() const noexcept override;

private:
std::string reason;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should reason be part of DataProviderException?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two commenters ask the same: then ok will move it to base

GAPI_Assert(false && "Reject to create `mfxBitstream` because library compiled without VPL/MFX support");
}
};
#endif // HAVE_ONEVPL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the whole file body be under one big #ifdef?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe not, because mfxBitsream is VPL specific type and should not be exposed in public headers
so for NO_VPL configuration we have to have stub

Otherwise, it would have namespace-open-close too much

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way which I considered before - it move all IDataProvider interface declaration & definition into lib private scope. but want to preserve customization from public scope in data provider implementaiton

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In NO_VPL this whole streaming/onevpl directory is excluded isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually no - it activates some stub-like public classed which throws assert on using
here is just wrapper on VPL bitstream which figured as public interface item


// Look-up CodecId from input params
// If set then raw data provider is preferred
GAPI_LOG_DEBUG(nullptr, "try find explicit cfg param\"mfxImplDescription.mfxDecoderDescription.decoder.CodecID\"");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this sting be defined only once somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (FAILED(hr)) {
GAPI_LOG_WARNING(nullptr, "Cannot create MF_RESOLUTION_MEDIASOURCE from URI: " <<
url << ". Abort");
pSourceResolver->Release();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any RAII available here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks it was preserved from prototype version

if (!out_bitstream) {
out_bitstream = std::make_shared<mfx_bitstream>();
out_bitstream->MaxLength = bitstream_data_size;
out_bitstream->Data = (mfxU8 *)calloc(out_bitstream->MaxLength, sizeof(mfxU8));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if mxf_bitstream structure is yours, I'd avoid unnecessary allocations outside of it

If it is not, I'd find a way to associate an automatic buffer with a wrapper over this structure and set Data to that buffer pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second option:
it allocates at once for whole source, effort is more that profit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allocating it once for the whole source changes the overall allocation model, what I ask for above is just making what's now automatic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that it would be quite worth for regular usage, but otherwise it doesn't use any pre-allocation in case of async demux, because it uses mapping from MFP buffers, so byte-receiving constructor would be useless for this case.
From my perspective, implementing smart-class mxf_bitstream for both cases looks redundant at the moment and should be done by demand when it would be used more than in 1-2 places

Comment on lines +75 to +76
throw std::runtime_error("Cannot allocate bitstream.Data bytes: " +
std::to_string(out_bitstream->MaxLength * sizeof(mfxU8)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..so using new could save you from extra handling like this

Comment on lines +108 to +109
GAPI_LOG_DEBUG(nullptr, "bitstream after fetch, DataOffset: " << out_bitstream->DataOffset <<
", DataLength: " << out_bitstream->DataLength);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need that extensive debug logging here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i used it to find no fully drained data problem and unconsumed bytes
In release is no Debug anyway isn't? moreover if(level==Debug) is nothing with syscall fread time

source_handle(nullptr, &fclose),
codec(std::numeric_limits<mfx_codec_id_type>::max()),
bitstream_data_size(bitstream_data_size_value) {
GAPI_Assert(false && "Unsupported: G-API compiled without `WITH_GAPI_ONEVPL=ON`");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact it is OpenCV compiled, maybe we should fix this message text elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it make sense. Will rename it when WITH_GAPI_ONEVPL tnasfrormed into WITH_MFX due to custom builders turning on

Comment on lines +155 to +174
const char* mfx_codec_id_to_cstr(mfxU32 mfx_id) {
switch(mfx_id) {
case MFX_CODEC_AVC:
return "MFX_CODEC_AVC";
case MFX_CODEC_HEVC:
return "MFX_CODEC_HEVC";
case MFX_CODEC_MPEG2:
return "MFX_CODEC_MPEG2";
case MFX_CODEC_VC1:
return "MFX_CODEC_VC1";
case MFX_CODEC_VP9:
return "MFX_CODEC_VP9";
case MFX_CODEC_AV1:
return "MFX_CODEC_AV1";
case MFX_CODEC_JPEG:
return "MFX_CODEC_JPEG";
default:
return "<unsupported>";
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple define cuts this code in half

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's waiting for DX11 PR...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

worker_key_to_buffer_mapping_storage.clear();
}

GAPI_LOG_INFO(nullptr, "Clean didn't used up storage, count: " <<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Clean didn't used up storage, count: " -> "Clean up didn't used storage, count: " ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use up -> phrasal vers -> drain to empty

Ok, let's make it quite simple:
Clean data storage, elapsed count:

// Get the video frame buffer from the sample.
IMFMediaBuffer *buffer_ptr = nullptr;
hr = sample_ptr->ConvertToContiguousBuffer(&buffer_ptr);
if (FAILED(hr)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is extra

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

IMFMediaBuffer *buffer_ptr = nullptr;
hr = sample_ptr->ConvertToContiguousBuffer(&buffer_ptr);
if (FAILED(hr)) {
GAPI_Assert(SUCCEEDED(hr) && "MFPAsyncDemuxDataProvider::OnReadSample");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you just may write GAPI_Assert(false && ...)
Message shouldn't contain a lot of details, am I right?


hr = buffer_ptr->Lock(&staging_stream->Data, &max_buffer_size, &curr_size);
if (FAILED(hr)) {
GAPI_Assert(SUCCEEDED(hr) && "MFPAsyncDemuxDataProvider::OnReadSample");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You used SUCCEEDED(hr) just for double-check?
Thing that the message is the same as in error above is intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like copy-paste. thanks

"iteration: " << iterations);
} else {
GAPI_LOG_DEBUG(nullptr, "[" << this << "] is waiting for flush finishing, "
"iteration: " << iterations);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

@@ -17,13 +21,18 @@ namespace onevpl {
struct FileDataProvider : public IDataProvider {

using file_ptr = std::unique_ptr<FILE, decltype(&fclose)>;
FileDataProvider(const std::string& file_path);
FileDataProvider(const std::string& file_path,
const std::vector<CfgParam> codec_params = {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::vector<CfgParam>&

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@@ -61,10 +62,15 @@ mfxResourceType cstr_to_mfx_resource_type(const char* cstr);

mfxU32 cstr_to_mfx_codec_id(const char* cstr);

const char* mfx_codec_id_to_cstr(mfxU32 mfx_id);

const std::set<mfxU32> &get_supported_mfx_codec_id();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write get_supported_mfx_codec_ids, but it is up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

}

EXPECT_TRUE(dd_result);
EXPECT_TRUE(std::dynamic_pointer_cast<MFPAsyncDemuxDataProvider>(provider_ptr));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be != nullptr?

size_t total_produced_count = 0;
for (size_t i = 0; i < produce_buffer_count; i ++) {
std::shared_ptr<IDataProvider::mfx_bitstream> dummy_stream =
std::make_shared<IDataProvider::mfx_bitstream>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

}

class OneVPL_Source_MFPAsyncDispatcherTest : public ::testing::TestWithParam<array_element_t> {};
TEST_P(OneVPL_Source_MFPAsyncDispatcherTest, open_and_decode_file)
Copy link
Contributor

@AsyaPronina AsyaPronina Nov 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand differences with the first OneVPL_Source_MFPDispatcherTest :(
Could you please help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retained from prev version for sync demux

@sivanov-work
Copy link
Contributor Author

@alalek could you merge it please?
one more PR (#21049) and then I'll try WITH_MFX=ON with further integration PR

@alalek alalek merged commit 02f0887 into opencv:4.x Nov 22, 2021
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
@sivanov-work sivanov-work deleted the async_mfp_demux branch March 5, 2022 05:48
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
G-API: oneVPL Implement asynchronous MFP demux data provider

* Add dummy dmux

* Initial commit for draft versionn

* Demux for low res file works

* Add media source resolver to work over incorrect MIME

* Add MFP Demux logger

* stash changes

* Extend IDataProvider with CodecId, Add troubleshooting info

* Add IDapaProvider dispatcher

* Add ComPtrGuard wrappers

* Add new unit test scope for MFP demux & Add minor changes

* Enhance UTs

* Remove ATL header

* Remove ATL another one

* Fix build

* Add static for some methods

* Initial commit

* Add async demuxing

* Apply tdd idea

* Intro IDataProvider changes: +fetch_bitstream, -fetch_data

* Fix UTs

* Remove IDataProvider::CodecId & Fix EOF hang

* Remove sync demux

* Remove mfp async dependencies

* Remove VPL dependencies from IDataProvider declaration

* Apply comments

* Fix compilation

* Suppress unused warning

* Apply some comments

* Apply some comments

* Apply comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants