class Mp3::Meta
- Mp3::Meta
- Reference
- Object
Overview
Responsible for reading meta information about mpeg-frames and the length of an mp3.
Resources used:
http://www.multiweb.cz/twoinches/mp3inside.htm http://gabriel.mp3-tech.org/mp3infotag.html https://github.com/spreaker/node-mp3-header
Defined in:
id3/mp3/meta.crConstructors
Class Method Summary
-
.read(r : Reader, fast : Bool = true, max_scan : BinarySize = 400.kb)
Reads meta-information of an mp3.
Instance Method Summary
- #approximate_duration : Time::Span
- #approximate_frame_count : Int32
- #duration : Time::Span | Nil
- #first_frame : Frame
- #frame_count : Int32 | Nil
- #size : Int64
- #tags : Id3::TaggedFile
- #to_s(io)
- #xing_header : XingHeader | Nil
Constructor Detail
def self.new(size : Int64, tags : Id3::TaggedFile, first_frame : Mp3::Frame, xing_header : Nil | Mp3::XingHeader, duration : Time::Span | Nil, frame_count : Int32 | Nil)
#
Class Method Detail
Reads meta-information of an mp3.
max_scan is used to specify how many byes into the file to scan for the first frame.
Calculating the exact duration of the mp3 can be slow because the whole file has to be read. So the default is to not calculate the exact duration (fast = true).
TODO move max_scan default to global config