lib/recipes.rb in zencoder-1.0.6 vs lib/recipes.rb in zencoder-1.0.7

- old
+ new

@@ -6,11 +6,12 @@ class Recipe @@keys = [:label, :base_url, :filename, :width, :height, :size, :quality, :speed, :upscale, :stretch, :frame_rate, :max_frame_rate, :keyframe_interval, :video_bitrate, :bitrate_cap, :buffer_size, :h264_profile, :h264_level, :skip_video, :audio_codec, :audio_bitrate, :audio_channels, :audio_sample_rate, - :skip_audio, :start_clip, :clip_length, :thumbnails, :notifications] + :skip_audio, :start_clip, :clip_length, :thumbnails, :notifications, :tuning, + :autolevel, :audio_quality, :deblock, :public, :denoise, :video_codec] @@thumb_keys = [:number, :size, :base_url, :prefix] # constructor. accepts a name for the recipe, and a hash of params. The constructor will try to verify that you aren't doing # something it doesn't know about, though does no further validation. @@ -18,11 +19,11 @@ params = params.inject(Hash.new) do |m,v| m[v.first.to_s.to_sym]=v.last m end raise RecipeError.new("no recipe parameters?") if params.empty? - raise RecipeError.new("unknown recipe parameter #{params.keys - @@keys}") unless (params.keys - @@keys).empty? + raise RecipeError.new("unknown recipe parameter '#{params.keys - @@keys}' ") unless (params.keys - @@keys).empty? if params[:thumbnails] raise RecipeError.new("unknown thumb keys #{params[:thumbnails].keys - @@thumb_keys}") unless (params[:thumbnails].keys - @@thumb_keys).empty? end @o = params end @@ -69,9 +70,9 @@ "video_bitrate"=> 40, "bitrate_cap"=> 100 } params = defaults.merge(params) - Recipe.new(:web, params) + Recipe.new(:web, params) end end end