Video utilities
cv2PySide6.videoutil provides utility classes for running the video.
- class cv2PySide6.videoutil.ClickableSlider(*args: Any, **kwargs: Any)[source]
Bases:
QSliderQSliderwhose groove can be clicked to move to position.
- class cv2PySide6.videoutil.MediaController(*args: Any, **kwargs: Any)[source]
Bases:
QWidgetWidget to control
QMediaPlayer.This controller can change the playback state and media position by
playButton(),stopButton(), andslider().setPlayer()sets the player to be controlled by this widget.- slider() ClickableSlider[source]
Slider to change the media position.
- player() Optional[PySide6.QtMultimedia.QMediaPlayer][source]
Media player which is controlled by self.
- onSliderPress()
If the media was playing, pause and move to the pressed position.
- onSliderRelease()
If the media was paused by slider press, play the media.
- setPlayer(player: Optional[PySide6.QtMultimedia.QMediaPlayer])[source]
Set
player()and connect the signals.
- connectPlayer(player: PySide6.QtMultimedia.QMediaPlayer)[source]
Connect signals and slots with player.
- disconnectPlayer(player: PySide6.QtMultimedia.QMediaPlayer)[source]
Disconnect signals and slots with player.
- onPlaybackStateChange(state: PySide6.QtMultimedia.QMediaPlayer.PlaybackState)
Switch the play icon and pause icon by state.