summaryrefslogtreecommitdiff
path: root/src/lib/playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-19 12:10:37 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-19 12:10:37 +0100
commitc5a18da25dd7bba0f65e00312eabc130d5f66fa9 (patch)
treef8ab99b5f7531f8a62760e3a1dc7f7068ae9dd19 /src/lib/playlist.cc
parentba17803f7e33be2bea1363b5a7115e4713dd5997 (diff)
Remove old looping method.
Diffstat (limited to 'src/lib/playlist.cc')
-rw-r--r--src/lib/playlist.cc46
1 files changed, 4 insertions, 42 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index 172b6fbb9..c70c79972 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -49,8 +49,7 @@ using boost::dynamic_pointer_cast;
using boost::lexical_cast;
Playlist::Playlist ()
- : _loop (1)
- , _sequence_video (true)
+ : _sequence_video (true)
, _sequencing_video (false)
{
@@ -109,8 +108,6 @@ Playlist::video_identifier () const
}
}
- t += lexical_cast<string> (_loop);
-
return md5_digest (t.c_str(), t.length());
}
@@ -124,7 +121,6 @@ Playlist::set_from_xml (shared_ptr<const Film> film, shared_ptr<const cxml::Node
}
reconnect ();
- _loop = node->number_child<int> ("Loop");
_sequence_video = node->bool_child ("SequenceVideo");
}
@@ -136,7 +132,6 @@ Playlist::as_xml (xmlpp::Node* node)
(*i)->as_xml (node->add_child ("Content"));
}
- node->add_child("Loop")->add_child_text(lexical_cast<string> (_loop));
node->add_child("SequenceVideo")->add_child_text(_sequence_video ? "1" : "0");
}
@@ -162,13 +157,6 @@ Playlist::remove (shared_ptr<Content> c)
}
}
-void
-Playlist::set_loop (int l)
-{
- _loop = l;
- Changed ();
-}
-
bool
Playlist::has_subtitles () const
{
@@ -246,7 +234,7 @@ Playlist::best_dcp_frame_rate () const
}
Time
-Playlist::length_without_loop () const
+Playlist::length () const
{
Time len = 0;
for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) {
@@ -256,12 +244,6 @@ Playlist::length_without_loop () const
return len;
}
-Time
-Playlist::length_with_loop () const
-{
- return length_without_loop() * _loop;
-}
-
void
Playlist::reconnect ()
{
@@ -301,29 +283,9 @@ ContentSorter::operator() (shared_ptr<Content> a, shared_ptr<Content> b)
return a->start() < b->start();
}
-/** @return content in an undefined order, not taking looping into account */
+/** @return content in an undefined order */
Playlist::ContentList
-Playlist::content_without_loop () const
+Playlist::content () const
{
return _content;
}
-
-/** @return content in an undefined order, taking looping into account */
-Playlist::ContentList
-Playlist::content_with_loop () const
-{
- ContentList looped = _content;
- Time const length = length_without_loop ();
-
- Time offset = length;
- for (int i = 1; i < _loop; ++i) {
- for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) {
- shared_ptr<Content> copy = (*i)->clone ();
- copy->set_start (copy->start() + offset);
- looped.push_back (copy);
- }
- offset += length;
- }
-
- return looped;
-}