* @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)
void
Decoder::process_video (AVFrame* frame)
{
- assert (_ignore_length || _film->length());
+ assert (_film->length());
if (_minimal) {
++_video_frame_index;
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 */
*/
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);
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));
}
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
);
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());
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)
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 */
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 ());
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 ();
* @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 ();
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;