summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-04 16:55:50 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-04 16:55:50 +0000
commit1d96023ab3987e55fd6452f655dfb900c6012881 (patch)
tree235b558aec10da89dca7484686ff035cbef4811c /src/lib
parent4fb0a5ab9eebc0f07981edc3a6813102520b8233 (diff)
Remove unused ignore_length parameter.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/decoder.cc6
-rw-r--r--src/lib/decoder.h5
-rw-r--r--src/lib/decoder_factory.cc11
-rw-r--r--src/lib/decoder_factory.h2
-rw-r--r--src/lib/examine_content_job.cc2
-rw-r--r--src/lib/ffmpeg_decoder.cc4
-rw-r--r--src/lib/ffmpeg_decoder.h2
-rw-r--r--src/lib/imagemagick_decoder.cc4
-rw-r--r--src/lib/imagemagick_decoder.h2
-rw-r--r--src/lib/tiff_decoder.cc5
-rw-r--r--src/lib/tiff_decoder.h2
11 files changed, 18 insertions, 27 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 3e210c9cc..ee2beb3f3 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -48,14 +48,12 @@ using boost::shared_ptr;
* @param j Job that we are running within, or 0
* @param minimal true to do the bare minimum of work; just run through the content. Useful for acquiring
* accurate frame counts as quickly as possible. This generates no video or audio output.
- * @param ignore_length Ignore the content's claimed length when computing progress.
*/
-Decoder::Decoder (boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal, bool ignore_length)
+Decoder::Decoder (boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal)
: _film (f)
, _opt (o)
, _job (j)
, _minimal (minimal)
- , _ignore_length (ignore_length)
, _video_frame_index (0)
, _delay_line (0)
, _delay_in_bytes (0)
@@ -250,7 +248,7 @@ Decoder::emit_audio (uint8_t* data, int size)
void
Decoder::process_video (AVFrame* frame)
{
- assert (_ignore_length || _film->length());
+ assert (_film->length());
if (_minimal) {
++_video_frame_index;
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index 0741c4f54..5750858df 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -52,7 +52,7 @@ class FilterGraph;
class Decoder
{
public:
- Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool, bool);
+ Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool);
virtual ~Decoder ();
/* Methods to query our input video */
@@ -126,9 +126,6 @@ protected:
*/
bool _minimal;
- /** ignore_length Ignore the content's claimed length when computing progress */
- bool _ignore_length;
-
private:
void emit_audio (uint8_t* data, int size);
diff --git a/src/lib/decoder_factory.cc b/src/lib/decoder_factory.cc
index 06377e26c..287bba0da 100644
--- a/src/lib/decoder_factory.cc
+++ b/src/lib/decoder_factory.cc
@@ -32,20 +32,17 @@ using boost::shared_ptr;
shared_ptr<Decoder>
decoder_factory (
- shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, bool minimal = false, bool ignore_length = false
+ shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, bool minimal = false
)
{
if (boost::filesystem::is_directory (f->content_path ())) {
/* Assume a directory contains TIFFs */
- return shared_ptr<Decoder> (new TIFFDecoder (f, o, j, minimal, ignore_length));
+ return shared_ptr<Decoder> (new TIFFDecoder (f, o, j, minimal));
}
if (f->content_type() == STILL) {
- /* Always ignore length of decodes of stills, since the decoder finishes very quickly
- and it's the encoder that takes the time.
- */
- return shared_ptr<Decoder> (new ImageMagickDecoder (f, o, j, minimal, true));
+ return shared_ptr<Decoder> (new ImageMagickDecoder (f, o, j, minimal));
}
- return shared_ptr<Decoder> (new FFmpegDecoder (f, o, j, minimal, ignore_length));
+ return shared_ptr<Decoder> (new FFmpegDecoder (f, o, j, minimal));
}
diff --git a/src/lib/decoder_factory.h b/src/lib/decoder_factory.h
index 81dcec944..b86c60c70 100644
--- a/src/lib/decoder_factory.h
+++ b/src/lib/decoder_factory.h
@@ -28,5 +28,5 @@ class Job;
class Log;
extern boost::shared_ptr<Decoder> decoder_factory (
- boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool minimal = false, bool ignore_length = false
+ boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool minimal = false
);
diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc
index 58b9282b8..ec0d2409b 100644
--- a/src/lib/examine_content_job.cc
+++ b/src/lib/examine_content_job.cc
@@ -66,7 +66,7 @@ ExamineContentJob::run ()
descend (0.5);
- _decoder = decoder_factory (_film, o, this, true, true);
+ _decoder = decoder_factory (_film, o, this, true);
_decoder->go ();
_film->set_length (_decoder->video_frame_index());
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 198925bd3..f0e652cbe 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -55,8 +55,8 @@ using std::vector;
using std::stringstream;
using boost::shared_ptr;
-FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, bool minimal, bool ignore_length)
- : Decoder (f, o, j, minimal, ignore_length)
+FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, bool minimal)
+ : Decoder (f, o, j, minimal)
, _format_context (0)
, _video_stream (-1)
, _audio_stream (-1)
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 3f96c1632..fbd9e5255 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -52,7 +52,7 @@ class Log;
class FFmpegDecoder : public Decoder
{
public:
- FFmpegDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool, bool);
+ FFmpegDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool);
~FFmpegDecoder ();
/* Methods to query our input video */
diff --git a/src/lib/imagemagick_decoder.cc b/src/lib/imagemagick_decoder.cc
index 8abefdbb9..81349beca 100644
--- a/src/lib/imagemagick_decoder.cc
+++ b/src/lib/imagemagick_decoder.cc
@@ -27,8 +27,8 @@ using namespace std;
using namespace boost;
ImageMagickDecoder::ImageMagickDecoder (
- boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal, bool ignore_length)
- : Decoder (f, o, j, minimal, ignore_length)
+ boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal)
+ : Decoder (f, o, j, minimal)
, _done (false)
{
_magick_image = new Magick::Image (_film->content_path ());
diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h
index c8e47d47d..85bcf4c5b 100644
--- a/src/lib/imagemagick_decoder.h
+++ b/src/lib/imagemagick_decoder.h
@@ -26,7 +26,7 @@ namespace Magick {
class ImageMagickDecoder : public Decoder
{
public:
- ImageMagickDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool, bool);
+ ImageMagickDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool);
float frames_per_second () const {
return static_frames_per_second ();
diff --git a/src/lib/tiff_decoder.cc b/src/lib/tiff_decoder.cc
index 7d8559a7c..2c050def6 100644
--- a/src/lib/tiff_decoder.cc
+++ b/src/lib/tiff_decoder.cc
@@ -46,10 +46,9 @@ using namespace boost;
* @param j Job that we are associated with, or 0.
* @param minimal true to do the bare minimum of work; just run through the content. Useful for acquiring
* accurate frame counts as quickly as possible. This generates no video or audio output.
- * @param ignore_length Ignore the content's claimed length when computing progress.
*/
-TIFFDecoder::TIFFDecoder (boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal, bool ignore_length)
- : Decoder (f, o, j, minimal, ignore_length)
+TIFFDecoder::TIFFDecoder (boost::shared_ptr<Film> f, boost::shared_ptr<const Options> o, Job* j, bool minimal)
+ : Decoder (f, o, j, minimal)
{
string const dir = _film->content_path ();
diff --git a/src/lib/tiff_decoder.h b/src/lib/tiff_decoder.h
index 7bbff7dfe..c02a1d03d 100644
--- a/src/lib/tiff_decoder.h
+++ b/src/lib/tiff_decoder.h
@@ -42,7 +42,7 @@ class Image;
class TIFFDecoder : public Decoder
{
public:
- TIFFDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool, bool);
+ TIFFDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool);
/* Methods to query our input video */
float frames_per_second () const;