flvedit 0.6.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 6
4
- :patch: 4
3
+ :minor: 7
4
+ :patch: 0
data/flvedit.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{flvedit}
5
- s.version = "0.6.4"
5
+ s.version = "0.7.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Marc-Andr\303\251 Lafortune"]
@@ -61,6 +61,7 @@ Gem::Specification.new do |s|
61
61
  "test/fixtures/corrupted.flv",
62
62
  "test/fixtures/short.flv",
63
63
  "test/fixtures/tags.xml",
64
+ "test/fixtures/update.yml",
64
65
  "test/test_flv.rb",
65
66
  "test/test_flv_edit.rb",
66
67
  "test/test_flv_edit_results.rb",
@@ -74,7 +75,8 @@ Gem::Specification.new do |s|
74
75
  "test/text_flv_edit_results/join.txt",
75
76
  "test/text_flv_edit_results/print.txt",
76
77
  "test/text_flv_edit_results/stop.txt",
77
- "test/text_flv_edit_results/update.txt"
78
+ "test/text_flv_edit_results/update.txt",
79
+ "test/text_flv_edit_results/update_merge.txt"
78
80
  ]
79
81
  s.has_rdoc = true
80
82
  s.homepage = %q{http://github.com/marcandre/flvedit}
@@ -111,6 +111,8 @@ module FLV
111
111
  meta[:keyframes][:filepositions].map! {|ts| ts + meta_size} if meta[:hasKeyframes]
112
112
  meta[:cuePoints][:filepositions].map! {|ts| ts + meta_size} if meta[:hasCuePoints]
113
113
 
114
+ meta.merge!(YAML.load_file(options[:update]).symbolize_keys!) if options[:update]
115
+
114
116
  meta
115
117
  end
116
118
 
@@ -7,7 +7,9 @@ module FLV
7
7
  # Update is a Processor class (see Base and desc)
8
8
  class Update < Base
9
9
  include Dispatcher
10
- desc "Updates FLV with an onMetaTag event containing all the relevant information."
10
+ desc ["Updates FLV with an onMetaTag event containing all the relevant information.",
11
+ "If supplied, the information of the yaml file PATH will be added"],
12
+ :param => {:name => "[PATH]"}
11
13
  def initialize(source=nil, options={})
12
14
  super
13
15
  @meta_data_maker = MetaDataMaker.new(source.clone, options)
@@ -0,0 +1,6 @@
1
+ ---
2
+ :testing: Hello, world!
3
+ :answer: 42
4
+ :pills:
5
+ - red
6
+ - blue
data/test/test_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'test/unit'
2
1
  require 'rubygems'
2
+ require 'test/unit'
3
3
  require 'backports'
4
4
  require 'shoulda'
5
5
  require 'mocha'
@@ -0,0 +1,36 @@
1
+ *** command:
2
+ --Update test/fixtures/update.yml --Print
3
+ *** result:
4
+ 0.000 | FLV::Event tag
5
+ | event : onMetaData
6
+ | answer : 42
7
+ | audiocodecid : 2
8
+ | audiodatarate : 15.7066666666667
9
+ | audiodelay : 0.0
10
+ | audiosamplerate: 11000
11
+ | audiosamplesize: 16
12
+ | audiosize : 7805
13
+ | canSeekToEnd : false
14
+ | cuePoints : []
15
+ | datasize : 25001
16
+ | duration : 3.6
17
+ | filesize : 25430
18
+ | framerate : 10.0
19
+ | hasAudio : true
20
+ | hasCuePoints : false
21
+ | hasKeyframes : true
22
+ | hasMetadata : true
23
+ | hasVideo : true
24
+ | height : 154
25
+ | keyframes : {filepositions=>[846, 1968], times=>[0.0, 0.2]}
26
+ | lastkeyframetimestamp: 0.2
27
+ | lasttimestamp : 3.5
28
+ | metadatacreator: flvedit........................................................
29
+ | metadatadate : Sat Dec 20 000000 UTC 2008
30
+ | pills : [red, blue]
31
+ | stereo : false
32
+ | testing : Hello, world!
33
+ | videocodecid : 4
34
+ | videodatarate : 35.7577777777778
35
+ | videosize : 16487
36
+ | width : 192
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flvedit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Marc-Andr\xC3\xA9 Lafortune"
@@ -87,6 +87,7 @@ files:
87
87
  - test/fixtures/corrupted.flv
88
88
  - test/fixtures/short.flv
89
89
  - test/fixtures/tags.xml
90
+ - test/fixtures/update.yml
90
91
  - test/test_flv.rb
91
92
  - test/test_flv_edit.rb
92
93
  - test/test_flv_edit_results.rb
@@ -101,6 +102,7 @@ files:
101
102
  - test/text_flv_edit_results/print.txt
102
103
  - test/text_flv_edit_results/stop.txt
103
104
  - test/text_flv_edit_results/update.txt
105
+ - test/text_flv_edit_results/update_merge.txt
104
106
  has_rdoc: true
105
107
  homepage: http://github.com/marcandre/flvedit
106
108
  post_install_message: