From 2907cc6dd0b0d2d80d44ae292a157651d6e05ee7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 26 Aug 2013 05:25:22 +0000 Subject: player: flesh out multi-source in protocol/sourceedit We should be fully-capable of managing any number of options to try sources in. --- lib/dtas/source/av.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/dtas/source/av.rb') diff --git a/lib/dtas/source/av.rb b/lib/dtas/source/av.rb index a6a0e3a..61d88b2 100644 --- a/lib/dtas/source/av.rb +++ b/lib/dtas/source/av.rb @@ -17,6 +17,7 @@ class DTAS::Source::Av # :nodoc: "command" => 'avconv -v error $SSPOS -i "$INFILE" $AMAP -f sox - |' \ 'sox -p $SOXFMT - $RGFX', + "tryorder" => 1, ) attr_reader :precision # always 32 @@ -28,8 +29,7 @@ class DTAS::Source::Av # :nodoc: end def try(infile, offset = nil) - rv = dup - rv.source_file_init(infile, offset) + rv = source_file_dup(infile, offset) rv.av_ok? or return rv end @@ -133,4 +133,8 @@ class DTAS::Source::Av # :nodoc: def to_hsh to_hash.delete_if { |k,v| v == AV_DEFAULTS[k] } end + + def source_defaults + AV_DEFAULTS + end end -- cgit v1.2.3-24-ge0c7