OpenCV  4.7.0-dev
Open Source Computer Vision
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>

Inheritance diagram for cv::gapi::wip::GCaptureSource:
cv::gapi::wip::IStreamSource

Public Member Functions

 GCaptureSource (int id)
 
 GCaptureSource (const std::string &path)
 
- Public Member Functions inherited from cv::gapi::wip::IStreamSource
virtual ~IStreamSource ()=default
 
Ptr ptr ()
 

Protected Member Functions

virtual GMetaArg descr_of () const override
 
void prep ()
 
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)
inlineexplicit

◆ GCaptureSource() [2/2]

cv::gapi::wip::GCaptureSource::GCaptureSource ( const std::string &  path)
inlineexplicit

Member Function Documentation

◆ descr_of()

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

◆ prep()

void cv::gapi::wip::GCaptureSource::prep ( )
inlineprotected

◆ pull()

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

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: