/dports/multimedia/aegisub/aegisub-3.2.2/tests/tests/ |
H A D | color.cpp | 25 namespace agi { namespace 33 EXPECT_EQ(agi::Color(0, 0, 0), agi::Color("#000")); in TEST() 34 EXPECT_EQ(agi::Color(0, 0, 0), agi::Color("#000000")); in TEST() 35 EXPECT_EQ(agi::Color(255, 255, 255), agi::Color("#FFFFFF")); in TEST() 36 EXPECT_EQ(agi::Color(255, 255, 255), agi::Color("#FFF")); in TEST() 37 EXPECT_EQ(agi::Color(255, 0, 127), agi::Color("#FF007F")); in TEST() 38 EXPECT_EQ(agi::Color(16, 32, 48), agi::Color("#102030")); in TEST() 47 EXPECT_EQ(agi::Color(0, 0, 0), agi::Color("rgb(0, 0, 0)")); in TEST() 65 EXPECT_EQ(agi::Color(255, 255, 255), agi::Color("FFFFFF")); in TEST() 66 EXPECT_EQ(agi::Color(48, 32, 16), agi::Color("&H102030&")); in TEST() [all …]
|
H A D | format.cpp | 37 EXPECT_EQ("a", agi::format("%c", 'a')); in TEST() 42 EXPECT_EQ("10", agi::format("%i", 10)); in TEST() 43 EXPECT_EQ("10", agi::format("%d", 10)); in TEST() 45 EXPECT_EQ("1", agi::format("%d", 1.1)); in TEST() 46 EXPECT_EQ("97", agi::format("%d", 'a')); in TEST() 56 EXPECT_EQ("10", agi::format("%u", 10)); in TEST() 76 EXPECT_EQ("10", agi::format("%g", 10)); in TEST() 81 EXPECT_EQ("%d", agi::format("%%d")); in TEST() 82 EXPECT_EQ("%d", agi::format("%%d", 5)); in TEST() 137 EXPECT_EQ("/usr/bin", agi::format("%s", agi::fs::path("/usr/bin"))); in TEST() [all …]
|
H A D | character_count.cpp | 23 EXPECT_EQ(5, agi::CharacterCount("hello", agi::IGNORE_NONE)); in TEST() 27 EXPECT_EQ(4, agi::CharacterCount("ドングズ", agi::IGNORE_NONE)); in TEST() 35 EXPECT_EQ(11, agi::CharacterCount("{asdf}hello", agi::IGNORE_NONE)); in TEST() 36 EXPECT_EQ(10, agi::CharacterCount("{asdfhello", agi::IGNORE_NONE)); in TEST() 41 EXPECT_EQ(6, agi::CharacterCount("hello.", agi::IGNORE_NONE)); in TEST() 46 EXPECT_EQ(10, agi::CharacterCount("h e l l o ", agi::IGNORE_NONE)); in TEST() 51 EXPECT_EQ(5, agi::CharacterCount("{asdf}hello.", agi::IGNORE_PUNCTUATION | agi::IGNORE_BLOCKS)); in TEST() 55 EXPECT_EQ(5, agi::MaxLineLength("hello", agi::IGNORE_NONE)); in TEST() 56 EXPECT_EQ(5, agi::MaxLineLength("hello\\Nasdf", agi::IGNORE_NONE)); in TEST() 57 EXPECT_EQ(5, agi::MaxLineLength("hello\\nasdf", agi::IGNORE_NONE)); in TEST() [all …]
|
H A D | option.cpp | 50 EXPECT_NO_THROW(agi::Options(conf_ok, default_opt, agi::Options::FLUSH_SKIP)); in TEST_F() 54 EXPECT_NO_THROW(agi::Options("", default_opt, agi::Options::FLUSH_SKIP)); in TEST_F() 58 agi::Options opt(conf_ok, default_opt, agi::Options::FLUSH_SKIP); in TEST_F() 65 agi::Options opt(conf_ok, default_opt, agi::Options::FLUSH_SKIP); in TEST_F() 72 agi::Options opt("data/options/tmp", default_opt, agi::Options::FLUSH_SKIP); in TEST_F() 94 agi::Options opt("", all_types, agi::Options::FLUSH_SKIP); in TEST_F() 104 EXPECT_THROW(agi::Options("", "{\"Null\" : null}", agi::Options::FLUSH_SKIP), agi::Exception); in TEST_F() 109 ASSERT_NO_THROW(agi::Options("", conf, agi::Options::FLUSH_SKIP)); in TEST_F() 110 agi::Options opt("", conf, agi::Options::FLUSH_SKIP); in TEST_F() 122 agi::Options opt("", all_types, agi::Options::FLUSH_SKIP); in TEST_F() [all …]
|
H A D | audio.cpp | 105 agi::fs::Remove(path); in TEST() 117 agi::fs::Remove(path); in TEST() 168 …auto provider = agi::CreateHDAudioProvider(agi::make_unique<TestAudioProvider<>>(), agi::Path().De… in TEST() 329 agi::fs::Remove(path); in TEST() 359 agi::fs::Remove(path); in TEST() 370 agi::fs::Remove(path); in TEST() 371 ASSERT_THROW(agi::CreatePCMAudioProvider(path, nullptr), agi::fs::FileNotFound); in TEST() 405 agi::fs::Remove(path); in TEST() 436 agi::fs::Remove(path); in TEST() 462 agi::fs::Remove(path); in TEST() [all …]
|
H A D | mru.cpp | 28 agi::MRUManager mru(conf_ok, default_mru); in TEST() 38 agi::fs::Remove("data/mru_tmp"); in TEST() 39 agi::MRUManager mru("data/mru_tmp", default_mru); in TEST() 44 agi::MRUManager mru("data/mru_tmp", default_mru); in TEST() 67 EXPECT_THROW(mru.Get("Invalid"), agi::MRUError); in TEST() 77 agi::fs::Remove("data/mru_tmp"); in TEST() 94 agi::fs::Remove("data/mru_tmp"); in TEST() 106 agi::fs::Remove("data/mru_tmp"); in TEST() 119 agi::Options options("", opt, agi::Options::FLUSH_SKIP); in TEST() 121 agi::fs::Remove("data/mru_tmp"); in TEST() [all …]
|
/dports/multimedia/aegisub/aegisub-3.2.2/src/ |
H A D | project.h | 29 namespace agi { struct Context; } 35 agi::vfr::Framerate timecodes; 38 agi::fs::path audio_file; 39 agi::fs::path video_file; 40 agi::fs::path timecodes_file; 41 agi::fs::path keyframes_file; 43 agi::signal::Signal<agi::AudioProvider *> AnnounceAudioProviderModified; 45 agi::signal::Signal<agi::vfr::Framerate const&> AnnounceTimecodesModified; 50 agi::Context *context = nullptr; 66 void SetPath(agi::fs::path& var, const char *token, const char *mru, agi::fs::path const& value); [all …]
|
H A D | audio_provider_ffmpegsource.cpp | 54 void LoadAudio(agi::fs::path const& filename); 61 FFmpegSourceAudioProvider(agi::fs::path const& filename, agi::BackgroundRunner *br); 68 FFmpegSourceAudioProvider::FFmpegSourceAudioProvider(agi::fs::path const& filename, agi::Background… in FFmpegSourceAudioProvider() 80 catch (agi::EnvironmentError const& err) { 81 throw agi::AudioProviderError(err.GetMessage()); 88 throw agi::fs::FileNotFound(std::string(ErrInfo.Buffer)); in LoadAudio() 90 throw agi::AudioDataNotFound(ErrInfo.Buffer); in LoadAudio() 107 throw agi::AudioDataNotFound("no audio tracks found"); in LoadAudio() 110 agi::fs::path CacheName = GetCacheFilename(filename); in LoadAudio() 145 agi::fs::Touch(CacheName); in LoadAudio() [all …]
|
H A D | dialogs.h | 27 namespace agi { struct Context; } 36 bool GetColorFromUser(wxWindow *parent, agi::Color original, bool alpha, std::function<void (agi::C… 61 void ShowSelectLinesDialog(agi::Context *c); 62 void ShowExportDialog(agi::Context *c); 63 void ShowPropertiesDialog(agi::Context *c); 66 void ShowKanjiTimerDialog(agi::Context *c); 68 void ShowSpellcheckerDialog(agi::Context *c); 69 void ShowShiftTimesDialog(agi::Context *c); 72 void ShowJumpToDialog(agi::Context *c); 74 void ShowLogWindow(agi::Context *c); [all …]
|
H A D | subs_controller.h | 25 namespace agi { struct Context; } 30 agi::Context *context; 31 agi::signal::Connection undo_connection; 33 agi::signal::Connection selection_connection; 51 agi::signal::Signal<agi::fs::path> FileOpen; 53 agi::signal::Signal<> FileSave; 56 agi::fs::path filename; 67 SubsController(agi::Context *context); 77 agi::fs::path Filename() const; 102 agi::fs::path AutoSave(); [all …]
|
H A D | main.cpp | 76 agi::Options *opt = nullptr; 77 agi::MRUManager *mru = nullptr; 78 agi::Path *path = nullptr; 148 agi::dispatch::Init([this](agi::dispatch::Thunk f) { in OnInit() 163 config::path = new agi::Path; in OnInit() 166 agi::log::log = new agi::log::LogSink; in OnInit() 168 agi::log::log->Subscribe(agi::make_unique<agi::log::EmitSTDOUT>()); in OnInit() 193 agi::log::log->Subscribe(agi::make_unique<agi::log::JsonEmitter>(path_log)); in OnInit() 202 } catch (agi::Exception& e) { in OnInit() 366 delete agi::log::log; in OnExit() [all …]
|
H A D | spellchecker_hunspell.cpp | 52 catch (agi::charset::ConvError const&) { in CanAddWord() 91 auto stream = agi::io::Open(userDicPath); in ReadUserDictionary() 93 ++agi::line_iterator<std::string>(*stream), agi::line_iterator<std::string>(), in ReadUserDictionary() 97 catch (agi::fs::FileNotFound const&) { in ReadUserDictionary() 108 agi::io::Save writer(userDicPath); in WriteUserDictionary() 125 catch (agi::charset::ConvError const&) { in CheckWord() 177 static bool check_path(agi::fs::path const& path, std::string const& language, agi::fs::path& aff, … in check_path() 180 return agi::fs::FileExists(aff) && agi::fs::FileExists(dic); in check_path() 189 agi::fs::path aff, dic; in OnLanguageChanged() 207 conv = agi::make_unique<agi::charset::IconvWrapper>("utf-8", hunspell->get_dic_encoding()); in OnLanguageChanged() [all …]
|
H A D | audio_provider_avs.cpp | 53 class AvisynthAudioProvider final : public agi::AudioProvider { 61 AvisynthAudioProvider(agi::fs::path const& filename); 66 AvisynthAudioProvider::AvisynthAudioProvider(agi::fs::path const& filename) { in AvisynthAudioProvider() 67 agi::acs::CheckFileRead(filename); in AvisynthAudioProvider() 75 if (agi::fs::HasExtension(filename, "avs")) in AvisynthAudioProvider() 84 if (agi::fs::FileExists(dsspath)) in AvisynthAudioProvider() 98 throw agi::AudioDataNotFound("Avisynth error: " + errmsg); in AvisynthAudioProvider() 100 throw agi::AudioProviderError("Avisynth error: " + errmsg); in AvisynthAudioProvider() 107 if (!vi.HasAudio()) throw agi::AudioDataNotFound("No audio found."); in LoadFromClip() 146 std::unique_ptr<agi::AudioProvider> CreateAvisynthAudioProvider(agi::fs::path const& file, agi::Bac… in CreateAvisynthAudioProvider() [all …]
|
H A D | subtitle_format.h | 39 namespace agi { namespace vfr { class Framerate; } } 68 …static agi::vfr::Framerate AskForFPS(bool allow_vfr, bool show_smpte, agi::vfr::Framerate const& f… 83 virtual bool CanReadFile(agi::fs::path const& filename, std::string const& encoding) const; 89 virtual bool CanWriteFile(agi::fs::path const& filename) const; 101 …virtual void ReadFile(AssFile *target, agi::fs::path const& filename, agi::vfr::Framerate const& f… in ReadFile() 107 …virtual void WriteFile(const AssFile *src, agi::fs::path const& filename, agi::vfr::Framerate cons… 114 …virtual void ExportFile(const AssFile *src, agi::fs::path const& filename, agi::vfr::Framerate con… 123 static const SubtitleFormat *GetReader(agi::fs::path const& filename, std::string const& encoding); 125 static const SubtitleFormat *GetWriter(agi::fs::path const& filename); 130 DEFINE_EXCEPTION(SubtitleFormatParseError, agi::InvalidInputException); [all …]
|
H A D | video_provider_manager.cpp | 28 …d::unique_ptr<VideoProvider> CreateDummyVideoProvider(agi::fs::path const&, std::string const&, ag… 29 …unique_ptr<VideoProvider> CreateYUV4MPEGVideoProvider(agi::fs::path const&, std::string const&, ag… 30 …ue_ptr<VideoProvider> CreateFFmpegSourceVideoProvider(agi::fs::path const&, std::string const&, ag… 31 …unique_ptr<VideoProvider> CreateAvisynthVideoProvider(agi::fs::path const&, std::string const&, ag… 38 …std::unique_ptr<VideoProvider> (*create)(agi::fs::path const&, std::string const&, agi::Background… 58 …rovider> VideoProviderFactory::GetProvider(agi::fs::path const& filename, std::string const& color… in GetProvider() 75 catch (agi::fs::FileNotFound const&) { in GetProvider() 88 catch (agi::vfr::Error const& ex) { in GetProvider() 101 if (!found) throw agi::fs::FileNotFound(filename.string()); in GetProvider()
|
H A D | grid_column.cpp | 55 void GridColumn::UpdateWidth(const agi::Context *c, WidthHelper &helper) { in UpdateWidth() 90 int Width(const agi::Context *c, WidthHelper &helper) const override { in Width() 114 int Width(const agi::Context *c, WidthHelper &helper) const override { in Width() 137 int Width(const agi::Context *c, WidthHelper &helper) const override { in Width() 155 int Width(const agi::Context *c, WidthHelper &helper) const override { in Width() 282 int ignore = agi::IGNORE_BLOCKS; in CPS() 284 ignore |= agi::IGNORE_WHITESPACE; in CPS() 286 ignore |= agi::IGNORE_PUNCTUATION; in CPS() 288 return agi::CharacterCount(text, ignore) * 1000 / duration; in CPS() 320 const agi::OptionValue *override_mode; [all …]
|
/dports/multimedia/aegisub/aegisub-3.2.2/src/command/ |
H A D | audio.cpp | 69 void operator()(agi::Context *c) override { in CMD_ICON() 81 void operator()(agi::Context *c) override { in CMD_ICON() 141 void operator()(agi::Context *) override { in operator ()() 157 void operator()(agi::Context *) override { in operator ()() 180 agi::Time start = INT_MAX, end = 0; in operator ()() 540 reg(agi::make_unique<audio_close>()); in init_audio() 541 reg(agi::make_unique<audio_commit>()); in init_audio() 545 reg(agi::make_unique<audio_go_to>()); in init_audio() 546 reg(agi::make_unique<audio_karaoke>()); in init_audio() 547 reg(agi::make_unique<audio_open>()); in init_audio() [all …]
|
H A D | video.cpp | 93 void operator()(agi::Context *c) override { in operator ()() 111 void operator()(agi::Context *c) override { in operator ()() 129 if (agi::util::try_parse(chunks[0], &num) && agi::util::try_parse(chunks[1], &den)) in operator ()() 461 agi::fs::path basepath; in save_snapshot() 492 } while (agi::fs::FileExists(path)); in save_snapshot() 746 reg(agi::make_unique<video_close>()); in init_video() 749 reg(agi::make_unique<video_detach>()); in init_video() 764 reg(agi::make_unique<video_jump>()); in init_video() 767 reg(agi::make_unique<video_open>()); in init_video() 770 reg(agi::make_unique<video_play>()); in init_video() [all …]
|
H A D | app.cpp | 62 void operator()(agi::Context *c) override { in CMD_ICON() 74 void operator()(agi::Context *c) override { in operator ()() 94 void operator()(agi::Context *c) override { in operator ()() 213 } catch (agi::Exception& e) { in CMD_ICON() 273 reg(agi::make_unique<app_about>()); in init_app() 278 reg(agi::make_unique<app_exit>()); in init_app() 279 reg(agi::make_unique<app_language>()); in init_app() 280 reg(agi::make_unique<app_log>()); in init_app() 281 reg(agi::make_unique<app_new_window>()); in init_app() 282 reg(agi::make_unique<app_options>()); in init_app() [all …]
|
H A D | tool.cpp | 62 void operator()(agi::Context *) override { in CMD_ICON() 74 void operator()(agi::Context *c) override { in CMD_ICON() 87 void operator()(agi::Context *c) override { in CMD_ICON() 99 void operator()(agi::Context *c) override { in CMD_ICON() 111 void operator()(agi::Context *c) override { in CMD_ICON() 126 void operator()(agi::Context *c) override { in CMD_ICON() 145 void operator()(agi::Context *c) override { in operator ()() 156 void operator()(agi::Context *c) override { in operator ()() 168 void operator()(agi::Context *c) override { in CMD_ICON() 281 reg(agi::make_unique<tool_export>()); in init_tool() [all …]
|
H A D | time.cpp | 108 void operator()(agi::Context *c) override { in operator ()() 119 void operator()(agi::Context *c) override { in operator ()() 131 void operator()(agi::Context *c) override { in CMD_ICON() 156 void operator()(agi::Context *c) override { in CMD_ICON() 185 void operator()(agi::Context *c) override { in CMD_ICON() 197 void operator()(agi::Context *c) override { in CMD_ICON() 241 void operator()(agi::Context *c) override { in operator ()() 388 reg(agi::make_unique<time_next>()); in init_time() 389 reg(agi::make_unique<time_prev>()); in init_time() 390 reg(agi::make_unique<time_shift>()); in init_time() [all …]
|
H A D | grid.cpp | 55 void operator()(agi::Context *c) override { in operator ()() 67 void operator()(agi::Context *c) override { in CMD_ICON() 94 void operator()(agi::Context *c) override { in operator ()() 105 void operator()(agi::Context *c) override { in operator ()() 125 void operator()(agi::Context *c) override { in operator ()() 405 reg(agi::make_unique<grid_line_next>()); in init_grid() 407 reg(agi::make_unique<grid_line_prev>()); in init_grid() 410 reg(agi::make_unique<grid_sort_end>()); in init_grid() 420 reg(agi::make_unique<grid_move_down>()); in init_grid() 421 reg(agi::make_unique<grid_move_up>()); in init_grid() [all …]
|
H A D | subtitle.cpp | 82 void operator()(agi::Context *c) override { in CMD_ICON() 95 void operator()(agi::Context *c) override { in CMD_ICON() 108 void operator()(agi::Context *c) override { in CMD_ICON() 137 void operator()(agi::Context *c) override { in operator ()() 171 void operator()(agi::Context *c) override { in operator ()() 310 static void save_subtitles(agi::Context *c, agi::fs::path filename) { in save_subtitles() 322 catch (const agi::Exception& err) { in save_subtitles() 421 reg(agi::make_unique<subtitle_find>()); in init_subtitle() 427 reg(agi::make_unique<subtitle_new>()); in init_subtitle() 428 reg(agi::make_unique<subtitle_open>()); in init_subtitle() [all …]
|
H A D | recent.cpp | 55 void operator()(agi::Context *c, int id) { in operator ()() 66 void operator()(agi::Context *c, int id) { in operator ()() 77 void operator()(agi::Context *c, int id) { in operator ()() 89 void operator()(agi::Context *c, int id) { in operator ()() 100 void operator()(agi::Context *c, int id) { in operator ()() 111 void operator()(agi::Context *c) { in operator ()() 120 reg(agi::make_unique<recent_audio>()); in init_recent() 121 reg(agi::make_unique<recent_keyframes>()); in init_recent() 122 reg(agi::make_unique<recent_subtitle>()); in init_recent() 123 reg(agi::make_unique<recent_timecodes>()); in init_recent() [all …]
|
H A D | edit.cpp | 329 agi::Color initial_color; in show_color_picker() 387 void operator()(agi::Context *c) override { in CMD_ICON() 399 void operator()(agi::Context *c) override { in CMD_ICON() 545 static void copy_lines(agi::Context *c) { in copy_lines() 1261 reg(agi::make_unique<edit_font>()); in init_edit() 1263 reg(agi::make_unique<edit_line_copy>()); in init_edit() 1264 reg(agi::make_unique<edit_line_cut>()); in init_edit() 1283 reg(agi::make_unique<edit_redo>()); in init_edit() 1284 reg(agi::make_unique<edit_undo>()); in init_edit() 1285 reg(agi::make_unique<edit_revert>()); in init_edit() [all …]
|