mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 10:19:59 +01:00
New MediaPlayer image with timeline
Enable playing and seeking into a timeline on a media player that loaded an image. Timeline sets a duration (end) and is saved/loaded. Add a gstreamer imagefreeze element in the pipeline to simulate a playable stream. Distinction must be made between 'isImage' (what was loaded) and 'singleFrame' (what is in the pipeline). GUI is added and customized with menu and dialog.
This commit is contained in:
@@ -410,7 +410,7 @@ void SessionVisitor::visit(MediaPlayer &n)
|
||||
XMLElement *newelement = xmlDoc_->NewElement("MediaPlayer");
|
||||
newelement->SetAttribute("id", n.id());
|
||||
|
||||
if (!n.isImage()) {
|
||||
if (!n.singleFrame()) {
|
||||
newelement->SetAttribute("play", n.isPlaying());
|
||||
newelement->SetAttribute("loop", (int) n.loop());
|
||||
newelement->SetAttribute("speed", n.playSpeed());
|
||||
@@ -421,6 +421,9 @@ void SessionVisitor::visit(MediaPlayer &n)
|
||||
|
||||
// timeline
|
||||
XMLElement *timelineelement = xmlDoc_->NewElement("Timeline");
|
||||
timelineelement->SetAttribute("begin", n.timeline()->begin());
|
||||
timelineelement->SetAttribute("end", n.timeline()->end());
|
||||
timelineelement->SetAttribute("step", n.timeline()->step());
|
||||
|
||||
// gaps in timeline
|
||||
XMLElement *gapselement = xmlDoc_->NewElement("Gaps");
|
||||
|
||||
Reference in New Issue
Block a user