Skip to content

Commit

Permalink
fix MediaSequence layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Jan 10, 2024
1 parent f446de1 commit 9c13537
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions src/MediaFX/qml/MediaSequence.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import QtMultimedia
import MediaFX
import "sequence.js" as Sequence

VideoOutput {
Item {
id: root

default required property list<MediaClip> mediaClips
required property list<MediaMixer> mediaMixers
property alias fillMode: video.fillMode
property alias orientation: video.orientation

signal mediaSequenceEnded

Expand All @@ -41,7 +43,7 @@ VideoOutput {

PropertyChanges {
Media.clip: root.mediaClips[internal.currentClipIndex]
target: root
target: video
}
PropertyChanges {
target: root.mediaMixers[internal.currentMixerIndex]
Expand All @@ -55,35 +57,40 @@ VideoOutput {
Media.clip: root.mediaClips[internal.currentClipIndex]
layer.enabled: true
visible: false
target: root
target: video
}
PropertyChanges {
Media.clip: (internal.currentClipIndex + 1 >= root.mediaClips.length) ? null : root.mediaClips[internal.currentClipIndex + 1]
layer.enabled: true
target: auxVideo
}
ParentChange {
parent: root.parent
parent: root
target: root.mediaMixers[internal.currentMixerIndex]
}
PropertyChanges {
anchors.fill: root
source: video
dest: auxVideo
source: root
target: root.mediaMixers[internal.currentMixerIndex]
visible: true
target: root.mediaMixers[internal.currentMixerIndex]
}
}
]

Component.onCompleted: Sequence.initializeClip()

VideoOutput {
id: video

anchors.fill: internal
}
VideoOutput {
id: auxVideo

fillMode: root.fillMode
anchors.fill: root
parent: root.parent
fillMode: video.fillMode
orientation: video.orientation
anchors.fill: internal
visible: false
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures

0 comments on commit 9c13537

Please sign in to comment.