资源简介
QT5 简易多媒体播放器,支持进度拖拽、快进等功能。
代码片段和文件信息
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** “Redistribution and use in source and binary forms with or without
** modification are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
** LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL
** SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
** LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE
** DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.“
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include “histogramwidget.h“
#include
HistogramWidget::HistogramWidget(QWidget *parent)
: QWidget(parent)
m_levels(128)
m_isBusy(false)
{
m_processor.moveToThread(&m_processorThread);
qRegistermetaType >(“QVector“);
connect(&m_processor SIGNAL(histogramReady(QVector)) SLOT(setHistogram(QVector)));
m_processorThread.start(QThread::LowestPriority);
}
HistogramWidget::~HistogramWidget()
{
m_processorThread.quit();
m_processorThread.wait(10000);
}
void HistogramWidget::processframe(QVideoframe frame)
{
if (m_isBusy)
return; //drop frame
m_isBusy = true;
Qmetaobject::invokeMethod(&m_processor “processframe“
Qt::QueuedConnection Q_ARG(QVideoframe frame) Q_ARG(int m_levels));
}
void HistogramWidget::setHistogram(QVector histogram)
{
m_isBusy = false;
m_histogram = histogram;
update();
}
void HistogramWidget::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);
QP
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5557 2015-06-30 04:53 pla
文件 2782 2015-06-30 04:53 pla
文件 2263 2015-06-30 04:53 pla
文件 14809 2015-06-30 04:53 pla
文件 3806 2015-06-30 04:53 pla
文件 500 2015-06-30 04:53 pla
文件 33957 2017-02-03 16:37 pla
文件 6343 2015-06-30 04:53 pla
文件 3157 2015-06-30 04:53 pla
文件 5241 2015-06-30 04:53 pla
文件 3145 2015-06-30 04:53 pla
文件 2906 2015-06-30 04:53 pla
文件 2308 2015-06-30 04:53 pla
目录 0 2017-02-03 16:37 pla
----------- --------- ---------- ----- ----
86774 14
相关资源
-
jwpla
yer插件包 - Windows版Qt串口终端显示通信
- 媒体播放器qt实现
- PCL1.8.1+Qt5.9.4测试程序
- MediaRecoderDemo
- Linux下使用Qt+V4L2测试UVC相机
- QT读取数据并绘制曲线
- QShareMemory.zip
- esp32 qt 源码
- Qt之QWizard向导界面
- QT实现UDP通信
- Qt 之实现 QQ系统表情窗口
- 简易五子棋qt实现
- QT实现抗锯齿圆形头像
- 基于Smart4418开发板+Qt 开发的离子色谱
- Qt.rar
- 基于QT的仿QQ登录界面
- qt编程_在子线程中更新UI界面
- 用qt4编写的聊天室
- Qt从零开始制作串口调试助手源代码(
- Qt自定义带游标的slider,在滑块正上方
- Qt播放PCM音频裸流文件
- 基于QT的音乐播放器
- QT+OpenCV+USB摄像头
- Qt实现的gbk/utf8无bom文本转码小工具
- Qt+Tcp+udp调试工具
- QT5 实现TCP通信 客户端与服务端,互相
- mingw-win32-gcc(4.8.2)-release
-
dppla
yer解析插件 - QtImage读取图片,格式包括现在主要的
评论
共有 条评论