lib/carrierwave/video/ffmpeg_options.rb in carrierwave-video-0.4.0 vs lib/carrierwave/video/ffmpeg_options.rb in carrierwave-video-0.5.0
- old
+ new
@@ -8,19 +8,24 @@
@resolution = options[:resolution] || "640x360"
@custom = options[:custom]
@callbacks = options[:callbacks] || {}
@logger = options[:logger]
@unparsed = options
+ @progress = options[:progress]
@format_options = defaults.merge(options)
end
def raw
@unparsed
end
def logger(model)
model.send(@logger) if @logger.present?
+ end
+
+ def progress(model)
+ lambda {|val| model.send(@progress, val)}
end
def encoder_options
{ preserve_aspect_ratio: :width }
end