mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #20151 from smirnov-alexey:as/extend_media_frame
G-API: Extend MediaFrame to be able to extract additional info besides access * Extend MediaFrame to be able to extract additional info besides access * Add default implementation for blobParams() * Add comment on the default blobParams()
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <utility> // forward<>()
|
||||
|
||||
#include <opencv2/gapi/gframe.hpp>
|
||||
#include <opencv2/gapi/util/any.hpp>
|
||||
|
||||
namespace cv {
|
||||
|
||||
@@ -30,6 +31,10 @@ public:
|
||||
View access(Access) const;
|
||||
cv::GFrameDesc desc() const;
|
||||
|
||||
// FIXME: design a better solution
|
||||
// Should be used only if the actual adapter provides implementation
|
||||
cv::util::any blobParams() const;
|
||||
|
||||
// Cast underlying MediaFrame adapter to the particular adapter type,
|
||||
// return nullptr if underlying type is different
|
||||
template<typename T> T* get() const
|
||||
@@ -78,6 +83,9 @@ public:
|
||||
virtual ~IAdapter() = 0;
|
||||
virtual cv::GFrameDesc meta() const = 0;
|
||||
virtual MediaFrame::View access(MediaFrame::Access) = 0;
|
||||
// FIXME: design a better solution
|
||||
// The default implementation does nothing
|
||||
virtual cv::util::any blobParams() const;
|
||||
};
|
||||
|
||||
} //namespace cv
|
||||
|
||||
Reference in New Issue
Block a user