# UniTAP.dev.ports.modules.capturer.video.video_capturer

class VideoCapturer:

Class `VideoCapturer` allows working with capturing video frames on Sink (RX - receiver) side. You can `start` capturing in several modes, `stop` capturing, getting current `status` and result of capturing `capture_result`.

VideoCapturer( capturer: UniTAP.dev.modules.capturer.capture.Capturer, max_stream_number: int)
status: UniTAP.dev.modules.capturer.statuses.VideoCaptureStatus

Returns current video capturer status.

###### Returns:

> object of `VideoCaptureStatus` type

capture_result: UniTAP.dev.ports.modules.capturer.video.result_video.ResultVideoObject

Returns result of video capturing.

###### Returns:

> object of `ResultVideoObject` type

max_stream_number: int

Returns max stream number supported for capturing.

###### Returns:

> object of `int` type

def stop(self):

Stop capture video.

def pop_element( self) -> Union[ UniTAP.common.video_frame.VideoFrame , UniTAP.common.dsc_video_frame.VideoFrameDSC ]:

Return first object of `VideoFrame` or `VideoFrameDSC`.

###### Returns:

> object of `VideoFrame` or `VideoFrameDSC` type

def pop_element_as_result_object( self) -> UniTAP.dev.ports.modules.capturer.video.result_video.ResultVideoObject:

Return captured video frame(objects of `VideoFrame` or VideoFrameDSC`) as`ResultVideoObject`.

###### Returns:

> object of `ResultVideoObject` type

def pop_all_elements( self) -> Union[List[ UniTAP.common.video_frame.VideoFrame ], List[ UniTAP.common.dsc_video_frame.VideoFrameDSC ]]:

Return all captured video frames(objects of `VideoFrame` or `VideoFrameDSC`).

###### Returns:

> object of list[`VideoFrame` or `VideoFrameDSC`] type

def get_crc(self, crc_frame_count: int = 1) -> List[tuple[int, int, int]]:

Returns captured crc values.

###### Returns:

> list[tuple[int, int, int]]

class VideoCapturerDP(VideoCapturer):

Class `VideoCapturerDP` inherited from class `VideoCapturer` and also allows working with capturing video frames on DP Sink (RX - receiver) side. You can `start` capturing in several modes, `stop` capturing, getting current `status` and result of capturing `capture_result`.

VideoCapturerDP( capturer: UniTAP.dev.modules.capturer.capture.Capturer, max_stream_number: int)
def start( self, frames_count: int = 0, sec: int = 0, stream_number: int = 0, capture_type: UniTAP.dev.modules.capturer.capture.CaptureConfig.Type = <Type.LIVE: 0>):

Start capturing. Possible some variants of capturing:

- Capture with fixed frames count (will be captured fixed frames count and capturing will be stopped).
- Capture with fixed time (capturing will be continued fixed seconds and capturing will be stopped).
- Capture without parameters - Live capturing (for getting frames you need to use functions `pop_element` and `pop_all_elements`)

All results can be obtained using the function `capture_result`.

###### Arguments:

- frames_count (int)
- sec (int)
- stream_number (int)
- capture_type (CaptureConfig.Type)

def get_buffer_capacity(self, stream_number: int = 0):

##### Inherited Members

VideoCapturer
  status
  capture_result
  max_stream_number
  stop
  pop_element
  pop_element_as_result_object
  pop_all_elements
  get_crc

class VideoCapturerHDMI(VideoCapturer):

Class `VideoCapturerHDMI` inherited from class `VideoCapturer` and also allows working with capturing video frames on HDMI Sink (RX - receiver) side. You can `start` capturing in several modes, `stop` capturing, getting current `status` and result of capturing `capture_result`.

VideoCapturerHDMI( capturer: UniTAP.dev.modules.capturer.capture.Capturer, max_stream_number: int)
def start(self, frames_count: int = 0, sec: int = 0, stream_number: int = 0):

Start capturing. Possible some variants of capturing:

- Capture with fixed frames count (will be captured fixed frames count and capturing will be stopped).
- Capture with fixed time (capturing will be continued fixed seconds and capturing will be stopped).
- Capture without parameters - Live capturing (for getting frames you need to use functions `pop_element` and `pop_all_elements`)

All results can be obtained using the function `capture_result`.

###### Arguments:

- frames_count (int)
- sec (int)
- stream_number (int)

def get_buffer_capacity(self):

##### Inherited Members

VideoCapturer
  status
  capture_result
  max_stream_number
  stop
  pop_element
  pop_element_as_result_object
  pop_all_elements
  get_crc