summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-16 00:50:12 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-16 00:57:23 +0200
commit2a7f3a1840bf2495656efff17a6c35ab3873b441 (patch)
treeaec803fbfced7c575a2fa0998e7be7fcbf1a2ea3 /src/lib
parent3bc9ca466dc3e9afaf290283d6895338f23c948d (diff)
Remove unused content pointer from change signals.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/content.cc4
-rw-r--r--src/lib/content.h2
-rw-r--r--src/lib/film.cc8
-rw-r--r--src/lib/film.h4
-rw-r--r--src/lib/player.cc2
-rw-r--r--src/lib/playlist.cc6
-rw-r--r--src/lib/playlist.h4
7 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 196288f4a..6bb7c02c9 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -192,9 +192,9 @@ Content::signal_change(ChangeType c, int p)
{
try {
if (c == ChangeType::PENDING || c == ChangeType::CANCELLED) {
- Change(c, shared_from_this(), p, _change_signals_frequent);
+ Change(c, p, _change_signals_frequent);
} else {
- emit(boost::bind(boost::ref(Change), c, shared_from_this(), p, _change_signals_frequent));
+ emit(boost::bind(boost::ref(Change), c, p, _change_signals_frequent));
}
} catch (std::bad_weak_ptr &) {
/* This must be during construction; never mind */
diff --git a/src/lib/content.h b/src/lib/content.h
index 7d7700999..d922da558 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -216,7 +216,7 @@ public:
bool has_mapped_audio() const;
/* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */
- boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> Change;
+ boost::signals2::signal<void (ChangeType, int, bool)> Change;
std::shared_ptr<VideoContent> video;
std::shared_ptr<AudioContent> audio;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index a1ab3ccf3..101a614ee 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -214,7 +214,7 @@ Film::Film(optional<boost::filesystem::path> dir)
_playlist_change_connection = _playlist->Change.connect(bind(&Film::playlist_change, this, _1));
_playlist_order_changed_connection = _playlist->OrderChange.connect(bind(&Film::playlist_order_changed, this));
- _playlist_content_change_connection = _playlist->ContentChange.connect(bind(&Film::playlist_content_change, this, _1, _2, _3, _4));
+ _playlist_content_change_connection = _playlist->ContentChange.connect(bind(&Film::playlist_content_change, this, _1, _2, _3));
_playlist_length_change_connection = _playlist->LengthChange.connect(bind(&Film::playlist_length_change, this));
if (dir) {
@@ -1597,7 +1597,7 @@ Film::active_frame_rate_change(DCPTime t) const
}
void
-Film::playlist_content_change(ChangeType type, weak_ptr<Content> c, int p, bool frequent)
+Film::playlist_content_change(ChangeType type, int p, bool frequent)
{
switch (p) {
case ContentProperty::VIDEO_FRAME_RATE:
@@ -1609,12 +1609,12 @@ Film::playlist_content_change(ChangeType type, weak_ptr<Content> c, int p, bool
}
if (type == ChangeType::DONE) {
- emit(boost::bind(boost::ref(ContentChange), type, c, p, frequent));
+ emit(boost::bind(boost::ref(ContentChange), type, p, frequent));
if (!frequent) {
check_settings_consistency();
}
} else {
- ContentChange(type, c, p, frequent);
+ ContentChange(type, p, frequent);
}
set_dirty(true);
diff --git a/src/lib/film.h b/src/lib/film.h
index c4c55a12a..8574c700f 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -444,7 +444,7 @@ public:
mutable boost::signals2::signal<void (ChangeType, FilmProperty)> Change;
/** Emitted when some property of our content has changed */
- mutable boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> ContentChange;
+ mutable boost::signals2::signal<void (ChangeType, int, bool)> ContentChange;
/** Emitted when the film's length might have changed; this is not like a normal
property as its value is derived from the playlist, so it has its own signal.
@@ -475,7 +475,7 @@ private:
void signal_change(ChangeType, int);
void playlist_change(ChangeType);
void playlist_order_changed();
- void playlist_content_change(ChangeType type, std::weak_ptr<Content>, int, bool frequent);
+ void playlist_content_change(ChangeType type, int, bool frequent);
void playlist_length_change();
void maybe_add_content(std::weak_ptr<Job>, std::vector<std::weak_ptr<Content>> const& weak_content, bool disable_audio_analysis);
void audio_analysis_finished();
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 53ce612e1..985bd3a9c 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -144,7 +144,7 @@ Player::connect()
be first.
*/
_playlist_change_connection = playlist()->Change.connect(bind(&Player::playlist_change, this, _1), boost::signals2::at_front);
- _playlist_content_change_connection = playlist()->ContentChange.connect(bind(&Player::playlist_content_change, this, _1, _3, _4));
+ _playlist_content_change_connection = playlist()->ContentChange.connect(bind(&Player::playlist_content_change, this, _1, _2, _3));
}
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index 7385c8ad5..8c60a5458 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -89,7 +89,7 @@ Playlist::~Playlist()
void
-Playlist::content_change(weak_ptr<const Film> weak_film, ChangeType type, weak_ptr<Content> content, int property, bool frequent)
+Playlist::content_change(weak_ptr<const Film> weak_film, ChangeType type, int property, bool frequent)
{
auto film = weak_film.lock();
DCPOMATIC_ASSERT(film);
@@ -133,7 +133,7 @@ Playlist::content_change(weak_ptr<const Film> weak_film, ChangeType type, weak_p
}
}
- ContentChange(type, content, property, frequent);
+ ContentChange(type, property, frequent);
}
@@ -516,7 +516,7 @@ Playlist::reconnect(shared_ptr<const Film> film)
disconnect();
for (auto i: _content) {
- _content_connections.push_back(i->Change.connect(boost::bind(&Playlist::content_change, this, film, _1, _2, _3, _4)));
+ _content_connections.push_back(i->Change.connect(boost::bind(&Playlist::content_change, this, film, _1, _2, _3)));
}
}
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index c26de5426..0d38cbf67 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -87,10 +87,10 @@ public:
/** Emitted when the length might have changed; may sometimes be emitted when it has not */
mutable boost::signals2::signal<void ()> LengthChange;
- mutable boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> ContentChange;
+ mutable boost::signals2::signal<void (ChangeType, int, bool)> ContentChange;
private:
- void content_change(std::weak_ptr<const Film>, ChangeType, std::weak_ptr<Content>, int, bool);
+ void content_change(std::weak_ptr<const Film>, ChangeType, int, bool);
void disconnect();
void reconnect(std::shared_ptr<const Film> film);