fixing the crashes and maybe speed up loading of objects in slides
This commit is contained in:
parent
d5c050a333
commit
e758958dca
4 changed files with 29 additions and 20 deletions
7
TODO.org
7
TODO.org
|
@ -12,13 +12,18 @@
|
||||||
|
|
||||||
- [X] Initial ListView with text coming from =getLyricList=
|
- [X] Initial ListView with text coming from =getLyricList=
|
||||||
- [X] Depending on this [[*Need to make getLyricList give back the verses with empty lines as separate slides][Need to make getLyricList give back the verses with empty lines as separate slides]]
|
- [X] Depending on this [[*Need to make getLyricList give back the verses with empty lines as separate slides][Need to make getLyricList give back the verses with empty lines as separate slides]]
|
||||||
- [ ] Need to perhaps address the MPV crashing problem for a smoother experience.
|
- [X] Need to perhaps address the MPV crashing problem for a smoother experience.
|
||||||
|
|
||||||
Essentially, mpv objects cause a seg fault when we remove them from the qml graph scene and are somehow re-referencing them. Using =reuseItems=, I can prevent the seg fault but then we are storing a lot of things in memory and will definitely cause slowdowns on older hardware. So far I haven't seen too many problems with the =reuseItems= piece yet.
|
Essentially, mpv objects cause a seg fault when we remove them from the qml graph scene and are somehow re-referencing them. Using =reuseItems=, I can prevent the seg fault but then we are storing a lot of things in memory and will definitely cause slowdowns on older hardware. So far I haven't seen too many problems with the =reuseItems= piece yet.
|
||||||
|
|
||||||
Apparently, I still have crashing
|
Apparently, I still have crashing
|
||||||
|
|
||||||
|
Setting a really high =cacheBuffer= in the ListView seems to have fixed the crashing, but will result in higher memory use. As of right now we are using 1.1Gb total, so I may think of a better solution later, but for now, that'll have to work.
|
||||||
|
|
||||||
- [X] There is also a small hiccup in switching between songs. I appears as if songs that don't have any slides will have ghost slides from the previously selected song.
|
- [X] There is also a small hiccup in switching between songs. I appears as if songs that don't have any slides will have ghost slides from the previously selected song.
|
||||||
|
|
||||||
|
- [ ] Another issue I discovered was that when switching to a song with videoBackgrounds, the mpv object doesn't ALWAYS load the first frame of the slide. Can I let the video play a tiny bit longer to make sure frames ALWAYS get loaded?
|
||||||
|
|
||||||
** WAIT Make toolbar functional for =songeditor= [3/4] [75%] :core:
|
** WAIT Make toolbar functional for =songeditor= [3/4] [75%] :core:
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Controls.ToolBar {]]
|
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Controls.ToolBar {]]
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ Item {
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: pauseTimer
|
id: pauseTimer
|
||||||
interval: 200
|
interval: 300
|
||||||
onTriggered: mpv.pause()
|
onTriggered: mpv.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,13 +58,14 @@ Item {
|
||||||
anchors.rightMargin: 20
|
anchors.rightMargin: 20
|
||||||
model: songModel
|
model: songModel
|
||||||
clip: true
|
clip: true
|
||||||
cacheBuffer: 900
|
cacheBuffer: 1900
|
||||||
reuseItems: true
|
reuseItems: true
|
||||||
spacing: Kirigami.Units.gridUnit
|
spacing: Kirigami.Units.gridUnit
|
||||||
/* flickDeceleration: 4000 */
|
|
||||||
/* boundsMovement: Flickable.StopAtBounds */
|
|
||||||
synchronousDrag: true
|
synchronousDrag: true
|
||||||
delegate: Presenter.Slide {
|
delegate: Loader {
|
||||||
|
width: slideList.width
|
||||||
|
height: width * 9 / 16
|
||||||
|
Presenter.Slide {
|
||||||
id: representation
|
id: representation
|
||||||
editMode: true
|
editMode: true
|
||||||
imageSource: root.imageBackground
|
imageSource: root.imageBackground
|
||||||
|
@ -79,6 +80,7 @@ Item {
|
||||||
implicitHeight: width * 9 / 16
|
implicitHeight: width * 9 / 16
|
||||||
itemType: "song"
|
itemType: "song"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Kirigami.WheelHandler {
|
Kirigami.WheelHandler {
|
||||||
id: wheelHandler
|
id: wheelHandler
|
||||||
|
@ -155,9 +157,10 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadVideo() {
|
function loadVideo() {
|
||||||
|
showPassiveNotification("I'm loading the videos");
|
||||||
for (var i = 0; i < slideList.count; ++i) {
|
for (var i = 0; i < slideList.count; ++i) {
|
||||||
slideList.currentIndex = i;
|
slideList.currentIndex = i;
|
||||||
slideList.currentItem.loadVideo();
|
slideList.currentItem.representation.loadVideo();
|
||||||
print(slideList.currentItem);
|
print(slideList.currentItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,6 +424,7 @@ Item {
|
||||||
/* print("Here are the verses: " + verses); */
|
/* print("Here are the verses: " + verses); */
|
||||||
const verses = songsqlmodel.getLyricList(id);
|
const verses = songsqlmodel.getLyricList(id);
|
||||||
verses.forEach(slideEditor.appendVerse);
|
verses.forEach(slideEditor.appendVerse);
|
||||||
|
/* slideEditor.loadVideo(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearSlides() {
|
function clearSlides() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue