Comments (5)
you have to emit signals yourself in the callback. see https://github.com/wang-bin/qtmultimedia-plugins-mdk/blob/master/mediaplayercontrol.cpp#L44 https://github.com/wang-bin/qtmultimedia-plugins-mdk/blob/master/mediaplayercontrol.cpp#L47
from mdk-sdk.
i have tried the following from the above link, but its still not working
_player->onStateChanged([this](State value){
Q_EMIT stateChanged(value);
});
_player->onMediaStatusChanged([this](MediaStatus value){
Q_EMIT mediaStatusChanged(value);
return true;
});
from mdk-sdk.
how do you connect signals?
from mdk-sdk.
i tried this first but it didn't work
connect(player,&MediaPlayer::mediaStatusChanged,this,&MainWindow::mediaStatusChanged);
then i tried this, it also didn't work connect(player,SIGNAL(mediaStatusChanged()),this,SLOT(mediaStatusChanged()),Qt::DirectConnection);
from mdk-sdk.
connect(player,&MediaPlayer::mediaStatusChanged,this,&MainWindow::mediaStatusChanged);
It's a queued connection, signal parameter type MediaStatus
must be known to qt metatype system.
Q_DECLARE_METATYPE(mdk::MediaStatus) // declare in global scope
qRegisterMetaType<MediaStatus>(); // in a function
connect(player,SIGNAL(mediaStatusChanged()),this,SLOT(mediaStatusChanged()),Qt::DirectConnection);
forgot signal parameter? qRegisterMetaType too.
other options can be
connect(this, & MediaPlayer::mediaStatusChanged, []{});
from mdk-sdk.
Related Issues (20)
- 32位的mdk无法record HOT 28
- mdk有没有回调函数可以获取音频数据? HOT 1
- Offline renderer not working anymore HOT 19
- Crash when playing video file on wayland HOT 6
- ubuntu20下QT应用崩溃 HOT 17
- Poor picture clarity HOT 2
- seek on android results to black frames HOT 16
- 在i7-7700、显卡P2000的设备上,解码5760 3240 h265编码的视频,出现卡顿、音视频不同步问题 HOT 12
- Freezing Issue When Quickly Switching Videos HOT 1
- QR Code watermark showing HOT 7
- qt android mdk播放mp3,切换音乐时大概率出现杂音 HOT 2
- Changing decoders on Player make others turn blank [open source reproducer] HOT 8
- set FPS for multiple player? HOT 4
- How to get a list of current active tracks HOT 1
- Set Bitrate HOT 1
- 视频中间显示了一个二维码 HOT 1
- [Android]: SetGlobalOption("subtitles.fonts.dir", ...) does not work HOT 2
- setMedia("avdevice://gdigrab:desktop") HOT 2
- 关于RTMP延迟问题 HOT 1
- mdk中可以设置加密解密参数吗? HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdk-sdk.