debug.
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Jan 2022 10:50:31 +0000 (10:50 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 24 Nov 2023 20:59:45 +0000 (21:59 +0100)
features/step_definitions/dcpomatic.cc
run/cucumber
src/lib/examine_content_job.cc
src/lib/film.cc
src/lib/job.cc
src/tools/dcpomatic.cc
src/wx/content_panel.cc
src/wx/cucumber_bridge.cc

index 517e87a7fdf1ba2309f0ab05a45ee20d9bd4b4b6..6fb6a858b30919c4048f1a79f56674f49dd6f535 100644 (file)
@@ -124,7 +124,7 @@ WHEN("^I add file (.+) as content$") {
 THEN("^the result should be only (.+) in the content list$") {
        REGEX_PARAM(string, entry);
        ScenarioScope<DoMCtx> context;
-       vector<string> content = context->content_list ();
+       auto content = context->content_list ();
        BOOST_CHECK_EQUAL (content.size(), 1);
        BOOST_CHECK_EQUAL (content.front(), entry);
 }
index 7b907e171e021c8a44c29325c647d92c461952b4..5ea67799aeba2ce93125106ae34385b55587b897 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 export LD_LIBRARY_PATH=build/src/lib:build/src/wx:$LD_LIBRARY_PATH
+export DCPOMATIC_GRAPHICS=$DIR/../graphics
 
 build/features/dcpomatic_cucumber &
 sleep 5
index baa11ac93218820152ab5f3230d110fa0a9446df..b12983f2d5f4c87cbc3de7c23f808e459c2b295d 100644 (file)
@@ -38,7 +38,7 @@ ExamineContentJob::ExamineContentJob (shared_ptr<const Film> film, shared_ptr<Co
        : Job (film)
        , _content (c)
 {
-
+       std::cout << "ECJ star.\n";
 }
 
 
index 7ba245422a94329c0e54788d075101db2687f86c..792ec583aa241070c0e5438e4f3681bacfdd4b4b 100644 (file)
@@ -1340,15 +1340,21 @@ Film::content () const
 void
 Film::examine_and_add_content (shared_ptr<Content> content, bool disable_audio_analysis)
 {
+       std::cout << "hello mum.\n";
        if (dynamic_pointer_cast<FFmpegContent> (content) && _directory) {
-               run_ffprobe (content->path(0), file("ffprobe.log"));
+               // run_ffprobe (content->path(0), file("ffprobe.log"));
        }
+       std::cout << "fuck\n";
+       auto x = shared_from_this();
+       std::cout << "sft worked.\n";
 
        auto j = make_shared<ExamineContentJob>(shared_from_this(), content);
+       std::cout << "shit\n";
 
        _job_connections.push_back (
                j->Finished.connect (bind (&Film::maybe_add_content, this, weak_ptr<Job>(j), weak_ptr<Content>(content), disable_audio_analysis))
                );
+       std::cout << "muthefucka";
 
        JobManager::instance()->add (j);
 }
index 9c9530b7ad9bf16e89eaa08a110e1374ea20319d..119d0ba787f5fcecc09f94cf56320c926f148e66 100644 (file)
@@ -61,7 +61,7 @@ Job::Job (shared_ptr<const Film> film)
        , _progress (0)
        , _rate_limit_progress(true)
 {
-
+       std::cout << "uzi lover.\n";
 }
 
 
index 7cc77d1fe954e647f738f3696a36e8d758345680..d4e8bf217ad6295e5854095bb4cb6e674d59a1d6 100644 (file)
@@ -524,11 +524,13 @@ public:
 
 #ifdef DCPOMATIC_CUCUMBER
        void cucumber_add_content_file (string filename) {
+               std::cout << ".cucumber_add_content_file\n";
                _film_editor->cucumber_add_content_file (filename);
        }
 
        /* Could be called from any thread */
        std::string cucumber_get_content_list () {
+               std::cout << ".cucumber_get_content_list\n";
                return _film_editor->cucumber_get_content_list();
        }
 #endif
index bfbaf7fe292a8b90e393eb845e76bfbfafddbba0..5ba21dad05f0047327b91d6a9f7c8fa640d920d4 100644 (file)
@@ -973,11 +973,16 @@ ContentPanel::add_files (vector<boost::filesystem::path> paths)
 
        try {
                for (auto i: paths) {
+                       std::cout << "here I am adding " << i << "\n";
                        for (auto j: content_factory(i)) {
+                               std::cout << "add " << j << "\n";
                                _film->examine_and_add_content (j);
+                               std::cout << "add done.\n";
                        }
+                       std::cout << "that's done.\n";
                }
        } catch (exception& e) {
+               std::cout << "that threw.\n";
                error_dialog (_parent, e.what());
        }
 }
@@ -1021,13 +1026,18 @@ ContentPanel::window() const
 void
 ContentPanel::cucumber_add_content_file (string filename)
 {
+       std::cout << "CP::cucumber_add_content_file\n";
        add_files ({filename});
        auto jm = JobManager::instance ();
        while (jm->work_to_do()) {
+               std::cout << "work to do.\n";
                while (signal_manager->ui_idle()) {}
                dcpomatic_sleep_seconds (1);
        }
-       while (signal_manager->ui_idle()) {}
+       while (signal_manager->ui_idle()) {
+               std::cout << "ui idle.\n";
+       }
+       std::cout << "CP::cucumber_add_content_file done\n";
 }
 
 
index 976181935a786d63162baf5263e027cc236a859d..fd5e3f4ffdb29988d357ff3af9244a08d1324473 100644 (file)
@@ -44,11 +44,13 @@ CucumberBridge::listener ()
        nanomsg.send (CUCUMBER_BRIDGE_READY "\n", -1);
 
        while (true) {
-               optional<string> message = nanomsg.receive (-1);
+               auto message = nanomsg.receive (-1);
                if (!message) {
                        continue;
                }
 
+               std::cout << "CB receives " << *message << "\n";
+
                if (*message == CUCUMBER_BRIDGE_CLICK_BUTTON) {
                        emit (bind(boost::ref(ClickButton), get_parameter(nanomsg)));
                } else if (*message == CUCUMBER_BRIDGE_SELECT_MENU) {
@@ -67,7 +69,7 @@ CucumberBridge::listener ()
 string
 CucumberBridge::get_parameter (Nanomsg& nanomsg)
 {
-       optional<string> p = nanomsg.receive (100);
+       auto p = nanomsg.receive (100);
        DCPOMATIC_ASSERT (p);
        return *p;
 }