| 1 | /* MystiQ - a C++/Qt5 gui frontend for ffmpeg |
| 2 | * Copyright (C) 2011-2019 Maikel Llamaret Heredia <[email protected]> |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation, either version 3 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef MEDIACONVERTER_H |
| 19 | #define MEDIACONVERTER_Hcxx . . $ `converter/mediaconverter.h:19:9`! |
| 20 | |
| 21 | #include <QObject> |
| 22 | #include <QProcess> |
| 23 | #include "conversionparameters.h"cxx . . $ `<file>/converter/conversionparameters.h`/ |
| 24 | |
| 25 | class ConversionParameterscxx . . $ ConversionParameters#; |
| 26 | class ConverterInterfacecxx . . $ ConverterInterface#; |
| 27 | class AudioFiltercxx . . $ AudioFilter#; |
| 28 | |
| 29 | class MediaConvertercxx . . $ MediaConverter# : public QObjectcxx . . $ QObject# |
| 30 | { |
| 31 | Q_OBJECTcxx . . $ MediaConverter#tr(75d9f1c324b4579d). |
| 32 | public: |
| 33 | explicit MediaConvertercxx . . $ MediaConverter#MediaConverter(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent = nullptr); |
| 34 | ~cxx . . $ MediaConverter#`~MediaConverter`(ced63f7c635d850d).MediaConvertercxx . . $ MediaConverter#(); |
| 35 | |
| 36 | /*! |
| 37 | * Start the conversion process. |
| 38 | * @return If the process is successfully started, the function returns true |
| 39 | * Otherwise, the function returns false. |
| 40 | */ |
| 41 | bool startcxx . . $ MediaConverter#start(9fba30884eb7caae).(ConversionParameterscxx . . $ ConversionParameters# param); |
| 42 | |
| 43 | void stopcxx . . $ MediaConverter#stop(49f6e7a06ebc5aa8).(); |
| 44 | double progresscxx . . $ MediaConverter#progress(31fa7155c10fdd13).(); |
| 45 | |
| 46 | /*! |
| 47 | * Check whether required external programs (e.g. ffmpeg) |
| 48 | * is available. |
| 49 | * @param msg [out] Output message if an error occurs. |
| 50 | * @return true if all dependencies are met, false otherwise. |
| 51 | */ |
| 52 | static bool checkExternalProgramscxx . . $ MediaConverter#checkExternalPrograms(60608c8c3b163578).(QStringcxx . . $ QString# &msg); |
| 53 | |
| 54 | /*! |
| 55 | * Get the error message if the conversion fails. |
| 56 | * @return the last output line ffmpeg prints, likely to be |
| 57 | * an error message |
| 58 | */ |
| 59 | QStringcxx . . $ QString# errorMessagecxx . . $ MediaConverter#errorMessage(6ef7b6c27b00b43d).() const; |
| 60 | |
| 61 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 62 | void finishedcxx . . $ MediaConverter#finished(d4f767463ce0a6b3).(int exitcode); |
| 63 | void progressRefreshedcxx . . $ MediaConverter#progressRefreshed(d4f767463ce0a6b3).(int percentage); |
| 64 | |
| 65 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 66 | |
| 67 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 68 | void readProcessOutputcxx . . $ MediaConverter#readProcessOutput(49f6e7a06ebc5aa8).(); |
| 69 | void convertProgressFinishedcxx . . $ MediaConverter#convertProgressFinished(15c350e1a5203cbf).(int, QProcesscxx . . $ QProcess#::ExitStatuscxx . . $ QProcess#ExitStatus#); |
| 70 | void convertProgressRefreshedcxx . . $ MediaConverter#convertProgressRefreshed(ba8836b59fb42830).(double); |
| 71 | |
| 72 | private: |
| 73 | Q_DISABLE_COPYcxx . . $ MediaConverter#(MediaConverter) |
| 74 | QProcesscxx . . $ QProcess# m_proccxx . . $ MediaConverter#m_proc.; |
| 75 | ConversionParameterscxx . . $ ConversionParameters# m_convParamcxx . . $ MediaConverter#m_convParam.; |
| 76 | ConverterInterfacecxx . . $ ConverterInterface# *m_pConvcxx . . $ MediaConverter#m_pConv.; |
| 77 | AudioFiltercxx . . $ AudioFilter# *m_pAudioFiltercxx . . $ MediaConverter#m_pAudioFilter.; |
| 78 | QStringcxx . . $ QString# m_outputFileNamecxx . . $ MediaConverter#m_outputFileName.; |
| 79 | QStringcxx . . $ QString# m_tmpFileNamecxx . . $ MediaConverter#m_tmpFileName.; |
| 80 | bool m_stoppedcxx . . $ MediaConverter#m_stopped.; |
| 81 | }; |
| 82 | |
| 83 | #endif // MEDIACONVERTER_H |