lib/dragonfly-ffmpeg/analyser.rb in dragonfly-ffmpeg-0.1.5 vs lib/dragonfly-ffmpeg/analyser.rb in dragonfly-ffmpeg-0.1.6

- old
+ new

@@ -28,72 +28,76 @@ def ext(temp_object) File.extname(temp_object.path) end def frame_rate(temp_object) - inspect(:frame_rate, temp_object) + inspect_movie(:frame_rate, temp_object) end alias_method :fps, :frame_rate def duration(temp_object) - inspect(:duration, temp_object) + inspect_movie(:duration, temp_object) end def bitrate(temp_object) - inspect(:bitrate, temp_object) + inspect_movie(:bitrate, temp_object) end def size(temp_object) - inspect(:size, temp_object) + inspect_movie(:size, temp_object) end def video_stream(temp_object) - inspect(:video_stream, temp_object) + inspect_movie(:video_stream, temp_object) end def video_codec(temp_object) - inspect(:video_codec, temp_object) + inspect_movie(:video_codec, temp_object) end def colorspace(temp_object) - inspect(:colorspace, temp_object) + inspect_movie(:colorspace, temp_object) end def resolution(temp_object) - inspect(:resolution, temp_object) + inspect_movie(:resolution, temp_object) end def v_width(temp_object) - inspect(:width, temp_object) + inspect_movie(:width, temp_object) end def v_height(temp_object) - inspect(:height, temp_object) + inspect_movie(:height, temp_object) end def audio_stream(temp_object) - inspect(:audio_stream, temp_object) + inspect_movie(:audio_stream, temp_object) end def audio_codec(temp_object) - inspect(:audio_codec, temp_object) + inspect_movie(:audio_codec, temp_object) end def audio_sample_rate(temp_object) - inspect(:audio_sample_rate, temp_object) + inspect_movie(:audio_sample_rate, temp_object) end + def audio_bitrate(temp_object) + inspect_movie(:audio_bitrate, temp_object) + end + def audio_channels(temp_object) - inspect(:audio_channels, temp_object) + inspect_movie(:audio_channels, temp_object) end def valid?(temp_object) - inspect(:valid?, temp_object) + inspect_movie(:valid?, temp_object) end private - def inspect(method, temp_object) + def inspect_movie(method, temp_object) ::FFMPEG::Movie.new(temp_object.path).send(method) end end end