Module: Ffprober
- Defined in:
- lib/ffprober.rb,
lib/ffprober/format.rb,
lib/ffprober/parser.rb,
lib/ffprober/stream.rb,
lib/ffprober/chapter.rb,
lib/ffprober/version.rb,
lib/ffprober/audio_stream.rb,
lib/ffprober/video_stream.rb,
lib/ffprober/ffprobe_version.rb,
lib/ffprober/subtitle_stream.rb,
lib/ffprober/dynamic_initializer.rb
Defined Under Namespace
Modules: DynamicInitializer
Classes: AudioStream, Chapter, FfprobeVersion, Format, InvalidInputFileError, Parser, Stream, SubtitleStream, VideoStream
Constant Summary
collapse
- VERSION =
'0.4.2'
Class Method Summary
collapse
Class Method Details
.executable_name ⇒ Object
24
25
26
|
# File 'lib/ffprober.rb', line 24
def self.executable_name
@executable_name ||= self.windows? ? 'ffprobe.exe' : 'ffprobe'
end
|
.path ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/ffprober.rb', line 14
def self.path
@path ||= begin
path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |path_to_check|
File.executable?(File.join(path_to_check, executable_name))
end
path && File.expand_path(executable_name, path)
end
end
|
.windows? ⇒ Boolean
28
29
30
|
# File 'lib/ffprober.rb', line 28
def self.windows?
!!(RUBY_PLATFORM =~ /(mingw|mswin)/)
end
|