OpenCV  4.10.0
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::gapi::wip::GCaptureSource Class Reference

OpenCV's VideoCapture-based streaming source. More...

#include <opencv2/gapi/streaming/cap.hpp>

Collaboration diagram for cv::gapi::wip::GCaptureSource:

Public Member Functions

 GCaptureSource (const std::string &path, const std::map< int, double > &properties={})
 
 GCaptureSource (int id, const std::map< int, double > &properties={})
 
void set (int propid, double value)
 
- Public Member Functions inherited from cv::gapi::wip::IStreamSource
virtual ~IStreamSource ()=default
 
virtual void halt ()
 
Ptr ptr ()
 

Protected Member Functions

virtual GMetaArg descr_of () const override
 
void prep (const std::map< int, double > &properties)
 
virtual bool pull (cv::gapi::wip::Data &data) override
 

Protected Attributes

cv::VideoCapture cap
 
int64_t counter = 0
 
cv::Mat first
 
bool first_pulled = false
 

Additional Inherited Members

- Public Types inherited from cv::gapi::wip::IStreamSource
using Ptr = std::shared_ptr< IStreamSource >
 

Detailed Description

OpenCV's VideoCapture-based streaming source.

This class implements IStreamSource interface. Its constructor takes the same parameters as cv::VideoCapture does.

Please make sure that videoio OpenCV module is available before using this in your application (G-API doesn't depend on it directly).

Note
stream sources are passed to G-API via shared pointers, so please gapi::make_src<> to create objects and ptr() to pass a GCaptureSource to cv::gin().

Constructor & Destructor Documentation

◆ GCaptureSource() [1/2]

cv::gapi::wip::GCaptureSource::GCaptureSource ( int  id,
const std::map< int, double > &  properties = {} 
)
inlineexplicit

◆ GCaptureSource() [2/2]

cv::gapi::wip::GCaptureSource::GCaptureSource ( const std::string &  path,
const std::map< int, double > &  properties = {} 
)
inlineexplicit

Member Function Documentation

◆ descr_of()

virtual GMetaArg cv::gapi::wip::GCaptureSource::descr_of ( ) const
inlineoverrideprotectedvirtual

Implements cv::gapi::wip::IStreamSource.

Here is the call graph for this function:

◆ prep()

void cv::gapi::wip::GCaptureSource::prep ( const std::map< int, double > &  properties)
inlineprotected
Here is the call graph for this function:

◆ pull()

virtual bool cv::gapi::wip::GCaptureSource::pull ( cv::gapi::wip::Data data)
inlineoverrideprotectedvirtual

Implements cv::gapi::wip::IStreamSource.

Here is the call graph for this function:

◆ set()

void cv::gapi::wip::GCaptureSource::set ( int  propid,
double  value 
)
inline
Here is the call graph for this function:

Member Data Documentation

◆ cap

cv::VideoCapture cv::gapi::wip::GCaptureSource::cap
protected

◆ counter

int64_t cv::gapi::wip::GCaptureSource::counter = 0
protected

◆ first

cv::Mat cv::gapi::wip::GCaptureSource::first
protected

◆ first_pulled

bool cv::gapi::wip::GCaptureSource::first_pulled = false
protected

The documentation for this class was generated from the following file: