Sha256: a267d814066a959a51bf1e8a8f5c1f46f5f45a9434e15da6865c5539f4c0647e

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'logger'

require 'audiomator/error'
require 'audiomator/options'
require 'audiomator/record'
require 'audiomator/version'

# Main module for Audiomator
module Audiomator
  # Set FFMPEG logs about its process when it's transcoding
  # @params {logger} log you own logger
  # @return [Logger] the logger you ser
  def self.logger=(log)
    @logger = log
  end

  # Get FFMPEG logger.
  #
  # @return [Logger]
  def self.logger
    return @logger if @logger
    logger = ::Logger.new(STDOUT)
    logger.level = ::Logger::INFO
    @logger = logger
  end

  # Set the path of ffmpeg
  # Can be useful if you need to specify a path as /usr/local/bin/ffmpeg
  #
  # @param [String] path to the ffmpeg
  # @return [String] the path of ffmpeg
  def self.ffmpeg=(bin)
    @ffmpeg = bin
  end

  def self.ffmpeg
    @ffmpeg || 'ffmpeg'
  end

  def self.ffprobe=(bin)
    @ffprobe = bin
  end

  def self.ffprobe
    @ffprobe || 'ffprobe'
  end

  def self.timeout=(time)
    @timeout = time
  end

  def self.timeout
    @timeout || 45
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
audiomator-0.3.0 lib/audiomator.rb