| 1 | /***************************************************************************** |
| 2 | ** QNapi |
| 3 | ** Copyright (C) 2008-2017 Piotr KrzemiĆski <[email protected]> |
| 4 | ** |
| 5 | ** This program is free software; you can redistribute it and/or modify |
| 6 | ** it under the terms of the GNU General Public License as published by |
| 7 | ** the Free Software Foundation; either version 2 of the License, or |
| 8 | ** (at your option) any later version. |
| 9 | ** |
| 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | ** |
| 13 | *****************************************************************************/ |
| 14 | |
| 15 | #ifndef SUBTITLECONVERTER_H |
| 16 | #define SUBTITLECONVERTER_Hcxx . . $ `libqnapi/src/subconvert/subtitleconverter.h:16:9`! |
| 17 | |
| 18 | #include "movieinfo/movieinfoprovider.h"cxx . . $ `<file>/libqnapi/src/movieinfo/movieinfoprovider.h`/ |
| 19 | #include "subconvert/subtitleformatsregistry.h"cxx . . $ `<file>/libqnapi/src/subconvert/subtitleformatsregistry.h`/ |
| 20 | |
| 21 | #include <QSharedPointer> |
| 22 | #include <QString> |
| 23 | #include <QStringList> |
| 24 | #include <functional> |
| 25 | |
| 26 | class SubtitleConvertercxx . . $ SubtitleConverter# { |
| 27 | public: |
| 28 | SubtitleConvertercxx . . $ SubtitleConverter#SubtitleConverter(e7da51e773c7d646).( |
| 29 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#> subtitleFormatsRegistry, |
| 30 | QSharedPointercxx . . $ QSharedPointer#<const MovieInfoProvidercxx . . $ MovieInfoProvider#> movieInfoProvider, |
| 31 | bool skipConvertAds); |
| 32 | |
| 33 | QStringcxx . . $ QString# detectFormatcxx . . $ SubtitleConverter#detectFormat(5555d9024dcf93fb).(const QStringcxx . . $ QString# &subtitleFile) const; |
| 34 | QStringcxx . . $ QString# detectFormatcxx . . $ SubtitleConverter#detectFormat(ea5597cae5d7a1b8).(const QStringListcxx . . $ QStringList# &subtitleLines) const; |
| 35 | |
| 36 | bool convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(10bb6b406c18274a).(QStringcxx . . $ QString# subtitleFile, QStringcxx . . $ QString# targetFormatName, |
| 37 | QStringcxx . . $ QString# targetFileName, double movieFPS, |
| 38 | double fpsRatio, double delayOffset) const; |
| 39 | |
| 40 | bool convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(129342b27da0d956).(QStringcxx . . $ QString# subtitleFile, QStringcxx . . $ QString# targetFormatName, |
| 41 | QStringcxx . . $ QString# targetFileName, QStringcxx . . $ QString# movieFile) const; |
| 42 | |
| 43 | bool convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(de2c2ef8ecb8f9e4).(QStringcxx . . $ QString# subtitleFile, QStringcxx . . $ QString# targetFormatName, |
| 44 | QStringcxx . . $ QString# targetFileName, |
| 45 | stdcxx . . $ std/::functioncxx . . $ std/function#<double()> determineFPS, |
| 46 | double fpsRatio = 1.0, double delayOffset = 0.0) const; |
| 47 | |
| 48 | private: |
| 49 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#> subtitleFormatsRegistrycxx . . $ SubtitleConverter#subtitleFormatsRegistry.; |
| 50 | QSharedPointercxx . . $ QSharedPointer#<const MovieInfoProvidercxx . . $ MovieInfoProvider#> movieInfoProvidercxx . . $ SubtitleConverter#movieInfoProvider.; |
| 51 | bool skipConvertAdscxx . . $ SubtitleConverter#skipConvertAds.; |
| 52 | |
| 53 | long ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(long ts, double frameRate) const; |
| 54 | long frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(long frame, double frameRate) const; |
| 55 | |
| 56 | QStringListcxx . . $ QStringList# readFilecxx . . $ SubtitleConverter#readFile(42e916d7bc97fdf0).(const QStringcxx . . $ QString# &filename, QStringcxx . . $ QString# encoding, |
| 57 | long atMostLines = 0) const; |
| 58 | bool writeFilecxx . . $ SubtitleConverter#writeFile(821ce6828a1cb21a).(const QStringcxx . . $ QString# &filename, QStringcxx . . $ QString# encoding, |
| 59 | const QStringListcxx . . $ QStringList# &lines) const; |
| 60 | }; |
| 61 | |
| 62 | #endif // SUBTITLECONVERTER_H |