Sha256: 583074386775860e9d614b55ac64c9bec980801b6986875b4105afef4d41d7d7

Contents?: true

Size: 1.31 KB

Versions: 22

Compression:

Stored size: 1.31 KB

Contents

=begin
Copyright 2010, Roger Pack 
This file is part of Sensible Cinema.

    Sensible Cinema is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Sensible Cinema is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Sensible Cinema.  If not, see <http://www.gnu.org/licenses/>.
=end

require_relative 'edl_parser'

class MplayerEdl
  def self.convert_to_edl specs, add_this_many_to_end = 0, add_this_many_to_beginning = 0, splits = [], extra_time_to_all = 0.0
    # simple re-map to EDL style output
    combined = EdlParser.convert_incoming_to_split_sectors specs, add_this_many_to_end, add_this_many_to_beginning, splits
    
    out = ''
    map = {:mute => 1, :blank => 0}
    for start, endy, type in combined
      start += extra_time_to_all
      endy += extra_time_to_all
      out += "#{start} #{endy} #{map[type]}\n"
    end
    out
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sensible-cinema-0.28.1 lib/mplayer_edl.rb
sensible-cinema-0.28.0 lib/mplayer_edl.rb
sensible-cinema-0.27.0 lib/mplayer_edl.rb
sensible-cinema-0.26.3 lib/mplayer_edl.rb
sensible-cinema-0.26.2 lib/mplayer_edl.rb
sensible-cinema-0.26.1 lib/mplayer_edl.rb
sensible-cinema-0.26.0 lib/mplayer_edl.rb
sensible-cinema-0.25.4 lib/mplayer_edl.rb
sensible-cinema-0.25.3 lib/mplayer_edl.rb
sensible-cinema-0.25.2 lib/mplayer_edl.rb
sensible-cinema-0.25.1 lib/mplayer_edl.rb
sensible-cinema-0.25.0 lib/mplayer_edl.rb
sensible-cinema-0.24.9 lib/mplayer_edl.rb
sensible-cinema-0.24.8 lib/mplayer_edl.rb
sensible-cinema-0.24.7 lib/mplayer_edl.rb
sensible-cinema-0.24.6 lib/mplayer_edl.rb
sensible-cinema-0.24.5 lib/mplayer_edl.rb
sensible-cinema-0.24.4 lib/mplayer_edl.rb
sensible-cinema-0.24.3 lib/mplayer_edl.rb
sensible-cinema-0.24.2 lib/mplayer_edl.rb