当前位置:网站首页>QT audio playback upgrade (7)
QT audio playback upgrade (7)
2022-06-27 15:54:00 【Burn slowly】
1. install multimedia rely on
# sudo apt install libqt5multimedia5-plugins
2. Create project code
# mkdir qt
# cd qt
<1>.main.cpp
# emacs main.cpp
#include <QtCore/QCoreApplication>
#include <QtMultimedia/QMediaPlayer>
#include <QEventLoop>
#include "player.h"
int main(int argc, char *argv[]){
QCoreApplication a(argc, argv);
Player player;
return a.exec();
}
<2>.player.h
# emacs player.h
#ifndef PLAYER_H
#define PLAYER_H
#include <QObject>
#include <QMediaPlayer>
class QMediaPlayer;
class Player : public QObject{
Q_OBJECT
public:
explicit Player(QObject *parent = nullptr);
signals:
public slots:
void slotStatusChnaged(QMediaPlayer::State newState);
void errorStatuschanged(QMediaPlayer::Error error );
private:
QMediaPlayer * player ;
};
#endif // PLAYER_H
<3>.player.cpp
# emacs player.cpp
#include "player.h"
#include <QMediaPlayer>
#include <QCoreApplication>
#边栏推荐
- 机械硬盘和ssd固态硬盘的原理对比分析
- 2022年最新《谷粒学院开发教程》:8 - 前台登录功能
- Design of digital video signal processor based on FPGA (with main code)
- SQL parsing practice of Pisa proxy
- PSS: vous n'êtes qu'à deux niveaux du NMS Free + Lifting point | 2021 Paper
- FPGA based analog I ² C protocol system design (with main code)
- sql注入原理
- Knightctf 2022 web section
- Luogu_ P1002 [noip2002 popularization group] crossing the river_ dp
- Expert: those who let you go to a good school with a low score are all Scams
猜你喜欢

Pisa-Proxy 之 SQL 解析实践

Knowledge map model

A distribution fission activity is more than just a circle of friends!

express
![Beginner level Luogu 2 [branch structure] problem list solution](/img/53/d7bf659f7e1047db4676c9a01fcb42.png)
Beginner level Luogu 2 [branch structure] problem list solution

Sigkdd22 | graph generalization framework of graph neural network under the paradigm of "pre training, prompting and fine tuning"

SQL injection principle

E modulenotfounderror: no module named 'psychopg2' (resolved)

PSS:你距離NMS-free+提點只有兩個卷積層 | 2021論文

About tensorflow using GPU acceleration
随机推荐
Derivation of Halcon camera calibration principle
熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
3.1 simple condition judgment
CNN convolutional neural network (the easiest to understand version in History)
[MySQL] query valid data based on time
Luogu_ P1003 [noip2011 improvement group] carpet laying_ Violence enumeration
MySQL中符号@的作用
Design of electronic calculator system based on FPGA (with code)
跨域图像的衡量新方式Style relevance:论文解读和代码实战
substrate 技术每周速览 20220411
Let's talk about the process of ES Indexing Documents
CentOS8-postgresql初始化时报错:initdb: error: invalid locale settings; check LANG and LC_* environment
Cesium 使用MediaStreamRecorder 或者MediaRecorder录屏并下载视频,以及开启摄像头录像。【转】
List转Table
请问阿里云实验中 k8s 对于3306端口转发,同时开启mysql客户端就会异常终止,是什么原因呢?
E modulenotfounderror: no module named 'psychopg2' (resolved)
Pisa-Proxy 之 SQL 解析实践
Eolink launched a support program for small and medium-sized enterprises and start-ups to empower enterprises!
Introduction to TTCAN brick moving
Eolink 推出面向中小企业及初创企业支持计划,为企业赋能!