Class: MkvToolNix::Types::Merge::OutputControl

Inherits:
Object
  • Object
show all
Defined in:
lib/mkvtoolnix/types/merge/output_control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cluster_length_blocksObject (readonly)

Returns the value of attribute cluster_length_blocks.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def cluster_length_blocks
  @cluster_length_blocks
end

#default_languageObject (readonly)

Returns the value of attribute default_language.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def default_language
  @default_language
end

#disable_lacingObject (readonly)

Returns the value of attribute disable_lacing.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def disable_lacing
  @disable_lacing
end

#disable_language_ietfObject (readonly)

Returns the value of attribute disable_language_ietf.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def disable_language_ietf
  @disable_language_ietf
end

#disable_track_statistics_tagsObject (readonly)

Returns the value of attribute disable_track_statistics_tags.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def disable_track_statistics_tags
  @disable_track_statistics_tags
end

#enable_durationObject (readonly)

Returns the value of attribute enable_duration.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def enable_duration
  @enable_duration
end

#generate_meta_seekObject (readonly)

Returns the value of attribute generate_meta_seek.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def generate_meta_seek
  @generate_meta_seek
end

#no_cuesObject (readonly)

Returns the value of attribute no_cues.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def no_cues
  @no_cues
end

#no_dateObject (readonly)

Returns the value of attribute no_date.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def no_date
  @no_date
end

#timestamp_scaleObject (readonly)

Returns the value of attribute timestamp_scale.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def timestamp_scale
  @timestamp_scale
end

#titleObject (readonly)

Returns the value of attribute title.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def title
  @title
end

#track_orderObject (readonly)

Returns the value of attribute track_order.



8
9
10
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 8

def track_order
  @track_order
end

Instance Method Details

#add_to_cmd(cmd) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 88

def add_to_cmd(cmd)
  cmd << '--title' << @title unless @title.nil?
  cmd << '--default-language' << @default_language unless @default_language.nil?
  cmd << '--track-order' << @track_order unless @track_order.nil?
  cmd << '--cluster-length' << @cluster_length_blocks unless @cluster_length_blocks.nil?
  cmd << '--clusters-in-meta-seek' if @generate_meta_seek
  cmd << '--timestamp-scale' << @timestamp_scale unless @timestamp_scale.nil?
  cmd << '--enable-durations' if @enable_duration
  cmd << '--no-cues' if @no_cues
  cmd << '--no-date' if @no_date
  cmd << '--disable-lacing' if @disable_lacing
  cmd << '--disable-track-statistics-tags' if @disable_track_statistics_tags
  cmd << '--disable-language-ietf' if @disable_language_ietf
  nil
end

#with_cluster_length_in_blocks(blocks) ⇒ Object



43
44
45
46
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 43

def with_cluster_length_in_blocks(blocks)
  @cluster_length_blocks = blocks
  self
end

#with_default_language(language) ⇒ Object



17
18
19
20
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 17

def with_default_language(language)
  @default_language = language
  self
end

#with_disabled_lacingObject



73
74
75
76
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 73

def with_disabled_lacing
  @disable_lacing = true
  self
end

#with_durations_enabledObject



58
59
60
61
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 58

def with_durations_enabled
  @enable_duration = true
  self
end

#with_meta_seek_elementObject



48
49
50
51
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 48

def with_meta_seek_element
  @generate_meta_seek = true
  self
end

#with_timestamp_scale(factor) ⇒ Object



53
54
55
56
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 53

def with_timestamp_scale(factor)
  @timestamp_scale = factor
  self
end

#with_title(title) ⇒ Object



12
13
14
15
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 12

def with_title(title)
  @title = title
  self
end

#with_track_order(order) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 22

def with_track_order(order)
  if order.is_a?(String)
    @track_order = order
    return self
  end

  @track_order = order.map do |it|
    # @track_order.map(&:to_s).join(',')
    case it
    when TrackOrder
      next it.to_s
    when Array
      next ["#{it[0]}:#{it[1]}"]
    when Hash
      next ["#{it[:file_index]}:#{it[:track_id]}"]
    end
  end.join(',')

  self
end

#without_cuesObject



63
64
65
66
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 63

def without_cues
  @no_cues = true
  self
end

#without_dateObject



68
69
70
71
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 68

def without_date
  @no_date = true
  self
end

#without_language_ietfObject



83
84
85
86
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 83

def without_language_ietf
  @disable_language_ietf = true
  self
end

#without_track_statistics_tagsObject



78
79
80
81
# File 'lib/mkvtoolnix/types/merge/output_control.rb', line 78

def without_track_statistics_tags
  @disable_track_statistics_tags = true
  self
end