From 68ffa097e187da663fa3f537b430428ea5e8de2e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 25 Aug 2013 09:25:07 +0000 Subject: split out source handling to prepare for avconv/ffmpeg support We should've done this at the start, but we didn't. --- lib/dtas/source/command.rb | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 lib/dtas/source/command.rb (limited to 'lib/dtas/source/command.rb') diff --git a/lib/dtas/source/command.rb b/lib/dtas/source/command.rb deleted file mode 100644 index 930c5cf..0000000 --- a/lib/dtas/source/command.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -*- encoding: binary -*- -# Copyright (C) 2013, Eric Wong -# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) -require_relative '../../dtas' -require_relative '../source' -require_relative '../command' -require_relative '../serialize' - -class DTAS::Source::Command # :nodoc: - require_relative '../source/common' - - include DTAS::Command - include DTAS::Process - include DTAS::Source::Common - include DTAS::Serialize - - SIVS = %w(command env) - - def initialize(command) - command_init(command: command) - end - - def source_dup - rv = self.class.new - SIVS.each { |iv| rv.__send__("#{iv}=", self.__send__(iv)) } - rv - end - - def to_hash - ivars_to_hash(SIVS) - end - - alias to_hsh to_hash - - def spawn(format, rg_state, opts) - raise "BUG: #{self.inspect}#spawn called twice" if @to_io - e = format.to_env - @pid = dtas_spawn(e.merge!(@env), command_string, opts) - end -end -- cgit v1.2.3-24-ge0c7