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)
- 如何设置AVFormatContext.video_codec_id = AV_CODEC_ID_MJPEG HOT 31
- Dead lock on mp4 playing HOT 3
- Question. I have a device that receives an rtsp stream and plays it through your library. Is it possible to stream this video to another device HOT 3
- Video playback occasionally get stuck in this reproducer HOT 9
- 是否可以提供仅有动态库的多系统环境下的nuget包 HOT 4
- mdk-sdk crash on custom Url or protocol HOT 4
- Prevent video from unloading after end HOT 1
- 仿照WindowsStore Example在WinUI3上初始化SwapChain失败 HOT 40
- 去掉不必要的解码器 HOT 1
- Dead lock HOT 2
- 是否有接口可以传入h264数据解码播放 HOT 12
- 请教一个问题,onFrame 在窗口最小化时就没有回调了,导致窗口最小化时视频相当于就被暂停了,有什么好的解决方法吗 HOT 12
- Optimize seek(0, mdk::SeekFlag::FromStart) HOT 1
- App crashes onFrame during seek HOT 4
- OpenCV Support HOT 4
- Get current timestamp to update Slider HOT 1
- 建议写一个positionChanged的信号 HOT 4
- seek(-1LL, SeekFlag::FromNow|SeekFlag::Frame) 似乎退了几帧之后就无法再继续后退了 HOT 5
- rtsp内存泄露 HOT 17
- The video is not displayed when using QUdpSocket HOT 11
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.