Files
SubWave/src/gui/ReencodeDialog.h
T
rattatwinko 1a00e98661 rather large commit, it now handles memory and threading properly.
---

more thorough commit message which was generated by the wonderful copilot AI tool:

Refactor and enhance audio encoding and decoding pipelines

- Introduced CodecUtils.h for utility functions related to audio codec selection, including sample format and bitrate clamping.
- Added DecoderPipeline.h to manage audio decoding, including opening files and retrieving audio stream information.
- Implemented EncoderPipeline.h to handle audio encoding, including encoder setup, resampling, and writing output files.
- Created OutputPathBuilder.h to generate output file paths based on reencode job specifications.
- Refactored SpectrogramWidget to improve OpenGL handling and ensure safe context usage.
- Updated ReencodeDialog.h to enhance code readability and maintainability.
- Improved error handling and logging throughout the audio processing components.
2026-07-01 09:56:37 +02:00

59 lines
1.5 KiB
C++

#pragma once
#include <QDialog>
#include <QList>
#include "engine/Track.h"
#include "engine/encoder/ReencodeJob.h"
class QComboBox;
class QLineEdit;
class QPushButton;
class QTableWidget;
class QLabel;
class QProgressBar;
namespace engine { class AlbumReencoder; }
class ReencodeDialog : public QDialog
{
Q_OBJECT
public:
explicit ReencodeDialog(const QList<engine::Track> &tracks,
QWidget *parent = nullptr);
~ReencodeDialog() override;
private slots:
void onPresetChanged(int index);
void onBrowseOutput();
void onStartStop();
void onTrackStarted (int index, const QString &title);
void onTrackFinished(int index, bool ok,
const QString &outPath, const QString &err);
void onAllFinished (int succeeded, int failed);
private:
void buildUi();
void populateTrackTable();
void setRunning(bool running);
void updateOverallProgress();
QList<engine::Track> m_tracks;
QList<engine::EncodePreset> m_presets;
QComboBox *m_presetCombo { nullptr };
QLabel *m_presetDesc { nullptr };
QLineEdit *m_outputDir { nullptr };
QPushButton *m_browseBtn { nullptr };
QTableWidget *m_table { nullptr };
QProgressBar *m_overallBar { nullptr };
QLabel *m_statusLabel { nullptr };
QPushButton *m_startStopBtn { nullptr };
QPushButton *m_closeBtn { nullptr };
engine::AlbumReencoder *m_reencoder { nullptr };
qsizetype m_doneCount { 0 };
qsizetype m_totalCount { 0 };
};