EndOfStream event not received when QML Video component is destroyed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Media Hub |
Fix Released
|
High
|
Alberto Aguirre | ||
dbus-cpp |
Invalid
|
Undecided
|
Unassigned | ||
qtubuntu-media |
Fix Released
|
Critical
|
Thomas Voß |
Bug Description
When using a Video component in QML, and this component is destroyed and recreated, it will fail to receive signals informing of the end of playback (and possibly others).
I traced this problem down to the media hub level. It appears that the hub server still sends out the EndOfStream signal on DBUS, but it is never received from the client instance created by the qtubuntu-media backend behind the Video element.
I attach some code that can help quickly test this behavior. What it does is simply load a Video in a Loader, play a video and when it's finished unload the Loader, wait 300ms, reload it and play again.
If the problem didn't exist, the video would keep looping forever. Instead it only plays twice, since it never receives the end of playback signal after being reloaded.
Related branches
- Antti Kaijanmäki (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
- Michał Sawicz: Approve
-
Diff: 253 lines (+80/-40)4 files modifiedsrc/aal/aalmediaplayerservice.cpp (+71/-34)
src/aal/aalmediaplayerservice.h (+6/-3)
src/aal/aalmediaplayerserviceplugin.cpp (+1/-1)
unittests/tst_mediaplayerplugin.cpp (+2/-2)
- PS Jenkins bot: Approve (continuous-integration)
- Jim Hodapp (community): Approve (code)
- Thomas Voß (community): Approve
-
Diff: 73 lines (+11/-11)4 files modifiedsrc/core/media/player_stub.cpp (+0/-10)
src/core/media/player_stub.h (+0/-1)
src/core/media/service_stub.cpp (+10/-0)
src/core/media/service_stub.h (+1/-0)
Changed in media-hub: | |
assignee: | nobody → Thomas Voß (thomas-voss) |
importance: | Undecided → High |
Changed in qtubuntu-media: | |
importance: | Undecided → Critical |
assignee: | nobody → Thomas Voß (thomas-voss) |
Changed in media-hub: | |
status: | New → Invalid |
Changed in media-hub: | |
status: | Invalid → Confirmed |
assignee: | Thomas Voß (thomas-voss) → Alberto Aguirre (albaguirre) |
Changed in dbus-cpp: | |
status: | New → Invalid |
Changed in media-hub: | |
status: | Confirmed → Fix Committed |
tags: | added: rtm14 |
Changed in media-hub: | |
status: | Fix Committed → Fix Released |
Changed in qtubuntu-media: | |
status: | New → Fix Released |
Ugo is right. The media-hub-server is emitting the EndOfStream Signal.
The player stub seems to be configuring the EndOfStream signal correctly (AddMatch filters are added as seen in dbus-monitor), but the signal slot is not being called by dbus-cpp. Need to dig deeper into dbus-cpp to understand why that's happening.