-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Library: add overview column #14140
base: main
Are you sure you want to change the base?
Library: add overview column #14140
Conversation
Draft until CI is happy. |
ec7c78c
to
b0038fb
Compare
b0038fb
to
fba0ecc
Compare
I took a second look and polished it a bit. |
fba0ecc
to
17243c3
Compare
passthrough entire color set to WaveformOverviewRenderer, extract what's needed
This catches all additions as before but in a simpler way. Also catches updates and removals (when the track waveform has been cleared).
17243c3
to
d644456
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, not tested yet.
src/analyzer/analyzerwaveform.cpp
Outdated
// Set waveforms on track AFTER they'been written to disk in order to have | ||
// a consistency when OverviewCache asks AnalysisDAO for a waveform summary. | ||
if (m_waveform) { | ||
tio->setWaveform(m_waveform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may chang it to pTrack->...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, done.
src/analyzer/analyzerwaveform.cpp
Outdated
@@ -353,6 +351,15 @@ void AnalyzerWaveform::storeResults(TrackPointer tio) { | |||
m_waveform, | |||
m_waveformSummary); | |||
|
|||
// Set waveforms on track AFTER they'been written to disk in order to have | |||
// a consistency when OverviewCache asks AnalysisDAO for a waveform summary. | |||
if (m_waveform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code removes the waveform from the track in case of nullptr. It hink that shall remain.
src/analyzer/analyzerwaveform.cpp
Outdated
if (m_waveform) { | ||
tio->setWaveform(m_waveform); | ||
} | ||
if (m_waveformSummary) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, write the waveform uncoditionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay. I didn't consider that the analyzer may a produce null waveforms.
done.
src/coreservices.cpp
Outdated
@@ -372,6 +373,12 @@ void CoreServices::initialize(QApplication* pApp) { | |||
m_pPlayerManager.get(), | |||
m_pRecordingManager.get()); | |||
|
|||
OverviewCache* pOverviewCache = OverviewCache::createInstance(pConfig, m_pDbConnectionPool); | |||
connect(&(m_pLibrary->trackCollectionManager()->internalCollection()->getTrackDAO()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connect(&(m_pLibrary->trackCollectionManager()->internalCollection()->getTrackDAO()), | |
connect(&(m_pTrackCollectionManager->internalCollection()->getTrackDAO()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
&TrackAnalysisScheduler::trackProgress, | ||
this, | ||
&AnalysisFeature::trackProgress, | ||
Qt::DirectConnection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use a direct connection here, this may cause headaches later. See my other comment.
connect(m_pLibrary, | ||
&Library::onTrackAnalyzerProgress, | ||
overviewWidget, | ||
&WOverview::onTrackAnalyzerProgress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we have probably the a queued connection. Without the Qt::DirectConnections before, we would have the queued connection at the place wher it enteres a main thread object and here we would have automatically a direct connection.
It think this is the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint!
The connection are added in #14150, and since that (probably) will be merged before this PR I'll fix it there and it'll be no issue here when I squash after final LGTM.
continuation of #13638
This is now based on @ninomp's initial POC commit 80d8b5f
from https://github.com/ninomp/mixxx/commits/overviewsinlibrary-rebased/
(incl. the fix from #14150 )
I addressed @Swiftb0y's review and a lot evolved anyway.
OverviewCache::prepareOverview
), though with a bit of refactoring this could be made optional<Library>
node exactly like in the waveform templates(<Visual>
widget)(I adopted the RGB simplifications made by @Nino MP, and simplified the others, too)
Ideas / Nice to have