class Agqr::Recorder
Attributes
attributes[R]
jobs[RW]
Public Class Methods
new(attributes)
click to toggle source
# File lib/agqr/recorder.rb, line 10 def initialize(attributes) @attributes = attributes @jobs = [] end
Public Instance Methods
load_programs()
click to toggle source
# File lib/agqr/recorder.rb, line 15 def load_programs programs.each do |program| reserve(program) end exec end
record(job)
click to toggle source
# File lib/agqr/recorder.rb, line 29 def record(job) cmd = "#{rtmpdump} -r #{agqr_stream_url} --live -B #{job.program.length} -o #{save_path}/#{job.program.title}_#{Time.now.strftime('%Y%m%d').gsub(' ', '')}.flv" system cmd end
reserve(program)
click to toggle source
# File lib/agqr/recorder.rb, line 22 def reserve(program) job = Job.new(self) job.build(program) jobs << job job.start end
Private Instance Methods
agqr_stream_url()
click to toggle source
# File lib/agqr/recorder.rb, line 48 def agqr_stream_url 'rtmp://fms-base1.mitene.ad.jp/agqr/aandg22' end
exec()
click to toggle source
# File lib/agqr/recorder.rb, line 52 def exec loop do end end
programs()
click to toggle source
# File lib/agqr/recorder.rb, line 40 def programs attributes["programs"] end
rtmpdump()
click to toggle source
# File lib/agqr/recorder.rb, line 36 def rtmpdump attributes["rtmpdump"] end
save_path()
click to toggle source
# File lib/agqr/recorder.rb, line 44 def save_path attributes["save_path"] end