-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add video support #7534
Draft
regulus79
wants to merge
17
commits into
LMMS:master
Choose a base branch
from
regulus79:add-video-support-new
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add video support #7534
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new track and clip type,
VideoTrack
andVideoClip
, for playing videos in sync with the music, primarily to make composing music for videos easier. The videos are played in dedicatedVideoClipWindow
s which can be opened by double-clicking on theVideoClip
after a video file has been loaded.Partially fixes #2079
And #6837.
Implementation
This PR creates 5 new classes:
VideoTrack
: A minimal new track for video clips.VideoTrackView
: Gui view class forVideoTrack
.VideoClip
: Contains the video file path and a reference to aVideoClipWindow
.VideoClipView
: Gui view class forVideoClip
. As of writing this, the view is very minimal. I am planning to try adding frame previews over the length of the clip as a basic visualization.VideoClipWindow
: Window for playing videos. Uses Qt'sQMediaPlayer
andQVideoWidget
to play the video file stored in its correspondingVideoClip
. The implementation is still minimal, but I am planning to add at least a volume slider.TODO
VideoClipWindow
.VideoClipView
.Note
This PR makes use of Qt's Multimedia and MultimediaWidgets modules, which required adding them to
CMakeLists.txt
. I understand importing extra modules is not great, but I would love to hear your opinions on it.Also, I added some code to get video clip splitting to work which is redundant with #7477. Once that PR is merged, some changes in
ClipView.cpp
can be removed.Also, I required the ability for VideoClipWindow to receive a signal when the timeline position changed, but oddly enough, the
playbackPositionChanged
signal was only emitted bysetPlayPos
, notsetToTime
orsetToTimeByTicks
, which means that it is not triggered when the user drags the playhead. I fixed this by makingsetToTime
andsetToTimeByTicks
also emitplaybackPositionChanged
.And just for anyone wondering, the video clip audio is not routed through the mixer or exported with the song.