projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract simple_digest().
[dcpomatic.git]
/
src
/
lib
/
shuffler.cc
diff --git
a/src/lib/shuffler.cc
b/src/lib/shuffler.cc
index a13e7f6de82c7f539f673f1e5dd9970a6a64141a..5a4faf4d15fa4c0f74617bd2bd03ecd57f1ba114 100644
(file)
--- a/
src/lib/shuffler.cc
+++ b/
src/lib/shuffler.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2018-202
0
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-202
1
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,6
+18,7
@@
*/
*/
+
#include "shuffler.h"
#include "content_video.h"
#include "dcpomatic_assert.h"
#include "shuffler.h"
#include "content_video.h"
#include "dcpomatic_assert.h"
@@
-25,14
+26,17
@@
#include <string>
#include <iostream>
#include <string>
#include <iostream>
+
using std::make_pair;
using std::make_pair;
+using std::shared_ptr;
using std::string;
using std::weak_ptr;
using std::string;
using std::weak_ptr;
-using std::shared_ptr;
using boost::optional;
using boost::optional;
+
int const Shuffler::_max_size = 64;
int const Shuffler::_max_size = 64;
+
struct Comparator
{
bool operator()(Shuffler::Store const & a, Shuffler::Store const & b) {
struct Comparator
{
bool operator()(Shuffler::Store const & a, Shuffler::Store const & b) {
@@
-43,6
+47,7
@@
struct Comparator
}
};
}
};
+
void
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
{
void
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
{
@@
-54,7
+59,7
@@
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
return;
}
return;
}
-
shared_ptr<Piece>
piece = weak_piece.lock ();
+
auto
piece = weak_piece.lock ();
DCPOMATIC_ASSERT (piece);
if (!_last && video.eyes == Eyes::LEFT) {
DCPOMATIC_ASSERT (piece);
if (!_last && video.eyes == Eyes::LEFT) {
@@
-103,6
+108,7
@@
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
}
}
}
}
+
void
Shuffler::clear ()
{
void
Shuffler::clear ()
{
@@
-111,6
+117,7
@@
Shuffler::clear ()
_last = optional<ContentVideo>();
}
_last = optional<ContentVideo>();
}
+
void
Shuffler::flush ()
{
void
Shuffler::flush ()
{