# Use distro-provided FFmpeg on Arch
deps = []
- deps.append(('libdcp', 'v1.8.92'))
+ deps.append(('libdcp', 'v1.8.93'))
deps.append(('libsub', 'v1.6.45'))
deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
deps.append(('rtaudio', 'f619b76'))
#include "audio_buffers.h"
#include "dcpomatic_assert.h"
#include "maths_util.h"
-#include "scope_guard.h"
+#include <dcp/scope_guard.h>
#include <cassert>
#include <cstring>
#include <cmath>
DCPOMATIC_ASSERT (frames >= 0);
DCPOMATIC_ASSERT(frames == 0 || channels > 0);
- ScopeGuard sg = [this]() { update_data_pointers(); };
+ dcp::ScopeGuard sg = [this]() { update_data_pointers(); };
_data.resize(channels);
for (int channel = 0; channel < channels; ++channel) {
{
DCPOMATIC_ASSERT(new_channels > 0);
- ScopeGuard sg = [this]() { update_data_pointers(); };
+ dcp::ScopeGuard sg = [this]() { update_data_pointers(); };
int const old_channels = channels();
_data.resize(new_channels);
#include "job.h"
#include "log.h"
#include "overlaps.h"
-#include "scope_guard.h"
#include "text_content.h"
#include "video_content.h"
#include <dcp/dcp.h>
#include <dcp/reel_picture_asset.h>
#include <dcp/reel_subtitle_asset.h>
#include <dcp/reel.h>
+#include <dcp/scope_guard.h>
#include <libxml++/libxml++.h>
#include <iterator>
#include <iostream>
string const old_name = name ();
ContentChangeSignalDespatcher::instance()->suspend();
- ScopeGuard sg = []() {
+ dcp::ScopeGuard sg = []() {
ContentChangeSignalDespatcher::instance()->resume();
};
+++ /dev/null
-/*
- Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- DCP-o-matic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#ifndef DCPOMATIC_SCOPE_GUARD_H
-#define DCPOMATIC_SCOPE_GUARD_H
-
-
-#include <functional>
-
-
-class ScopeGuard
-{
-public:
- template <typename F>
- ScopeGuard (F const& function)
- : _function(function)
- {}
-
- ScopeGuard (ScopeGuard&& other)
- : _function(std::move(other._function))
- {
- other._function = []{};
- }
-
- ScopeGuard (ScopeGuard const&) = delete;
- ScopeGuard& operator=(ScopeGuard const&) = delete;
-
- ~ScopeGuard ()
- {
- _function();
- }
-
-private:
- std::function<void()> _function;
-};
-
-
-#endif
-
#include "ratio.h"
#include "rect.h"
#include "render_text.h"
-#include "scope_guard.h"
#include "string_text.h"
#include "text_decoder.h"
#include "util.h"
#include <dcp/locale_convert.h>
#include <dcp/picture_asset.h>
#include <dcp/raw_convert.h>
+#include <dcp/scope_guard.h>
#include <dcp/sound_asset.h>
#include <dcp/subtitle_asset.h>
#include <dcp/util.h>
icu::Locale locale;
UErrorCode status = U_ZERO_ERROR;
auto iter = icu::BreakIterator::createLineInstance(locale, status);
- ScopeGuard sg = [iter]() { delete iter; };
+ dcp::ScopeGuard sg = [iter]() { delete iter; };
if (U_FAILURE(status)) {
return input;
}
#include "dcpomatic_assert.h"
#include "exceptions.h"
#include "image.h"
-#include "scope_guard.h"
#include "video_filter_graph.h"
+#include <dcp/scope_guard.h>
extern "C" {
#include <libavfilter/buffersrc.h>
#include <libavfilter/buffersink.h>
throw std::bad_alloc();
}
- ScopeGuard sg = [&frame]() { av_frame_free(&frame); };
+ dcp::ScopeGuard sg = [&frame]() { av_frame_free(&frame); };
for (int i = 0; i < image->planes(); ++i) {
frame->data[i] = image->data()[i];
#include "lib/player.h"
#include "lib/player_video.h"
#include "lib/ratio.h"
-#include "lib/scope_guard.h"
#include "lib/scoped_temporary.h"
#include "lib/server.h"
#include "lib/text_content.h"
#include <dcp/exceptions.h>
#include <dcp/filesystem.h>
#include <dcp/raw_convert.h>
+#include <dcp/scope_guard.h>
#include <dcp/search.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
DCPOMATIC_ASSERT (dcp);
try {
if (dcp) {
- ScopeGuard sg([this]() {
+ dcp::ScopeGuard sg([this]() {
_viewer.set_coalesce_player_changes(false);
});
_viewer.set_coalesce_player_changes(true);
#include "lib/image_content.h"
#include "lib/log.h"
#include "lib/playlist.h"
-#include "lib/scope_guard.h"
#include "lib/string_text_file.h"
#include "lib/string_text_file_content.h"
#include "lib/text_content.h"
#include "lib/video_content.h"
#include <dcp/filesystem.h>
+#include <dcp/scope_guard.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/display.h>
{
{
_no_check_selection = true;
- ScopeGuard sg = [this]() { _no_check_selection = false; };
+ dcp::ScopeGuard sg = [this]() { _no_check_selection = false; };
auto content = _film->content ();
for (size_t i = 0; i < content.size(); ++i) {
#include "lib/job.h"
#include "lib/job_manager.h"
#include "lib/player_video.h"
-#include "lib/scope_guard.h"
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel.h>
#include "wx_util.h"
#include "lib/content.h"
#include "lib/font.h"
-#include "lib/scope_guard.h"
#include "lib/text_content.h"
#include <dcp/filesystem.h>
#include <dcp/warnings.h>
#include "language_tag_dialog.h"
#include "language_tag_widget.h"
#include "wx_util.h"
-#include "lib/scope_guard.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include "region_subtag_dialog.h"
#include "region_subtag_widget.h"
#include "wx_util.h"
-#include "lib/scope_guard.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include "table_dialog.h"
#include "wx_util.h"
#include "lib/compose.hpp"
-#include "lib/scope_guard.h"
#include "lib/util.h"
#include <dcp/warnings.h>
#include <dcp/exceptions.h>
#include "wx_util.h"
#include "lib/cinema.h"
#include "lib/config.h"
-#include "lib/scope_guard.h"
#include "lib/screen.h"
#include "lib/timer.h"
+#include <dcp/scope_guard.h>
using std::cout;
try {
_ignore_cinemas_changed = true;
- ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
+ dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
Config::instance()->add_cinema(cinema);
} catch (FileError& e) {
error_dialog(GetParent(), _("Could not write cinema details to the cinemas.xml file. Check that the location of cinemas.xml is valid in DCP-o-matic's preferences."), std_to_wx(e.what()));
for (auto const& cinema: cinemas_to_remove) {
_ignore_cinemas_changed = true;
- ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
+ dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
for (auto screen: cinema->screens()) {
_checked_screens.erase(screen);
}
ScreensPanel::notify_cinemas_changed()
{
_ignore_cinemas_changed = true;
- ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
+ dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
try {
Config::instance()->changed(Config::CINEMAS);
#include "lib/ffmpeg_subtitle_stream.h"
#include "lib/film.h"
#include "lib/job_manager.h"
-#include "lib/scope_guard.h"
#include "lib/string_text_file_content.h"
#include "lib/string_text_file_decoder.h"
#include "lib/subtitle_analysis.h"
#include "lib/text_content.h"
#include <dcp/filesystem.h>
+#include <dcp/scope_guard.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/spinctrl.h>
}
_loading_analysis = true;
- ScopeGuard sg = [this]() {
+ dcp::ScopeGuard sg = [this]() {
_loading_analysis = false;
setup_sensitivity();
};
#include "lib/film.h"
#include "lib/image_content.h"
#include "lib/playlist.h"
-#include "lib/scope_guard.h"
#include "lib/text_content.h"
#include "lib/timer.h"
#include "lib/video_content.h"
+#include <dcp/scope_guard.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/graphics.h>
return;
}
- ScopeGuard sg = [gc]() { delete gc; };
+ dcp::ScopeGuard sg = [gc]() { delete gc; };
int vsx, vsy;
_labels_canvas->GetViewStart (&vsx, &vsy);
return;
}
- ScopeGuard sg = [gc]() { delete gc; };
+ dcp::ScopeGuard sg = [gc]() { delete gc; };
gc->SetAntialiasMode (wxANTIALIAS_DEFAULT);
#include "lib/ffmpeg_content.h"
#include "lib/film.h"
#include "lib/image_content.h"
-#include "lib/scope_guard.h"
#include "lib/string_text_file_content.h"
#include "lib/text_content.h"
#include "lib/video_content.h"
+++ /dev/null
-/*
- Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- DCP-o-matic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "lib/scope_guard.h"
-#include <boost/test/unit_test.hpp>
-
-
-BOOST_AUTO_TEST_CASE (scope_guard_test)
-{
- int x = 0;
-
- {
- ScopeGuard sg = [&x]() { x = 42; };
- BOOST_CHECK_EQUAL (x, 0);
- }
-
- BOOST_CHECK_EQUAL (x, 42);
-}
remake_with_subtitle_test.cc
render_subtitles_test.cc
scaling_test.cc
- scope_guard_test.cc
scoped_temporary_test.cc
silence_padding_test.cc
shuffler_test.cc