Skip to content

Commit

Permalink
WIP: subtitles demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Jul 1, 2024
1 parent 9e37b38 commit 6e98c0f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/fixtures
31 changes: 31 additions & 0 deletions tests/qml/subtitles.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import QtQuick
import MediaFX

Item {
id: root

MediaClip {
id: videoClip

source: Qt.resolvedUrl("../fixtures/assets/tr-subtitles-320x180-29.97fps-8s.mp4")
audioRenderer: AudioRenderer {}

Component.onCompleted: {
videoClip.clipEnded.connect(root.RenderSession.session.endSession);
}
}

VideoRenderer {
id: topLeftVideo
transform: Translate { x: -topLeftVideo.width / 4 }
anchors.horizontalCenter: root.horizontalCenter
mediaClip: videoClip
}
VideoRenderer {
id: bottomRightVideo
transform: Translate { x: bottomRightVideo.width / 4 }
anchors.horizontalCenter: root.horizontalCenter
anchors.top: topLeftVideo.bottom
mediaClip: videoClip
}
}

0 comments on commit 6e98c0f

Please sign in to comment.