ffmpeg-video-info 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +48 -41
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/ext/ffmpeg_video_info/extconf.rb +2 -2
- data/ext/ffmpeg_video_info/ffmpeg_video_info.c +112 -109
- data/ffmpeg-video-info.gemspec +15 -14
- data/spec/lib/info_spec.rb +4 -2
- metadata +22 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d9349e237d44328b267478b2d619bd2df6a1188
|
4
|
+
data.tar.gz: bfbc8cb9b79afa2342f90c7ccc12e44a3e8dc36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd6b8981a78234486a29e51d40ae583544844c739c16a6c5efab9c98ac8f39ad875622f6c45ae1b0ed04af76b6672d2dcd9a6857bab59ef0d1af64b313ce515
|
7
|
+
data.tar.gz: 09a07e7ccdf360a9836033aee5cee00c74ddb7466dbe111d05a478d468023c655f2b683e8ed35dad5a51d83f9ed0bb1dbab9770b45578f2c2300e761e3c4bf69
|
data/Gemfile
CHANGED
@@ -6,9 +6,9 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
-
gem "rdoc"
|
10
|
-
gem "bundler"
|
11
|
-
gem "jeweler"
|
9
|
+
gem "rdoc"
|
10
|
+
gem "bundler"
|
11
|
+
gem "jeweler"
|
12
12
|
gem "rspec"
|
13
13
|
gem "rake-compiler"
|
14
14
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,66 +1,73 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.3.
|
4
|
+
addressable (2.3.6)
|
5
5
|
builder (3.2.2)
|
6
|
+
descendants_tracker (0.0.4)
|
7
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
6
8
|
diff-lcs (1.2.5)
|
7
|
-
faraday (0.
|
8
|
-
multipart-post (
|
9
|
-
git (1.2.
|
10
|
-
github_api (0.
|
11
|
-
addressable
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
faraday (0.9.0)
|
10
|
+
multipart-post (>= 1.2, < 3)
|
11
|
+
git (1.2.8)
|
12
|
+
github_api (0.12.1)
|
13
|
+
addressable (~> 2.3)
|
14
|
+
descendants_tracker (~> 0.0.4)
|
15
|
+
faraday (~> 0.8, < 0.10)
|
16
|
+
hashie (>= 3.2)
|
17
|
+
multi_json (>= 1.7.5, < 2.0)
|
18
|
+
nokogiri (~> 1.6.3)
|
16
19
|
oauth2
|
17
|
-
hashie (
|
18
|
-
highline (1.6.
|
19
|
-
|
20
|
-
jeweler (1.8.8)
|
20
|
+
hashie (3.3.1)
|
21
|
+
highline (1.6.21)
|
22
|
+
jeweler (2.0.1)
|
21
23
|
builder
|
22
|
-
bundler (
|
24
|
+
bundler (>= 1.0)
|
23
25
|
git (>= 1.2.5)
|
24
|
-
github_api
|
26
|
+
github_api
|
25
27
|
highline (>= 1.6.15)
|
26
|
-
nokogiri (
|
28
|
+
nokogiri (>= 1.5.10)
|
27
29
|
rake
|
28
30
|
rdoc
|
29
31
|
json (1.8.1)
|
30
|
-
jwt (0.
|
31
|
-
|
32
|
-
multi_json (1.
|
32
|
+
jwt (1.0.0)
|
33
|
+
mini_portile (0.6.0)
|
34
|
+
multi_json (1.10.1)
|
33
35
|
multi_xml (0.5.5)
|
34
|
-
multipart-post (
|
35
|
-
nokogiri (1.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
jwt (~>
|
40
|
-
multi_json (~> 1.
|
36
|
+
multipart-post (2.0.0)
|
37
|
+
nokogiri (1.6.3.1)
|
38
|
+
mini_portile (= 0.6.0)
|
39
|
+
oauth2 (1.0.0)
|
40
|
+
faraday (>= 0.8, < 0.10)
|
41
|
+
jwt (~> 1.0)
|
42
|
+
multi_json (~> 1.3)
|
41
43
|
multi_xml (~> 0.5)
|
42
44
|
rack (~> 1.2)
|
43
45
|
rack (1.5.2)
|
44
|
-
rake (10.
|
45
|
-
rake-compiler (0.9.
|
46
|
+
rake (10.3.2)
|
47
|
+
rake-compiler (0.9.3)
|
46
48
|
rake
|
47
|
-
rdoc (
|
49
|
+
rdoc (4.1.2)
|
48
50
|
json (~> 1.4)
|
49
|
-
rspec (
|
50
|
-
rspec-core (~>
|
51
|
-
rspec-expectations (~>
|
52
|
-
rspec-mocks (~>
|
53
|
-
rspec-core (
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
rspec (3.1.0)
|
52
|
+
rspec-core (~> 3.1.0)
|
53
|
+
rspec-expectations (~> 3.1.0)
|
54
|
+
rspec-mocks (~> 3.1.0)
|
55
|
+
rspec-core (3.1.7)
|
56
|
+
rspec-support (~> 3.1.0)
|
57
|
+
rspec-expectations (3.1.2)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.1.0)
|
60
|
+
rspec-mocks (3.1.3)
|
61
|
+
rspec-support (~> 3.1.0)
|
62
|
+
rspec-support (3.1.2)
|
63
|
+
thread_safe (0.3.4)
|
57
64
|
|
58
65
|
PLATFORMS
|
59
66
|
ruby
|
60
67
|
|
61
68
|
DEPENDENCIES
|
62
|
-
bundler
|
63
|
-
jeweler
|
69
|
+
bundler
|
70
|
+
jeweler
|
64
71
|
rake-compiler
|
65
|
-
rdoc
|
72
|
+
rdoc
|
66
73
|
rspec
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
@@ -3,8 +3,8 @@ require "mkmf"
|
|
3
3
|
have_library('avcodec') or raise
|
4
4
|
have_library('avformat') or raise
|
5
5
|
|
6
|
-
LIBDIR =
|
7
|
-
INCLUDEDIR =
|
6
|
+
LIBDIR = RbConfig::CONFIG['libdir']
|
7
|
+
INCLUDEDIR = RbConfig::CONFIG['includedir']
|
8
8
|
|
9
9
|
HEADER_DIRS = [
|
10
10
|
'/usr/local/include',
|
@@ -7,83 +7,27 @@
|
|
7
7
|
#include <libavutil/pixdesc.h>
|
8
8
|
|
9
9
|
|
10
|
-
void
|
10
|
+
void my_dump_metadata(void *ctx, AVDictionary *m, const char *indent, VALUE res)
|
11
11
|
{
|
12
|
-
|
13
|
-
|
14
|
-
if (ic->nb_streams && !printed)
|
15
|
-
return;
|
16
|
-
|
17
|
-
rb_hash_aset(res, rb_str_new2("format_name"), rb_str_new2(ic->iformat->name));
|
18
|
-
rb_hash_aset(res, rb_str_new2("file_name"), rb_str_new2(url));
|
19
|
-
VALUE metadata = rb_hash_new();
|
20
|
-
my_dump_metadata(NULL, ic->metadata, " ", metadata);
|
21
|
-
rb_hash_aset(res, rb_str_new2("metadata"), metadata);
|
22
|
-
if (!is_output) {
|
23
|
-
if (ic->duration != AV_NOPTS_VALUE) {
|
24
|
-
int hours, mins, secs, us;
|
25
|
-
int64_t duration = ic->duration + 5000;
|
26
|
-
secs = duration / AV_TIME_BASE;
|
27
|
-
us = duration % AV_TIME_BASE;
|
28
|
-
mins = secs / 60;
|
29
|
-
secs %= 60;
|
30
|
-
hours = mins / 60;
|
31
|
-
mins %= 60;
|
32
|
-
// av_log(NULL, AV_LOG_INFO, "%02d:%02d:%02d.%02d", hours, mins, secs,
|
33
|
-
// (100 * us) / AV_TIME_BASE);
|
34
|
-
rb_hash_aset(res, rb_str_new2("duration"), INT2FIX(hours*3600 + mins*60 + secs));
|
35
|
-
}
|
36
|
-
if (ic->start_time != AV_NOPTS_VALUE) {
|
37
|
-
int secs, us;
|
38
|
-
secs = ic->start_time / AV_TIME_BASE;
|
39
|
-
us = abs(ic->start_time % AV_TIME_BASE);
|
40
|
-
rb_hash_aset(res, rb_str_new2("start"), INT2FIX((int)av_rescale(us, 1000000, AV_TIME_BASE)));
|
41
|
-
}
|
42
|
-
if (ic->bit_rate) {
|
43
|
-
rb_hash_aset(res, rb_str_new2("bitrate"), INT2FIX(ic->bit_rate));
|
44
|
-
}
|
45
|
-
}
|
46
|
-
// for (i = 0; i < ic->nb_chapters; i++) {
|
47
|
-
// AVChapter *ch = ic->chapters[i];
|
48
|
-
// av_log(NULL, AV_LOG_INFO, " Chapter #%d.%d: ", index, i);
|
49
|
-
// av_log(NULL, AV_LOG_INFO, "start %f, ", ch->start * av_q2d(ch->time_base));
|
50
|
-
// av_log(NULL, AV_LOG_INFO, "end %f\n", ch->end * av_q2d(ch->time_base));
|
12
|
+
if(m && !(av_dict_count(m) == 1 && av_dict_get(m, "language", NULL, 0))){
|
13
|
+
AVDictionaryEntry *tag=NULL;
|
51
14
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
// for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) {
|
65
|
-
// my_dump_stream_format(ic, ic->programs[j]->stream_index[k], index, is_output, res);
|
66
|
-
// printed[ic->programs[j]->stream_index[k]] = 1;
|
67
|
-
// }
|
68
|
-
// total += ic->programs[j]->nb_stream_indexes;
|
69
|
-
// }
|
70
|
-
// if (total < ic->nb_streams)
|
71
|
-
// av_log(NULL, AV_LOG_INFO, " No Program\n");
|
72
|
-
// }
|
73
|
-
VALUE streams = rb_ary_new();
|
74
|
-
for(i=0;i<ic->nb_streams;i++)
|
75
|
-
{
|
76
|
-
if (!printed[i])
|
77
|
-
{
|
78
|
-
VALUE stream = rb_hash_new();
|
79
|
-
my_dump_stream_format(ic, i, index, is_output, stream);
|
80
|
-
rb_ary_push(streams, stream);
|
15
|
+
while((tag=av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
16
|
+
if(strcmp("language", tag->key)){
|
17
|
+
const char *p = tag->value;
|
18
|
+
while(*p) {
|
19
|
+
char tmp[256];
|
20
|
+
size_t len = strcspn(p, "\x8\xa\xb\xc\xd");
|
21
|
+
av_strlcpy(tmp, p, FFMIN(sizeof(tmp), len+1));
|
22
|
+
rb_hash_aset(res, rb_str_new2(tag->key), rb_str_new2(tmp));
|
23
|
+
p += len;
|
24
|
+
if (*p) p++;
|
25
|
+
}
|
26
|
+
}
|
81
27
|
}
|
82
28
|
}
|
83
|
-
rb_hash_aset(res, rb_str_new2("streams"), streams);
|
84
|
-
|
85
|
-
av_free(printed);
|
86
29
|
}
|
30
|
+
|
87
31
|
void my_avcodec_string(AVCodecContext *enc, int encode, VALUE res)
|
88
32
|
{
|
89
33
|
const char *codec_type;
|
@@ -206,28 +150,6 @@ void my_avcodec_string(AVCodecContext *enc, int encode, VALUE res)
|
|
206
150
|
rb_hash_aset(res, rb_str_new2("bitrate"), INT2FIX(enc->rc_max_rate));
|
207
151
|
}
|
208
152
|
}
|
209
|
-
int get_bit_rate(AVCodecContext *ctx)
|
210
|
-
{
|
211
|
-
int bit_rate;
|
212
|
-
int bits_per_sample;
|
213
|
-
|
214
|
-
switch (ctx->codec_type) {
|
215
|
-
case AVMEDIA_TYPE_VIDEO:
|
216
|
-
case AVMEDIA_TYPE_DATA:
|
217
|
-
case AVMEDIA_TYPE_SUBTITLE:
|
218
|
-
case AVMEDIA_TYPE_ATTACHMENT:
|
219
|
-
bit_rate = ctx->bit_rate;
|
220
|
-
break;
|
221
|
-
case AVMEDIA_TYPE_AUDIO:
|
222
|
-
bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
|
223
|
-
bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate;
|
224
|
-
break;
|
225
|
-
default:
|
226
|
-
bit_rate = 0;
|
227
|
-
break;
|
228
|
-
}
|
229
|
-
return bit_rate;
|
230
|
-
}
|
231
153
|
|
232
154
|
void my_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output, VALUE res)
|
233
155
|
{
|
@@ -286,25 +208,106 @@ void my_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output,
|
|
286
208
|
my_dump_metadata(NULL, st->metadata, " ", metadata);
|
287
209
|
rb_hash_aset(res, rb_str_new2("metadata"), metadata);
|
288
210
|
}
|
289
|
-
|
211
|
+
|
212
|
+
void my_av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output, VALUE res)
|
290
213
|
{
|
291
|
-
|
292
|
-
|
214
|
+
int i;
|
215
|
+
uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
|
216
|
+
if (ic->nb_streams && !printed)
|
217
|
+
return;
|
293
218
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
219
|
+
rb_hash_aset(res, rb_str_new2("format_name"), rb_str_new2(ic->iformat->name));
|
220
|
+
rb_hash_aset(res, rb_str_new2("file_name"), rb_str_new2(url));
|
221
|
+
VALUE metadata = rb_hash_new();
|
222
|
+
my_dump_metadata(NULL, ic->metadata, " ", metadata);
|
223
|
+
rb_hash_aset(res, rb_str_new2("metadata"), metadata);
|
224
|
+
if (!is_output) {
|
225
|
+
if (ic->duration != AV_NOPTS_VALUE) {
|
226
|
+
int hours, mins, secs, us;
|
227
|
+
int64_t duration = ic->duration + 5000;
|
228
|
+
secs = duration / AV_TIME_BASE;
|
229
|
+
us = duration % AV_TIME_BASE;
|
230
|
+
mins = secs / 60;
|
231
|
+
secs %= 60;
|
232
|
+
hours = mins / 60;
|
233
|
+
mins %= 60;
|
234
|
+
// av_log(NULL, AV_LOG_INFO, "%02d:%02d:%02d.%02d", hours, mins, secs,
|
235
|
+
// (100 * us) / AV_TIME_BASE);
|
236
|
+
rb_hash_aset(res, rb_str_new2("duration"), INT2FIX(hours*3600 + mins*60 + secs));
|
237
|
+
}
|
238
|
+
if (ic->start_time != AV_NOPTS_VALUE) {
|
239
|
+
int secs, us;
|
240
|
+
secs = ic->start_time / AV_TIME_BASE;
|
241
|
+
us = abs(ic->start_time % AV_TIME_BASE);
|
242
|
+
rb_hash_aset(res, rb_str_new2("start"), INT2FIX((int)av_rescale(us, 1000000, AV_TIME_BASE)));
|
243
|
+
}
|
244
|
+
if (ic->bit_rate) {
|
245
|
+
rb_hash_aset(res, rb_str_new2("bitrate"), INT2FIX(ic->bit_rate));
|
246
|
+
}
|
247
|
+
}
|
248
|
+
// for (i = 0; i < ic->nb_chapters; i++) {
|
249
|
+
// AVChapter *ch = ic->chapters[i];
|
250
|
+
// av_log(NULL, AV_LOG_INFO, " Chapter #%d.%d: ", index, i);
|
251
|
+
// av_log(NULL, AV_LOG_INFO, "start %f, ", ch->start * av_q2d(ch->time_base));
|
252
|
+
// av_log(NULL, AV_LOG_INFO, "end %f\n", ch->end * av_q2d(ch->time_base));
|
253
|
+
|
254
|
+
// VALUE metadata = rb_hash_new();
|
255
|
+
// my_dump_metadata(NULL, ch->metadata, " ", metadata);
|
256
|
+
// }
|
257
|
+
// if(ic->nb_programs) {
|
258
|
+
// int j, k, total = 0;
|
259
|
+
// for(j=0; j<ic->nb_programs; j++) {
|
260
|
+
// AVDictionaryEntry *name = av_dict_get(ic->programs[j]->metadata,
|
261
|
+
// "name", NULL, 0);
|
262
|
+
// av_log(NULL, AV_LOG_INFO, " Program %d %s\n", ic->programs[j]->id,
|
263
|
+
// name ? name->value : "");
|
264
|
+
// VALUE metadata = rb_hash_new();
|
265
|
+
// my_dump_metadata(NULL, ic->programs[j]->metadata, " ", metadata);
|
266
|
+
// for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) {
|
267
|
+
// my_dump_stream_format(ic, ic->programs[j]->stream_index[k], index, is_output, res);
|
268
|
+
// printed[ic->programs[j]->stream_index[k]] = 1;
|
269
|
+
// }
|
270
|
+
// total += ic->programs[j]->nb_stream_indexes;
|
271
|
+
// }
|
272
|
+
// if (total < ic->nb_streams)
|
273
|
+
// av_log(NULL, AV_LOG_INFO, " No Program\n");
|
274
|
+
// }
|
275
|
+
VALUE streams = rb_ary_new();
|
276
|
+
for(i=0;i<ic->nb_streams;i++)
|
277
|
+
{
|
278
|
+
if (!printed[i])
|
279
|
+
{
|
280
|
+
VALUE stream = rb_hash_new();
|
281
|
+
my_dump_stream_format(ic, i, index, is_output, stream);
|
282
|
+
rb_ary_push(streams, stream);
|
306
283
|
}
|
307
284
|
}
|
285
|
+
rb_hash_aset(res, rb_str_new2("streams"), streams);
|
286
|
+
|
287
|
+
av_free(printed);
|
288
|
+
}
|
289
|
+
|
290
|
+
int get_bit_rate(AVCodecContext *ctx)
|
291
|
+
{
|
292
|
+
int bit_rate;
|
293
|
+
int bits_per_sample;
|
294
|
+
|
295
|
+
switch (ctx->codec_type) {
|
296
|
+
case AVMEDIA_TYPE_VIDEO:
|
297
|
+
case AVMEDIA_TYPE_DATA:
|
298
|
+
case AVMEDIA_TYPE_SUBTITLE:
|
299
|
+
case AVMEDIA_TYPE_ATTACHMENT:
|
300
|
+
bit_rate = ctx->bit_rate;
|
301
|
+
break;
|
302
|
+
case AVMEDIA_TYPE_AUDIO:
|
303
|
+
bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
|
304
|
+
bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate;
|
305
|
+
break;
|
306
|
+
default:
|
307
|
+
bit_rate = 0;
|
308
|
+
break;
|
309
|
+
}
|
310
|
+
return bit_rate;
|
308
311
|
}
|
309
312
|
|
310
313
|
VALUE get_info(VALUE self, VALUE arg)
|
data/ffmpeg-video-info.gemspec
CHANGED
@@ -2,15 +2,17 @@
|
|
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.1.
|
5
|
+
# stub: ffmpeg-video-info 0.1.5 ruby lib
|
6
|
+
# stub: ext/ffmpeg_video_info/extconf.rb
|
6
7
|
|
7
8
|
Gem::Specification.new do |s|
|
8
9
|
s.name = "ffmpeg-video-info"
|
9
|
-
s.version = "0.1.
|
10
|
+
s.version = "0.1.5"
|
10
11
|
|
11
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
|
+
s.require_paths = ["lib"]
|
12
14
|
s.authors = ["Pavel Tatarsky"]
|
13
|
-
s.date = "
|
15
|
+
s.date = "2014-10-25"
|
14
16
|
s.description = "It only provides gathering info about media files"
|
15
17
|
s.email = "fazzzenda@mail.ru"
|
16
18
|
s.extensions = ["ext/ffmpeg_video_info/extconf.rb"]
|
@@ -35,30 +37,29 @@ Gem::Specification.new do |s|
|
|
35
37
|
]
|
36
38
|
s.homepage = "http://github.com/vintikzzz/ffmpeg-video-info"
|
37
39
|
s.licenses = ["MIT"]
|
38
|
-
s.
|
39
|
-
s.rubygems_version = "2.1.11"
|
40
|
+
s.rubygems_version = "2.2.2"
|
40
41
|
s.summary = "Ruby binding for FFmpeg library"
|
41
42
|
|
42
43
|
if s.respond_to? :specification_version then
|
43
44
|
s.specification_version = 4
|
44
45
|
|
45
46
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
-
s.add_development_dependency(%q<rdoc>, ["
|
47
|
-
s.add_development_dependency(%q<bundler>, ["
|
48
|
-
s.add_development_dependency(%q<jeweler>, ["
|
47
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
49
50
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
50
51
|
s.add_development_dependency(%q<rake-compiler>, [">= 0"])
|
51
52
|
else
|
52
|
-
s.add_dependency(%q<rdoc>, ["
|
53
|
-
s.add_dependency(%q<bundler>, ["
|
54
|
-
s.add_dependency(%q<jeweler>, ["
|
53
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
54
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
55
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
55
56
|
s.add_dependency(%q<rspec>, [">= 0"])
|
56
57
|
s.add_dependency(%q<rake-compiler>, [">= 0"])
|
57
58
|
end
|
58
59
|
else
|
59
|
-
s.add_dependency(%q<rdoc>, ["
|
60
|
-
s.add_dependency(%q<bundler>, ["
|
61
|
-
s.add_dependency(%q<jeweler>, ["
|
60
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
61
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
62
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
62
63
|
s.add_dependency(%q<rspec>, [">= 0"])
|
63
64
|
s.add_dependency(%q<rake-compiler>, [">= 0"])
|
64
65
|
end
|
data/spec/lib/info_spec.rb
CHANGED
@@ -11,8 +11,10 @@ describe FFmpegVideoInfo do
|
|
11
11
|
end
|
12
12
|
context 'with proper args' do
|
13
13
|
subject { OpenStruct.new(FFmpegVideoInfo.get('./spec/fixtures/test.mp4')) }
|
14
|
-
|
15
|
-
|
14
|
+
it 'prints proper data' do
|
15
|
+
expect(subject.format_name).to eql 'mov,mp4,m4a,3gp,3g2,mj2'
|
16
|
+
expect(subject.file_name).to eql './spec/fixtures/test.mp4'
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffmpeg-video-info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Tatarsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jeweler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake-compiler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: It only provides gathering info about media files
|
@@ -89,7 +89,7 @@ extra_rdoc_files:
|
|
89
89
|
- LICENSE.txt
|
90
90
|
- README.rdoc
|
91
91
|
files:
|
92
|
-
- .document
|
92
|
+
- ".document"
|
93
93
|
- Gemfile
|
94
94
|
- Gemfile.lock
|
95
95
|
- LICENSE.txt
|
@@ -112,17 +112,17 @@ require_paths:
|
|
112
112
|
- lib
|
113
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.2.2
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Ruby binding for FFmpeg library
|