Conversation
11fd3c3 to
4d51027
Compare
|
Not the best reviewer here too. Please ping me when it is ready. |
d22d8e0 to
fdfa6f8
Compare
|
@dkurt Could you take a look, please ? |
fdfa6f8 to
86f031d
Compare
| // extracted from that arguments | ||
| GMetaArg GAPI_EXPORTS descr_of(const GRunArg &arg ); | ||
| GMetaArgs GAPI_EXPORTS descr_of(const GRunArgs &args); | ||
| GMetaArgs GAPI_EXPORTS_W descr_of(const GRunArgs &args); |
There was a problem hiding this comment.
What is about the function above?
Bindings doesn't support overloads properly. Sometimes new names for overloads wrapping are required.
There was a problem hiding this comment.
I think only one overload should be in python in nearest future
| * @sa GCompiled | ||
| */ | ||
| class GAPI_EXPORTS GStreamingCompiled | ||
| class GAPI_EXPORTS_W_SIMPLE GStreamingCompiled |
There was a problem hiding this comment.
GAPI_EXPORTS_W_SIMPLE is for simple key/value maps only (CV_PROP/CV_PROP_RW only).
It passes/handles arguments "by value".
Normal EXPORTS_W uses smart pointers for that and handles arguments "by reference". It should be used by default for classes.
IMHO, It is misused almost everywhere in gapi module.
There was a problem hiding this comment.
I see, but if this object is returned from function which also wrapped, it should be SIMPLE
Net - https://github.com/opencv/opencv/blob/master/modules/dnn/include/opencv2/dnn/dnn.hpp#L390
function https://github.com/opencv/opencv/blob/master/modules/dnn/include/opencv2/dnn/dnn.hpp#L759
Because for CV_EXPORTS_W wrapper generates code for Ptr<Object> but function return Object by value, so it means in case Object is returned from function need to use CV_EXPORTS_W_SIMPLE, doesn't it ?
It's a reason why in G-API uses GAPI_EXPORTS_W_SIMPLE almost for all classes
There was a problem hiding this comment.
So you are right, need to avoid it for objects which is not pimpl, but in case GCompiledStreaming it works fine. Opened a ticket
|
@alalek Can it be merged ? |
[G-API Wrap streaming * Wrap streaming * Fix build * Add comments * Remove comment * Fix comments to review * Add test for python pull overload
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.
Buildbot configuration