| OpenCV 4.3.0 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:

## 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
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 | ) |
| inline explicit

## ◆ GCaptureSource() [2/2]

cv::gapi::wip::GCaptureSource::GCaptureSource | ( | const std::string & | path | ) |
| inline explicit

## Member Function Documentation

## ◆ descr_of()

virtual GMetaArg cv::gapi::wip::GCaptureSource::descr_of | ( |  | ) | const
| inline override protected virtual

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

## ◆ prep()

void cv::gapi::wip::GCaptureSource::prep | ( |  | ) |
| inline protected

## ◆ pull()

virtual bool cv::gapi::wip::GCaptureSource::pull | ( | cv::gapi::wip::Data & | data | ) |
| inline override protected virtual

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

## Member Data Documentation

## ◆ cap

cv::VideoCapture cv::gapi::wip::GCaptureSource::cap
| 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:

- opencv2/gapi/streaming/cap.hpp