Sha256: af76e05231590f83d83567aedbd1458c113ba92504cc31fc73c95631b7c6d338
Contents?: true
Size: 678 Bytes
Versions: 3
Compression:
Stored size: 678 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'ehbrs_ruby_utils/videos/stream' module Ehbrs module Videos class Track < ::SimpleDelegator TYPE_MAPPING = { audio: 'Audio', video: 'Video', subtitle: 'Subtitle' }.freeze def codec codec_name end def type TYPE_MAPPING.fetch(codec_type) end def number index end def extra ffprobe_data.fetch(:codec_tag_string).to_s end def to_s "[#{type}(#{number}): #{codec}/#{language || '-'}" + extra.if_present('') { |v| " | #{v}" } + ']' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ehbrs-tools-0.16.4 | lib/ehbrs/videos/track.rb |
ehbrs-tools-0.16.3 | lib/ehbrs/videos/track.rb |
ehbrs-tools-0.16.2 | lib/ehbrs/videos/track.rb |