summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-16 13:52:16 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-16 13:52:16 +0100
commit09fcffa01669ee9f146c6c0e86be0f26b6dcd165 (patch)
treec6d40b207ca468f1f337d53d3e517995817e390c /src/lib
parent2f25d1608356bf124e502c6aa438ec664c53de80 (diff)
Small bits of tidying up.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/filter_graph.cc4
-rw-r--r--src/lib/job_manager.cc10
-rw-r--r--src/lib/job_manager.h1
-rw-r--r--src/lib/util.cc22
-rw-r--r--src/lib/util.h2
-rw-r--r--src/lib/video_content.cc10
-rw-r--r--src/lib/video_content.h1
7 files changed, 4 insertions, 46 deletions
diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc
index 7c4df8903..a3bb0093e 100644
--- a/src/lib/filter_graph.cc
+++ b/src/lib/filter_graph.cc
@@ -85,9 +85,7 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, libdcp::Size
<< "time_base=1/1:"
<< "pixel_aspect=1/1";
- int r;
-
- if ((r = avfilter_graph_create_filter (&_buffer_src_context, buffer_src, "in", a.str().c_str(), 0, graph)) < 0) {
+ if (avfilter_graph_create_filter (&_buffer_src_context, buffer_src, "in", a.str().c_str(), 0, graph) < 0) {
throw DecodeError (N_("could not create buffer source"));
}
diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc
index f96275467..2d216dacb 100644
--- a/src/lib/job_manager.cc
+++ b/src/lib/job_manager.cc
@@ -48,16 +48,6 @@ JobManager::add (shared_ptr<Job> j)
return j;
}
-void
-JobManager::add_after (shared_ptr<Job> after, shared_ptr<Job> j)
-{
- boost::mutex::scoped_lock lm (_mutex);
- list<shared_ptr<Job> >::iterator i = find (_jobs.begin(), _jobs.end(), after);
- assert (i != _jobs.end ());
- ++i;
- _jobs.insert (i, j);
-}
-
list<shared_ptr<Job> >
JobManager::get () const
{
diff --git a/src/lib/job_manager.h b/src/lib/job_manager.h
index 82095a143..9c107c190 100644
--- a/src/lib/job_manager.h
+++ b/src/lib/job_manager.h
@@ -35,7 +35,6 @@ class JobManager
public:
boost::shared_ptr<Job> add (boost::shared_ptr<Job>);
- void add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
std::list<boost::shared_ptr<Job> > get () const;
bool work_to_do () const;
bool errors () const;
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 305aae4f8..ec99b2f89 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -119,12 +119,6 @@ seconds_to_hms (int s)
return hms.str ();
}
-string
-time_to_hms (Time t)
-{
- return seconds_to_hms (t / TIME_HZ);
-}
-
/** @param s Number of seconds.
* @return String containing an approximate description of s (e.g. "about 2 hours")
*/
@@ -207,15 +201,11 @@ void
stacktrace (ostream& out, int levels)
{
void *array[200];
- size_t size;
- char **strings;
- size_t i;
-
- size = backtrace (array, 200);
- strings = backtrace_symbols (array, size);
+ size_t size = backtrace (array, 200);
+ char** strings = backtrace_symbols (array, size);
if (strings) {
- for (i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
+ for (size_t i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
out << N_(" ") << demangle (strings[i]) << "\n";
}
@@ -565,12 +555,6 @@ stride_round_up (int c, int const * stride, int t)
return a - (a % t);
}
-int
-stride_lookup (int c, int const * stride)
-{
- return stride[c];
-}
-
/** Read a sequence of key / value pairs from a text stream;
* the keys are the first words on the line, and the values are
* the remainder of the line following the key. Lines beginning
diff --git a/src/lib/util.h b/src/lib/util.h
index d9c88293e..5187dddcf 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -55,7 +55,6 @@ class Scaler;
class Film;
extern std::string seconds_to_hms (int);
-extern std::string time_to_hms (Time);
extern std::string seconds_to_approximate_hms (int);
extern void stacktrace (std::ostream &, int);
extern std::string dependency_version_summary ();
@@ -108,7 +107,6 @@ struct FrameRateConversion
extern int dcp_audio_frame_rate (int);
extern int stride_round_up (int, int const *, int);
-extern int stride_lookup (int c, int const * stride);
extern std::multimap<std::string, std::string> read_key_value (std::istream& s);
extern int get_required_int (std::multimap<std::string, std::string> const & kv, std::string k);
extern float get_required_float (std::multimap<std::string, std::string> const & kv, std::string k);
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index c1f4d0089..819333227 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -138,16 +138,6 @@ VideoContent::information () const
}
void
-VideoContent::set_crop (Crop c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _crop = c;
- }
- signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
VideoContent::set_left_crop (int c)
{
{
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index 697a0ecc3..d74242ae9 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -63,7 +63,6 @@ public:
return _video_frame_rate;
}
- void set_crop (Crop);
void set_left_crop (int);
void set_right_crop (int);
void set_top_crop (int);