Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2022 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef COMMON_H |
| 22 | #define COMMON_H |
| 23 | |
Aline Gondim Santos | 9bd153e | 2022-08-25 10:49:23 -0300 | [diff] [blame] | 24 | #include <fstream> |
Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 25 | #include <string> |
Aline Gondim Santos | 676d1c3 | 2022-12-05 21:13:25 -0300 | [diff] [blame^] | 26 | #include <vector> |
Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 27 | |
| 28 | namespace string_utils { |
Aline Gondim Santos | 4b62db1 | 2022-10-06 18:20:07 -0300 | [diff] [blame] | 29 | #ifdef WIN32 |
Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 30 | std::wstring to_wstring(const std::string& str); |
Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 31 | #endif // WIN32 |
Aline Gondim Santos | 4b62db1 | 2022-10-06 18:20:07 -0300 | [diff] [blame] | 32 | void ffmpegFormatStringInline(std::string& str); |
| 33 | std::string ffmpegFormatString(const std::string& str); |
Aline Gondim Santos | 329f862 | 2022-11-08 08:04:22 -0300 | [diff] [blame] | 34 | void ffmpegScapeStringInline(std::string& str); |
| 35 | std::string ffmpegScapeString(const std::string& str); |
Aline Gondim Santos | 676d1c3 | 2022-12-05 21:13:25 -0300 | [diff] [blame^] | 36 | std::vector<std::string> getWords(const std::string& text, const std::string& splits); |
Aline Gondim Santos | 4b62db1 | 2022-10-06 18:20:07 -0300 | [diff] [blame] | 37 | } // namespace string_utils |
Aline Gondim Santos | 9bd153e | 2022-08-25 10:49:23 -0300 | [diff] [blame] | 38 | |
| 39 | namespace file_utils { |
| 40 | void openStream(std::ifstream& file, const std::string& path); |
| 41 | } |
Aline Gondim Santos | 607635b | 2022-08-22 15:40:59 -0300 | [diff] [blame] | 42 | #endif // COMMON_H |