Class: PopCap::TagReader

Inherits:
FFmpeg
  • Object
show all
Defined in:
lib/pop_cap/ffmpeg/tag_reader.rb

Overview

Public: This class wraps FFprobe to read tags from a specified file.

Instance Attribute Summary

Attributes inherited from FFmpeg

#commander, #filepath, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FFmpeg

#error_message, #execute, #initialize

Constructor Details

This class inherits a constructor from PopCap::FFmpeg

Class Method Details

.read(filepath, options = {}) ⇒ Object

Public: A convenience class method which wraps the instance constructor.



17
18
19
# File 'lib/pop_cap/ffmpeg/tag_reader.rb', line 17

def self.read(filepath, options={})
  new(filepath, options).read
end

Instance Method Details

#readObject

Public: This method returns the results of FFprobe -show_format.



10
11
12
# File 'lib/pop_cap/ffmpeg/tag_reader.rb', line 10

def read
  JSON.load(encode(output)).to_json
end