Add diagnostics for proxy toggle synchronization
Add temporary qDebug logging to Footage, ProjectCopier, RenderWorkerPool, and TimelineWidget to trace why Use Proxy cannot be toggled and why proxy footage may still be used after disabling.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "footage.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
|
||||
@@ -229,12 +230,24 @@ void Footage::SetSourceStartTime(const rational &time, const QString &source)
|
||||
has_source_start_time_ = true;
|
||||
}
|
||||
|
||||
void Footage::set_proxy_enabled(bool enabled)
|
||||
{
|
||||
if (proxy_enabled_ != enabled) {
|
||||
qDebug() << "Footage::set_proxy_enabled:" << filename() << enabled;
|
||||
proxy_enabled_ = enabled;
|
||||
emit ProxySettingsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void Footage::SetProxy(const QString &path,
|
||||
ProxyManager::ProxyState state,
|
||||
int video_stream_index,
|
||||
int preset_version,
|
||||
bool enabled)
|
||||
{
|
||||
qDebug() << "Footage::SetProxy:" << filename() << "enabled=" << enabled
|
||||
<< "state=" << ProxyManager::ProxyStateToString(state)
|
||||
<< "path=" << path;
|
||||
proxy_path_ = path;
|
||||
proxy_state_ = state;
|
||||
proxy_video_stream_index_ = video_stream_index;
|
||||
|
||||
@@ -178,13 +178,7 @@ public:
|
||||
return proxy_enabled_;
|
||||
}
|
||||
|
||||
void set_proxy_enabled(bool enabled)
|
||||
{
|
||||
if (proxy_enabled_ != enabled) {
|
||||
proxy_enabled_ = enabled;
|
||||
emit ProxySettingsChanged();
|
||||
}
|
||||
}
|
||||
void set_proxy_enabled(bool enabled);
|
||||
|
||||
const QString &proxy_path() const
|
||||
{
|
||||
|
||||
@@ -278,9 +278,16 @@ void ProjectCopier::SyncFootageProxySettings(Footage *source)
|
||||
{
|
||||
Footage *copy = GetCopy(source);
|
||||
if (!copy) {
|
||||
qWarning() << "ProjectCopier::SyncFootageProxySettings: no copy for"
|
||||
<< source->filename();
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "ProjectCopier::SyncFootageProxySettings:" << source->filename()
|
||||
<< "enabled=" << source->proxy_enabled() << "->"
|
||||
<< copy->proxy_enabled() << "state="
|
||||
<< ProxyManager::ProxyStateToString(source->proxy_state());
|
||||
|
||||
copy->SetProxy(source->proxy_path(), source->proxy_state(),
|
||||
source->proxy_video_stream_index(),
|
||||
source->proxy_preset_version(), source->proxy_enabled());
|
||||
|
||||
@@ -573,8 +573,12 @@ bool RenderWorkerPool::PrepareJob(RenderTicketPtr ticket,
|
||||
auto it = graph_cache_.find(project_uuid);
|
||||
if (it != graph_cache_.end() && !project->is_modified()) {
|
||||
graph_path = it->path;
|
||||
qDebug() << "RenderWorkerPool::PrepareJob: using cached graph snapshot"
|
||||
<< graph_path;
|
||||
} else {
|
||||
if (it != graph_cache_.end()) {
|
||||
qDebug() << "RenderWorkerPool::PrepareJob: graph stale, rewriting"
|
||||
<< project->is_modified();
|
||||
CleanupGraphFile(it->path);
|
||||
graph_cache_.erase(it);
|
||||
}
|
||||
|
||||
@@ -1216,8 +1216,12 @@ void TimelineWidget::GenerateProxiesForSelectedClips()
|
||||
void TimelineWidget::SetSelectedClipsProxyEnabled(bool enabled)
|
||||
{
|
||||
const QVector<Footage *> footage = GetSelectedProxyFootage(selected_blocks_);
|
||||
qDebug() << "TimelineWidget::SetSelectedClipsProxyEnabled:" << enabled
|
||||
<< "footage count=" << footage.size();
|
||||
for (Footage *item : footage) {
|
||||
if (item->proxy_path().isEmpty()) {
|
||||
qDebug() << " skipping item with empty proxy path"
|
||||
<< item->filename();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user