format: reformatting files
This commit is contained in:
@@ -23,9 +23,9 @@ add_subdirectory(proxy)
|
||||
add_subdirectory(render)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/task.h
|
||||
task/taskmanager.h
|
||||
task/taskmanager.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/task.h
|
||||
task/taskmanager.h
|
||||
task/taskmanager.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/conform/conform.h
|
||||
task/conform/conform.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/conform/conform.h
|
||||
task/conform/conform.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/customcache/customcachetask.cpp
|
||||
task/customcache/customcachetask.h
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/customcache/customcachetask.cpp
|
||||
task/customcache/customcachetask.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/export/export.h
|
||||
task/export/export.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/export/export.h
|
||||
task/export/export.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/precache/precachetask.h
|
||||
task/precache/precachetask.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/precache/precachetask.h
|
||||
task/precache/precachetask.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(OpenTimelineIO_FOUND)
|
||||
add_subdirectory(loadotio)
|
||||
add_subdirectory(saveotio)
|
||||
endif()
|
||||
if (OpenTimelineIO_FOUND)
|
||||
add_subdirectory(loadotio)
|
||||
add_subdirectory(saveotio)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(import)
|
||||
add_subdirectory(load)
|
||||
add_subdirectory(save)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/project/import/import.h
|
||||
task/project/import/import.cpp
|
||||
task/project/import/importerrordialog.h
|
||||
task/project/import/importerrordialog.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/project/import/import.h
|
||||
task/project/import/import.cpp
|
||||
task/project/import/importerrordialog.h
|
||||
task/project/import/importerrordialog.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -37,9 +37,9 @@ ProjectImportErrorDialog::ProjectImportErrorDialog(const QStringList &filenames,
|
||||
|
||||
setWindowTitle(tr("Import Error"));
|
||||
|
||||
layout->addWidget(new QLabel(
|
||||
tr("The following files failed to import. Oak Video Editor likely does not "
|
||||
"support their formats.")));
|
||||
layout->addWidget(new QLabel(tr(
|
||||
"The following files failed to import. Oak Video Editor likely does not "
|
||||
"support their formats.")));
|
||||
|
||||
QListWidget *list_widget = new QListWidget();
|
||||
foreach (const QString &s, filenames) {
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/project/load/load.h
|
||||
task/project/load/load.cpp
|
||||
task/project/load/loadbasetask.h
|
||||
task/project/load/loadbasetask.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/project/load/load.h
|
||||
task/project/load/load.cpp
|
||||
task/project/load/loadbasetask.h
|
||||
task/project/load/loadbasetask.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/project/loadotio/loadotio.h
|
||||
task/project/loadotio/loadotio.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/project/loadotio/loadotio.h
|
||||
task/project/loadotio/loadotio.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/project/save/save.h
|
||||
task/project/save/save.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/project/save/save.h
|
||||
task/project/save/save.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/project/saveotio/saveotio.h
|
||||
task/project/saveotio/saveotio.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/project/saveotio/saveotio.h
|
||||
task/project/saveotio/saveotio.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2026 Oak Team
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/proxy/proxy.h
|
||||
task/proxy/proxy.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/proxy/proxy.h
|
||||
task/proxy/proxy.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
+23
-22
@@ -29,8 +29,7 @@
|
||||
namespace olive
|
||||
{
|
||||
|
||||
ProxyTask::ProxyTask(const QString &source_filename,
|
||||
int stream_index,
|
||||
ProxyTask::ProxyTask(const QString &source_filename, int stream_index,
|
||||
const ProxyManager::ProxyParams ¶ms,
|
||||
const QString &output_filename)
|
||||
: source_filename_(source_filename)
|
||||
@@ -44,9 +43,11 @@ ProxyTask::ProxyTask(const QString &source_filename,
|
||||
|
||||
bool ProxyTask::Run()
|
||||
{
|
||||
const QString ffmpeg = QStandardPaths::findExecutable(QStringLiteral("ffmpeg"));
|
||||
const QString ffmpeg =
|
||||
QStandardPaths::findExecutable(QStringLiteral("ffmpeg"));
|
||||
if (ffmpeg.isEmpty()) {
|
||||
SetError(tr("Failed to generate proxy: ffmpeg executable was not found"));
|
||||
SetError(
|
||||
tr("Failed to generate proxy: ffmpeg executable was not found"));
|
||||
qWarning() << "ProxyTask: ffmpeg executable not found";
|
||||
return false;
|
||||
}
|
||||
@@ -55,36 +56,34 @@ bool ProxyTask::Run()
|
||||
if (!output_dir.exists() && !output_dir.mkpath(QStringLiteral("."))) {
|
||||
SetError(tr("Failed to create proxy output directory"));
|
||||
qWarning() << "ProxyTask: failed to create output directory"
|
||||
<< output_dir.absolutePath();
|
||||
<< output_dir.absolutePath();
|
||||
return false;
|
||||
}
|
||||
|
||||
qDebug() << "ProxyTask: starting ffmpeg proxy generation:"
|
||||
<< source_filename_ << "->" << output_filename_;
|
||||
qDebug()
|
||||
<< "ProxyTask: starting ffmpeg proxy generation:" << source_filename_
|
||||
<< "->" << output_filename_;
|
||||
|
||||
QFile::remove(output_filename_);
|
||||
|
||||
const QString scale_filter = QStringLiteral(
|
||||
"scale=w=%1:h=%2:force_original_aspect_ratio=decrease")
|
||||
.arg(QString::number(params_.width),
|
||||
QString::number(params_.height));
|
||||
const QString scale_filter =
|
||||
QStringLiteral("scale=w=%1:h=%2:force_original_aspect_ratio=decrease")
|
||||
.arg(QString::number(params_.width),
|
||||
QString::number(params_.height));
|
||||
|
||||
const QString container_format =
|
||||
params_.extension.isEmpty() ? QStringLiteral("mp4") : params_.extension;
|
||||
|
||||
QStringList args;
|
||||
args << QStringLiteral("-y")
|
||||
<< QStringLiteral("-i") << source_filename_
|
||||
args << QStringLiteral("-y") << QStringLiteral("-i") << source_filename_
|
||||
<< QStringLiteral("-map") << QStringLiteral("0:%1").arg(stream_index_)
|
||||
<< QStringLiteral("-an")
|
||||
<< QStringLiteral("-vf") << scale_filter
|
||||
<< QStringLiteral("-an") << QStringLiteral("-vf") << scale_filter
|
||||
<< QStringLiteral("-c:v") << QStringLiteral("libx264")
|
||||
<< QStringLiteral("-preset") << params_.preset
|
||||
<< QStringLiteral("-crf") << QString::number(params_.crf)
|
||||
<< QStringLiteral("-pix_fmt") << QStringLiteral("yuv420p")
|
||||
<< QStringLiteral("-movflags") << QStringLiteral("+faststart")
|
||||
<< QStringLiteral("-f") << container_format
|
||||
<< output_filename_;
|
||||
<< QStringLiteral("-f") << container_format << output_filename_;
|
||||
|
||||
QProcess process;
|
||||
process.setProgram(ffmpeg);
|
||||
@@ -94,7 +93,8 @@ bool ProxyTask::Run()
|
||||
|
||||
if (!process.waitForStarted()) {
|
||||
SetError(tr("Failed to start ffmpeg for proxy generation"));
|
||||
qWarning() << "ProxyTask: failed to start ffmpeg" << process.errorString();
|
||||
qWarning()
|
||||
<< "ProxyTask: failed to start ffmpeg" << process.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,19 +108,20 @@ bool ProxyTask::Run()
|
||||
}
|
||||
}
|
||||
|
||||
if (process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0) {
|
||||
if (process.exitStatus() != QProcess::NormalExit ||
|
||||
process.exitCode() != 0) {
|
||||
const QString output = QString::fromUtf8(process.readAll()).trimmed();
|
||||
QFile::remove(output_filename_);
|
||||
SetError(tr("ffmpeg failed to generate proxy: %1").arg(output));
|
||||
qWarning() << "ProxyTask: ffmpeg failed with exit code" << process.exitCode()
|
||||
<< "output:" << output;
|
||||
qWarning() << "ProxyTask: ffmpeg failed with exit code"
|
||||
<< process.exitCode() << "output:" << output;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!QFileInfo::exists(output_filename_)) {
|
||||
SetError(tr("ffmpeg finished but proxy file was not created"));
|
||||
qWarning() << "ProxyTask: ffmpeg finished but output file missing"
|
||||
<< output_filename_;
|
||||
<< output_filename_;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ namespace olive
|
||||
class ProxyTask : public Task {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProxyTask(const QString &source_filename,
|
||||
int stream_index,
|
||||
ProxyTask(const QString &source_filename, int stream_index,
|
||||
const ProxyManager::ProxyParams ¶ms,
|
||||
const QString &output_filename);
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
task/render/render.h
|
||||
task/render/render.cpp
|
||||
PARENT_SCOPE
|
||||
${OLIVE_SOURCES}
|
||||
task/render/render.h
|
||||
task/render/render.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -226,7 +226,7 @@ bool RenderTask::Render(ColorManager *manager, const TimeRangeList &video_range,
|
||||
StartTicket(&watcher_thread, manager, next_frame, mode,
|
||||
cache, force_size, force_matrix, force_format,
|
||||
force_channel_count, force_color_output,
|
||||
force_color_transform);
|
||||
force_color_transform);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,8 @@ private:
|
||||
const rational &time, RenderMode::Mode mode,
|
||||
FrameHashCache *cache, const QSize &force_size,
|
||||
const QMatrix4x4 &force_matrix, PixelFormat force_format,
|
||||
int force_channel_count, ColorProcessorPtr force_color_output,
|
||||
int force_channel_count,
|
||||
ColorProcessorPtr force_color_output,
|
||||
const ColorTransform &force_color_transform);
|
||||
|
||||
ViewerOutput *viewer_;
|
||||
|
||||
Reference in New Issue
Block a user