matterhorn_whymper 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmI2OTkzZjM5ZjExNDIxMDVmM2IxZGE5MDk0YjY2NWQ1MmQwY2MyZQ==
4
+ OGUzYmU0ZDYxM2M0NTE2OTdhNWU4MDM3ZDJiNmE4M2FjYTYwN2I2NA==
5
5
  data.tar.gz: !binary |-
6
- MGZlZmMzMWNmNmRkY2EyYmE4ODdiNmJmOGE4NDZhZDdmMDdiZTY3NA==
6
+ YTNkYzdiNDg3YjlkNzRhOGFlY2ZjNDJhODRiM2Y4OWU3NWI3ZmIwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTZlM2U3MDE5NzIyZTQwODNlM2JmNTE5ZTkxYWEwMjNkZTU4MGNmNDY2MDYy
10
- M2U3Zjk5ZTY3MTBlOGViNzg3NDNjODcxZDI1MzhkNjc3MDIyYWU4ZjI2OGE5
11
- NTlmMWM5ZTg5MWIzODNlOTc4YTY1Zjg0NTBhNDg1Y2E4ZDZhZjY=
9
+ YzZiNTkyNTAyNGM4ZWNmMjk2MTkzODIzOTEwZjRmZmFhZjI0MWY3MjM4ZDdh
10
+ NjYxNmJiYjA2N2JjMGVkZmE5OTkwNGZhYTcyNjIzYjM2N2E2MDZmZTJlYzFk
11
+ NTBlYjk2ZDMzNGFhMmE0MzViZWI4NjQ1OTEzZTI1ZjY5OTQ2NjM=
12
12
  data.tar.gz: !binary |-
13
- M2RiNjQyMDAzMGIyMjlhZWI5MjA0OGUxOWUyMTQxMjljNzM4NWU3NGU5NGJi
14
- NWI2MzRkMjQyNDYzMjVmZTU3ZmE1MzQwMzA0YjU3YTdhYjJiMmQyNDM1NGM3
15
- MjVmNzhjYmMzNmZkNDMyNjJkNmFmZjIyODZlNWQwNTcwZjU3ODc=
13
+ YWFmMWZjMzY3NDhkNThmOGJkM2Y3OWVkYTcyN2U5ZjQ1NDExNWY5MjkxYjAy
14
+ OGQyZmY5NmNhYTYzNTVkZTg1NDE0NzU1M2M1Y2UxNzUyYmM0OGM1YTA5MTcw
15
+ NTgwMzAyMWVkOTQ1YTg2ZDJhMWM3ZWQ2MWZiYTI2OWRmMjczMTQ=
@@ -130,6 +130,7 @@ module Matterhorn
130
130
  @end_point = nil
131
131
  @rel_begin = nil
132
132
  @duration = nil
133
+ @scene_list = Array.new
133
134
  @parent = parent
134
135
  end
135
136
 
@@ -148,6 +149,14 @@ module Matterhorn
148
149
  end
149
150
 
150
151
 
152
+ def add_scene(file, clip_begin, clip_end)
153
+ scene = Smil::Scene.new(self, file, clip_begin, clip_end)
154
+ @scene_list.sort! { |a, b| a.clip_begin <=> b.clip_begin }
155
+ @scene_list << scene
156
+ scene
157
+ end
158
+
159
+
151
160
  # ------------------------------------------------------------------------ protected section ---
152
161
  protected
153
162
 
@@ -268,6 +277,10 @@ module Matterhorn
268
277
  @seq_list.each do |seq|
269
278
  seq.to_xml(bx)
270
279
  end
280
+ @scene_list.each do |scene|
281
+ scene.to_xml(bx)
282
+ end
283
+
271
284
  end
272
285
  end
273
286
 
@@ -286,7 +299,6 @@ module Matterhorn
286
299
  def initialize(parent)
287
300
  super(parent)
288
301
  @track_list = Array.new
289
- @scene_list = Array.new
290
302
  end
291
303
 
292
304
 
@@ -308,14 +320,6 @@ module Matterhorn
308
320
  end
309
321
 
310
322
 
311
- def add_scene(file, clip_begin, clip_end)
312
- scene = Smil::Scene.new(self, file, clip_begin, clip_end)
313
- @scene_list.sort! { |a, b| a.clip_begin <=> b.clip_begin }
314
- @scene_list << scene
315
- scene
316
- end
317
-
318
-
319
323
  def propagate(parent_elem)
320
324
  @rel_begin = start_point - parent_elem.start_point
321
325
  @track_list.each do |track|
@@ -400,7 +404,7 @@ module Matterhorn
400
404
 
401
405
  def to_xml(bx)
402
406
  attributes = Hash.new
403
- attributes[:src] = @src.to_s
407
+ attributes[:src] = @src.to_s if !@src.nil? && !@src.empty?
404
408
  attributes[:clipBegin] = "#{(@clip_begin * 1000).round.to_s}ms"
405
409
  attributes[:clipEnd] = "#{(@clip_end * 1000).round.to_s}ms"
406
410
  bx.video(attributes)
@@ -5,7 +5,7 @@ module MatterhornWhymper
5
5
 
6
6
  # -------------------------------------------------------------------------- const definitions ---
7
7
 
8
- VERSION = "2.1.0"
8
+ VERSION = "2.2.0"
9
9
 
10
10
 
11
11
  end # -------------------------------------------------------------------- end MatterhornWhymper ---
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matterhorn_whymper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Fritschi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-12 00:00:00.000000000 Z
11
+ date: 2015-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post