class MovieMasher::LayerRawImage

a raw image layer

Public Instance Methods

initialize_chains() click to toggle source
Calls superclass method MovieMasher::Layer#initialize_chains
# File lib/graphs/layers.rb, line 42
def initialize_chains
  chain = Chain.new nil, @job_input
  # we will need to change movie_filter path, since we'll be building
  # video file from image for each output
  @movie_filter = FilterSourceMovie.new(@input, @job_input)
  chain << @movie_filter
  @filter_timestamps = FilterSetpts.new('N')
  chain << @filter_timestamps
  @chains << chain
  super
end
layer_command(scope) click to toggle source
Calls superclass method MovieMasher::LayerRaw#layer_command
# File lib/graphs/layers.rb, line 53
def layer_command(scope)
  unless @input[:cached_file]
    raise(Error::JobInput, "no cached_file #{@input}")
  end
  output_type_is_not_video = (Type::VIDEO != scope[:mm_output][:type])
  @movie_filter.hash[:loop] = 1
  unless output_type_is_not_video
    loops = scope[:mm_fps].to_f * FloatUtil.precision(@input[:length])
    @movie_filter.hash[:loop] = loops.round.to_i
  end
  @filter_timestamps.disabled = output_type_is_not_video
  @movie_filter.hash[:filename] = @input[:cached_file]
  super
end