Sha256: 6357fa37c7f354f0b5350973634e24a8b19d94e9e8ebf31b6ae42a2875c652c8
Contents?: true
Size: 682 Bytes
Versions: 15
Compression:
Stored size: 682 Bytes
Contents
# # Implementes MetaInfo Interface for MPlayer # # MetaInformation = Struct.new(:duration, :bit_rate, :size, :format, :extension, :raw) require_relative '../time_index' module VCSRuby class MPlayerMetaInfo attr_reader :raw def initialize meta_info, filesize @raw = meta_info @filesize = filesize end def duration TimeIndex.new(@raw['ID_LENGTH'].to_f) end def bit_rate @raw['ID_AUDIO_BITRATE'].to_i + @raw['ID_VIDEO_BITRATE'].to_i end def size @filesize end def format extension end def extension ext = File.extname(@raw['ID_FILENAME']) ext[0] = '' ext end end end
Version data entries
15 entries across 15 versions & 1 rubygems