- qtgui
- qtdbus
- qtwidgets
- qtcore
- dtkcore
- qsettingbackend_zh
- dobject_zh
- abstractappender_zh
- abstractstringappender_zh
- dfilewatcher_zh
- outputdebugappender_zh
- dsettingsbackend_zh
- drecentmanager_zh
- ddesktopentry_zh
- consoleappender_zh
- gsettingsbackend_zh
- dsettingsgroup_zh
- dlogmanager_zh
- fileappender_zh
- dsettings_zh
- dfilesystemwatcher_zh
- dfilewatchermanager_zh
- dbasefilewatcher_zh
- dtkgui
- dtkwidget
- dviewitemaction_zh
- dstandarditem_zh
- dfiledialog_zh
- dclipeffectwidget_zh
- danchors_zh
- dgraphicsclipeffect_zh
- dstyle_zh
- dcoloredprogressbar_zh
- dbuttonboxbutton_zh
- dlabel_zh
- dtiplabel_zh
- darrowlinedrawer_zh
- daboutdialog_zh
- dsettingswidgetfactory_zh
- dsearchcombobox_zh
- dcrumbedit_zh
- dcommandlinkbutton_zh
- dsettingsdialog_zh
- dwindowoptionbutton_zh
- dspinner_zh
- dsimplelistview_zh
- dwaterprogress_zh
- dmainwindow_zh
- dhidpihelper_zh
- dslider_zh
- dpasswordedit_zh
- danchorinfo_zh
- dmpriscontrol_zh
- darrowbutton_zh
- dbackgroundgroup_zh
- dcircleprogress_zh
- dwarningbutton_zh
- dwindowclosebutton_zh
- dvideowidget_zh
- dfilechooseredit_zh
- dblureffectwidget_zh
- darrowrectangle_zh
- dsearchedit_zh
- dfloatingmessage_zh
- dswitchlineexpand_zh
- dtabbar_zh
- dlineedit_zh
- danchorsbase_zh
- dstylediconengine_zh
- dwindowmaxbutton_zh
- dpageindicator_zh
- dsuggestbutton_zh
- dapplicationsettings_zh
- dtooltip_zh
- dwindowminbutton_zh
- ddrawer_zh
- dtitlebar_zh
- dsimplelistitem_zh
- dpicturesequenceview_zh
dvideowidget_zh
Class::DVideoWidget
暂无该属性
Detailed Description
DVideoWidget 类提供了呈现视频的小部件 为了给循环播放提供更好的用户体验,视频的最后一帧将会被保留,同时还支持视频垂直或水平翻转, 视频缩放和圆形视频编辑。 将QMediaPlayer添加到 DVideoWidget 中, DVideoWidget 封装了QVideoWidget来提供视频或图像的输出。
Note: 注意: 一次只能将一个QMediaPlayer连接到 DVideoWidget 中。
DVideoWidget *videoWidget = new DVideoWidget(this);
QMediaPlayer *mediaPlayer = new QMediaPlayer(this);
QMediaPlaylist *list = new QMediaPlaylist(this);
list->addMedia(QUrl("qrc:/test.mp4"));
list->setPlaybackMode(QMediaPlaylist::Loop);
videoWidget->setVideoOutput(mediaPlayer);
videoWidget->play();
DVideoWidget::Q_PROPERTY
int Q_PROPERTY(bool )
DVideoWidget::mirroredHorizontal
bool mirroredHorizontal() const See also setMirroredHorizontal()
DVideoWidget::mirroredVertical
bool mirroredVertical() const See also setMirroredVertical()
DVideoWidget::paint
void paint(const QVideoFrame &frame)
DVideoWidget::paint paints a specific QVideoFrame onto the widget. frame is the target video frame.
DVideoWidget::scale
qreal scale() const See also setScale()
DVideoWidget::aspectRatioMode
int aspectRatioMode() const See also setAspectRatioMode()
DVideoWidget::setSourceVideoPixelRatio
void setSourceVideoPixelRatio(const qreal ratio)
设置当前的视频或画面在HiDPI下的缩放系数 ratio
UnknownCommandDVideoWidget::sourceVideoPixelRatio
DVideoWidget::sourceVideoPixelRatio
qreal sourceVideoPixelRatio() const
返回视频在HiDPI下的缩放系数 UnknownCommandDVideoWidget::setSourceVideoPixelRatio
Returns qreal
DVideoWidget::brightness
int brightness() const See also setBrightness()
DVideoWidget::contrast
int contrast() const See also setContrast()
DVideoWidget::hue
int hue() const See also setHue()
DVideoWidget::saturation
int saturation() const See also setSaturation()
DVideoWidget::currentFrame
const QVideoFrame * currentFrame() const
返回当前的画面帧 Returns const QVideoFrame*
DVideoWidget::capture
int capture()
捕获当前的画面 Returns QPixmap 当前的画面帧
DVideoWidget::round
bool round() const See also setRound()
DVideoWidget::mirroredVerticalChanged
void mirroredVerticalChanged(bool mirroredVertical)
DVideoWidget::scaleChanged
void scaleChanged(qreal scale)
DVideoWidget::brightnessChanged
void brightnessChanged(int brightness)
DVideoWidget::contrastChanged
void contrastChanged(int contrast)
DVideoWidget::hueChanged
void hueChanged(int hue)
DVideoWidget::saturationChanged
void saturationChanged(int saturation)
DVideoWidget::roundChanged
void roundChanged(bool round)
DVideoWidget::setSource
void setSource(QMediaPlayer *source)
设置要跟踪的QMediaPlayer源 source
DVideoWidget::setMirroredHorizontal
void setMirroredHorizontal(bool mirroredHorizontal)
设置是否开启当前视频或画面水平翻转 mirroredHorizontal
UnknownCommandDVideoWidget::mirroredHorizontal UnknownCommand DVideoWidget::mirroredHorizontalChanged
DVideoWidget::setMirroredVertical
void setMirroredVertical(bool mirroredVertical)
设置是否开启当前的视频或画面的垂直翻转 mirroredVertical
UnknownCommandDVideoWidget::mirroredVertical UnknownCommand DVideoWidget::mirroredVerticalChanged
DVideoWidget::setScale
void setScale(qreal scale)
设置相对于原始视频或画面大小的缩放 UnknownCommandDVideoWidget::scale UnknownCommand DVideoWidget::scaleChanged
scale
DVideoWidget::setAspectRatioMode
void setAspectRatioMode(int mode)
设置当前的视频或画面的缩放模式 mode
UnknownCommandDVideoWidget::aspectRatioMode
DVideoWidget::setBrightness
void setBrightness(int brightness)
设置当前的视频或画面的亮度 brightness
UnknownCommandDVideoWidget::brightness UnknownCommand DVideoWidget::brightnessChanged
DVideoWidget::setContrast
void setContrast(int contrast)
设置当前视频或画面的对比度 contrast
UnknownCommandDVideoWidget::contrast UnknownCommand DVideoWidget::contrastChanged
DVideoWidget::setHue
void setHue(int hue)
设置当前视频或画面的色彩度 hue
UnknownCommandDVideoWidget::hue UnknownCommand DVideoWidget::hueChanged
DVideoWidget::setSaturation
void setSaturation(int saturation)
设置当前的视频或画面的饱和度 saturation
UnknownCommandDVideoWidget::saturation UnknownCommand DVideoWidget::saturationChanged
DVideoWidget::setRound
void setRound(bool round)
设置是否开启视频圆形 round
UnknownCommandDVideoWidget::round UnknownCommand DVideoWidget::roundChanged
DVideoWidget::paintEvent
void paintEvent(int *event) override