ffmpeg-video-info 0.1.7 → 0.2.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.
- checksums.yaml +4 -4
- data/Rakefile +6 -5
- data/VERSION +1 -1
- data/ext/{ffmpeg_video_info → ffmpeg_video_info_ext}/extconf.rb +1 -1
- data/ext/{ffmpeg_video_info/ffmpeg_video_info.c → ffmpeg_video_info_ext/ffmpeg_video_info_ext.c} +2 -2
- data/ffmpeg-video-info.gemspec +8 -7
- data/lib/ffmpeg_video_info.rb +12 -0
- data/spec/lib/info_spec.rb +5 -5
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d33444d94613aaae3c6fa3acbd9991ce6c1f4cfa
|
4
|
+
data.tar.gz: a6cfd972b3b3f1ee24a463cb1be948d88ff97c82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eb8bf59db6897efeb042f71f33267d402aca19fc70a55bdb50ba9a16a683aab0701381d448d8464fc65b43bb8b8c36ac197d7035e35dc2ecb9431746c517991
|
7
|
+
data.tar.gz: 688fc4067c56ab533b94cc7fd95a04898fae21e2733efed2b7f51ec1f3cce15d89201b96d49519a1ec89ddad4a429a1f16ad2dc4b1a64b1910e334ec16845569
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'bundler'
|
3
3
|
require 'rake/extensiontask'
|
4
4
|
require 'mini_portile'
|
5
|
+
require './lib/ffmpeg_video_info'
|
5
6
|
begin
|
6
7
|
Bundler.setup(:default, :development)
|
7
8
|
rescue Bundler::BundlerError => e
|
@@ -21,7 +22,7 @@ Jeweler::Tasks.new do |gem|
|
|
21
22
|
gem.description = %Q{It only provides gathering info about media files}
|
22
23
|
gem.email = "fazzzenda@mail.ru"
|
23
24
|
gem.authors = ["Pavel Tatarsky"]
|
24
|
-
gem.extensions = %w[ext/
|
25
|
+
gem.extensions = %w[ext/ffmpeg_video_info_ext/extconf.rb]
|
25
26
|
# dependencies defined in Gemfile
|
26
27
|
end
|
27
28
|
Jeweler::RubygemsDotOrgTasks.new
|
@@ -36,8 +37,8 @@ Rake::RDocTask.new do |rdoc|
|
|
36
37
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
37
38
|
end
|
38
39
|
|
39
|
-
recipe = MiniPortile.new('ffmpeg',
|
40
|
-
recipe.files = [
|
40
|
+
recipe = MiniPortile.new('ffmpeg', FFmpeg::Version)
|
41
|
+
recipe.files = ["https://github.com/FFmpeg/FFmpeg/archive/n#{FFmpeg::Version}.tar.gz"]
|
41
42
|
recipe.configure_options = ['--enable-shared']
|
42
43
|
task :ffmpeg do
|
43
44
|
checkpoint = ".#{recipe.name}-#{recipe.version}.installed"
|
@@ -47,9 +48,9 @@ task :ffmpeg do
|
|
47
48
|
end
|
48
49
|
recipe.activate
|
49
50
|
end
|
50
|
-
task :compile => [:ffmpeg, :'compile:
|
51
|
+
task :compile => [:ffmpeg, :'compile:ffmpeg_video_info_ext']
|
51
52
|
|
52
53
|
require "rake/extensiontask"
|
53
|
-
Rake::ExtensionTask.new('
|
54
|
+
Rake::ExtensionTask.new('ffmpeg_video_info_ext') do |e|
|
54
55
|
e.config_includes = [recipe.path + '/include']
|
55
56
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/ext/{ffmpeg_video_info/ffmpeg_video_info.c → ffmpeg_video_info_ext/ffmpeg_video_info_ext.c}
RENAMED
@@ -341,8 +341,8 @@ VALUE get_info(VALUE self, VALUE arg)
|
|
341
341
|
return res;
|
342
342
|
}
|
343
343
|
static VALUE rb_mFFmpegVideoInfo;
|
344
|
-
void
|
344
|
+
void Init_ffmpeg_video_info_ext()
|
345
345
|
{
|
346
|
-
rb_mFFmpegVideoInfo = rb_define_module("
|
346
|
+
rb_mFFmpegVideoInfo = rb_define_module("FFmpegVideoInfoExt");
|
347
347
|
rb_define_singleton_method(rb_mFFmpegVideoInfo, "get", get_info, 1);
|
348
348
|
}
|
data/ffmpeg-video-info.gemspec
CHANGED
@@ -2,20 +2,20 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ffmpeg-video-info 0.
|
6
|
-
# stub: ext/
|
5
|
+
# stub: ffmpeg-video-info 0.2.0 ruby lib
|
6
|
+
# stub: ext/ffmpeg_video_info_ext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "ffmpeg-video-info"
|
10
|
-
s.version = "0.
|
10
|
+
s.version = "0.2.0"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
s.authors = ["Pavel Tatarsky"]
|
15
|
-
s.date = "2015-07-
|
15
|
+
s.date = "2015-07-13"
|
16
16
|
s.description = "It only provides gathering info about media files"
|
17
17
|
s.email = "fazzzenda@mail.ru"
|
18
|
-
s.extensions = ["ext/
|
18
|
+
s.extensions = ["ext/ffmpeg_video_info_ext/extconf.rb"]
|
19
19
|
s.extra_rdoc_files = [
|
20
20
|
"LICENSE.txt",
|
21
21
|
"README.rdoc"
|
@@ -28,9 +28,10 @@ Gem::Specification.new do |s|
|
|
28
28
|
"README.rdoc",
|
29
29
|
"Rakefile",
|
30
30
|
"VERSION",
|
31
|
-
"ext/
|
32
|
-
"ext/
|
31
|
+
"ext/ffmpeg_video_info_ext/extconf.rb",
|
32
|
+
"ext/ffmpeg_video_info_ext/ffmpeg_video_info_ext.c",
|
33
33
|
"ffmpeg-video-info.gemspec",
|
34
|
+
"lib/ffmpeg_video_info.rb",
|
34
35
|
"spec/fixtures/test.mp4",
|
35
36
|
"spec/lib/info_spec.rb",
|
36
37
|
"spec/spec_helper.rb"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'mini_portile'
|
2
|
+
module FFmpeg
|
3
|
+
Version = '2.7.1'
|
4
|
+
module Video
|
5
|
+
def self.info(path)
|
6
|
+
FFmpegVideoInfoExt.get(path)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
recipe = MiniPortile.new('ffmpeg', FFmpeg::Version)
|
10
|
+
recipe.activate
|
11
|
+
end
|
12
|
+
autoload :FFmpegVideoInfoExt, 'ffmpeg_video_info_ext'
|
data/spec/lib/info_spec.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'ffmpeg_video_info'
|
3
3
|
require 'ostruct'
|
4
|
-
describe
|
5
|
-
subject {
|
6
|
-
context 'when .
|
4
|
+
describe FFmpeg::Video do
|
5
|
+
subject { FFmpeg::Video }
|
6
|
+
context 'when .info' do
|
7
7
|
context 'with wrong args' do
|
8
8
|
specify do
|
9
|
-
expect {
|
9
|
+
expect { FFmpeg::Video.info('') }.to raise_error('ffmpeg: Unable to open input file')
|
10
10
|
end
|
11
11
|
end
|
12
12
|
context 'with proper args' do
|
13
|
-
subject { OpenStruct.new(
|
13
|
+
subject { OpenStruct.new(FFmpeg::Video.info('./spec/fixtures/test.mp4')) }
|
14
14
|
it 'prints proper data' do
|
15
15
|
expect(subject.format_name).to eql 'mov,mp4,m4a,3gp,3g2,mj2'
|
16
16
|
expect(subject.file_name).to eql './spec/fixtures/test.mp4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffmpeg-video-info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Tatarsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -112,7 +112,7 @@ description: It only provides gathering info about media files
|
|
112
112
|
email: fazzzenda@mail.ru
|
113
113
|
executables: []
|
114
114
|
extensions:
|
115
|
-
- ext/
|
115
|
+
- ext/ffmpeg_video_info_ext/extconf.rb
|
116
116
|
extra_rdoc_files:
|
117
117
|
- LICENSE.txt
|
118
118
|
- README.rdoc
|
@@ -124,9 +124,10 @@ files:
|
|
124
124
|
- README.rdoc
|
125
125
|
- Rakefile
|
126
126
|
- VERSION
|
127
|
-
- ext/
|
128
|
-
- ext/
|
127
|
+
- ext/ffmpeg_video_info_ext/extconf.rb
|
128
|
+
- ext/ffmpeg_video_info_ext/ffmpeg_video_info_ext.c
|
129
129
|
- ffmpeg-video-info.gemspec
|
130
|
+
- lib/ffmpeg_video_info.rb
|
130
131
|
- spec/fixtures/test.mp4
|
131
132
|
- spec/lib/info_spec.rb
|
132
133
|
- spec/spec_helper.rb
|