Skip to content

[G-API] GStreamingBackend hotfix#19107

Merged
alalek merged 4 commits intoopencv:masterfrom
TolyaTalamanov:at/hotfix-gstreamingbackend
Dec 15, 2020
Merged

[G-API] GStreamingBackend hotfix#19107
alalek merged 4 commits intoopencv:masterfrom
TolyaTalamanov:at/hotfix-gstreamingbackend

Conversation

@TolyaTalamanov
Copy link
Copy Markdown
Contributor

@TolyaTalamanov TolyaTalamanov commented Dec 14, 2020

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
Xforce_builders_only=linux,docs
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

build_image:Custom=ubuntu-openvino-2021.1.0:20.04
build_image:Custom Win=openvino-2021.1.0
build_image:Custom Mac=openvino-2021.1.0

test_modules:Custom=gapi
test_modules:Custom Win=gapi
test_modules:Custom Mac=gapi

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

Overview

  • cv::gapi::streaming::backend() moved to gstreamingkernel.hpp
  • Added cv::GCompileArgs to Actor ctor
  • Exported cv::gapi::streaming::kernels & cv::gapi::streaming::backend
  • RMatMediaBGRAdapter moved to common/gbackend.hpp

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@smirnov-alexey

@smirnov-alexey
Copy link
Copy Markdown
Contributor

@TolyaTalamanov please, change OV images to 2021.01

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Do not place non-template code into public headers.
Move it into .cpp files.


struct RMatMediaBGRAdapter final: public cv::RMat::Adapter
{
RMatMediaBGRAdapter(cv::MediaFrame frame) : m_frame(frame) { };
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

const reference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That class is reference-counted anyway, but yes it may make sense.

I'd say this constructor must be explicit too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

struct Data;
struct RcDesc;

struct RMatMediaBGRAdapter final: public cv::RMat::Adapter
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

-RMatMediaBGRAdapter
+RMatMediaAdapterBGR

?

to avoid "BGRA" misread (and 3 channels below)

Also should avoid RMatMediaBGRAAdapter case.

/cc @dmatveev

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RMatMediaAdapterBGR +1

Also, should this class be EXPORT-ed if (I believe) it should be used in other G-API modules?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

"Approved with comments"

struct Data;
struct RcDesc;

struct RMatMediaBGRAdapter final: public cv::RMat::Adapter
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RMatMediaAdapterBGR +1

Also, should this class be EXPORT-ed if (I believe) it should be used in other G-API modules?


struct RMatMediaBGRAdapter final: public cv::RMat::Adapter
{
RMatMediaBGRAdapter(cv::MediaFrame frame) : m_frame(frame) { };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That class is reference-counted anyway, but yes it may make sense.

I'd say this constructor must be explicit too.

Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

Alert: while(true) is NOT required for asynchronous backends -- it will stuck with a regular GExecutor, and the GStreamingExecutor organizes a loop by itself

@dmatveev dmatveev self-assigned this Dec 15, 2020
@dmatveev dmatveev added this to the 4.5.1 milestone Dec 15, 2020
Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

Oh I see you have this fixed

@dmatveev
Copy link
Copy Markdown
Contributor

Approved, I believe can be merged now. Thanks!

@alalek alalek merged commit 50baf76 into opencv:master Dec 15, 2020
@alalek alalek mentioned this pull request Apr 9, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…ingbackend

[G-API] GStreamingBackend hotfix

* GStreamingBackend hotfix

* Fix comments to review

* Add strides

* Removew while loop inside actor
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.

4 participants