rmovie 0.5.0 → 0.5.1
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/ext/rmovie/extconf.rb +10 -12
- data/ext/rmovie/quadrupel/ChangeLog +9 -0
- data/ext/rmovie/quadrupel/LICENSE +339 -0
- data/ext/rmovie/quadrupel/Makefile +3 -4
- data/ext/rmovie/quadrupel/TODO +2 -0
- data/ext/rmovie/quadrupel/qp_animated_gif.c +277 -0
- data/ext/rmovie/quadrupel/qp_animated_gif.h +36 -0
- data/ext/rmovie/quadrupel/qp_movie.c +13 -20
- data/ext/rmovie/quadrupel/qp_util.h +8 -1
- data/ext/rmovie/{rmovie_main.c → rmovie.c} +11 -1
- data/ext/rmovie/rmovie.h +7 -0
- data/ext/rmovie/rmovie_animated_gif.c +101 -0
- data/ext/rmovie/rmovie_animated_gif.h +6 -0
- data/ext/rmovie/rmovie_frame.c +62 -138
- data/ext/rmovie/rmovie_frame.h +3 -2
- data/ext/rmovie/rmovie_movie.c +15 -16
- data/lib/rmovie/version.rb +1 -1
- data/test/animated_gif.rb +20 -0
- data/test/conf/rmovie_test_config.rb +3 -0
- data/test/crop_frame.rb +12 -0
- data/test/export_movie.rb +3 -1
- data/test/get_frame.rb +5 -4
- data/test/get_frames_reverse.rb +2 -3
- data/test/lib/rmovie_utils.rb +10 -0
- data/test/out.txt +599 -0
- data/test/pixel_format.rb +2 -3
- data/test/resize_frame.rb +12 -0
- data/test/to_s.rb +3 -15
- data/test/to_string.rb +3 -13
- data/test/util/print_methods.rb +11 -0
- metadata +24 -14
- data/ext/rmovie/Makefile +0 -149
- data/ext/rmovie/config.h +0 -3
- data/ext/rmovie/mkmf.log +0 -24
- data/test/media/1701-D.mov +0 -0
- data/test/media/Ballad of the Sneak.mp3 +0 -0
- data/test/media/irnbru-singsong.mov +0 -0
- data/test/media/test.mov +0 -0
data/test/pixel_format.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'rmovie'
|
4
|
+
require 'conf/rmovie_test_config'
|
5
|
+
require 'lib/rmovie_utils'
|
6
|
+
|
7
|
+
mov = RMovie::Movie.new("#{$media_dir}/1701-D.mov")
|
8
|
+
frame = mov.frame(1)
|
9
|
+
|
10
|
+
MovieUtils.write_frame_to_jpg_file(frame, "#{$tmp_dir}/before_resize.jpg")
|
11
|
+
frame.resize!(30,30)
|
12
|
+
MovieUtils.write_frame_to_jpg_file(frame, "#{$tmp_dir}/after_resize.jpg")
|
data/test/to_s.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
require 'rmovie'
|
4
|
-
require '
|
5
|
-
|
6
|
-
$script_dir = File.dirname(File.expand_path($0))
|
7
|
-
$media_dir = "#{$script_dir}/media/"
|
4
|
+
require 'conf/rmovie_test_config'
|
5
|
+
require 'lib/rmovie_utils'
|
8
6
|
|
9
7
|
mov = RMovie::Movie.new("#{$media_dir}/irnbru-singsong.mov")
|
10
8
|
|
@@ -12,16 +10,6 @@ print "Movie frame count = ", mov.frame_count, "\n"
|
|
12
10
|
|
13
11
|
frames = [10, 5, 3]
|
14
12
|
|
15
|
-
#frame = mov.frame(10)
|
16
|
-
|
17
13
|
frames.each { |frame_num|
|
18
|
-
|
19
|
-
|
20
|
-
frame_as_string = frame.to_s
|
21
|
-
|
22
|
-
img = Magick::Image.new(frame.width, frame.height)
|
23
|
-
|
24
|
-
img.import_pixels(0, 0, frame.width, frame.height, "RGB", frame_as_string, Magick::CharPixel)
|
25
|
-
|
26
|
-
img.write("#{frame_num}-out.jpg")
|
14
|
+
MovieUtils.write_frame_to_jpg_file(mov.frame(frame_num), "#{$tmp_dir}/#{frame_num}-out.jpg")
|
27
15
|
}
|
data/test/to_string.rb
CHANGED
@@ -1,19 +1,9 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
require 'rmovie'
|
4
|
-
require '
|
5
|
-
|
6
|
-
$script_dir = File.dirname(File.expand_path($0))
|
7
|
-
$media_dir = "#{$script_dir}/media/"
|
4
|
+
require 'conf/rmovie_test_config'
|
5
|
+
require 'lib/rmovie_utils'
|
8
6
|
|
9
7
|
mov = RMovie::Movie.new("#{$media_dir}/irnbru-singsong.mov")
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
frame_as_string = frame.to_string
|
14
|
-
|
15
|
-
img = Magick::Image.new(frame.width, frame.height)
|
16
|
-
|
17
|
-
img.import_pixels(0, 0, frame.width, frame.height, "RGB", frame_as_string, Magick::CharPixel)
|
18
|
-
|
19
|
-
img.write('out.jpg')
|
9
|
+
MovieUtils.write_frame_to_jpg_file(mov.frame(1), "#{$tmp_dir}/out.jpg")
|
metadata
CHANGED
@@ -3,14 +3,14 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rmovie
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2006-
|
8
|
-
summary: rmovie is an extension to allow Ruby scripts to get info from video
|
6
|
+
version: 0.5.1
|
7
|
+
date: 2006-11-03 00:00:00 -08:00
|
8
|
+
summary: rmovie is an extension to allow Ruby scripts to get info from video filespec.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: ffmpeg.php@gmail.com
|
12
12
|
homepage: http://rubyforge.org/rmovie
|
13
|
-
rubyforge_project:
|
13
|
+
rubyforge_project: rmovie
|
14
14
|
description:
|
15
15
|
autorequire: rmovie
|
16
16
|
default_executable:
|
@@ -36,11 +36,11 @@ files:
|
|
36
36
|
- ext/rmovie/extconf.rb
|
37
37
|
- ext/rmovie/rmovie_movie.c
|
38
38
|
- ext/rmovie/rmovie_movie.h
|
39
|
-
- ext/rmovie/
|
40
|
-
- ext/rmovie/
|
41
|
-
- ext/rmovie/config.h
|
42
|
-
- ext/rmovie/Makefile
|
39
|
+
- ext/rmovie/rmovie.c
|
40
|
+
- ext/rmovie/rmovie.h
|
43
41
|
- ext/rmovie/pre-setup.rb
|
42
|
+
- ext/rmovie/rmovie_animated_gif.c
|
43
|
+
- ext/rmovie/rmovie_animated_gif.h
|
44
44
|
- ext/rmovie/quadrupel/mkinstalldirs
|
45
45
|
- ext/rmovie/quadrupel/qp_frame.h
|
46
46
|
- ext/rmovie/quadrupel/qp_movie.c
|
@@ -51,22 +51,32 @@ files:
|
|
51
51
|
- ext/rmovie/quadrupel/qp_frame.c
|
52
52
|
- ext/rmovie/quadrupel/Makefile
|
53
53
|
- ext/rmovie/quadrupel/qp_util.c
|
54
|
+
- ext/rmovie/quadrupel/qp_animated_gif.c
|
55
|
+
- ext/rmovie/quadrupel/qp_animated_gif.h
|
56
|
+
- ext/rmovie/quadrupel/LICENSE
|
57
|
+
- ext/rmovie/quadrupel/ChangeLog
|
54
58
|
- lib/rmovie
|
55
59
|
- lib/rmovie/version.rb
|
56
60
|
- test/media
|
57
|
-
- test/
|
61
|
+
- test/get_frame.rb
|
62
|
+
- test/crop_frame.rb
|
58
63
|
- test/export_movie.rb
|
59
64
|
- test/test_rmovie.rb
|
60
65
|
- test/init_rmovie.rb
|
61
66
|
- test/pixel_format.rb
|
62
|
-
- test/get_frame.rb
|
63
67
|
- test/to_string.rb
|
68
|
+
- test/lib
|
69
|
+
- test/conf
|
70
|
+
- test/util
|
64
71
|
- test/to_s.rb
|
65
72
|
- test/get_frames_reverse.rb
|
66
|
-
- test/
|
67
|
-
- test/
|
68
|
-
- test/
|
69
|
-
- test/
|
73
|
+
- test/out.txt
|
74
|
+
- test/resize_frame.rb
|
75
|
+
- test/animated_gif.rb
|
76
|
+
- test/tmp
|
77
|
+
- test/lib/rmovie_utils.rb
|
78
|
+
- test/conf/rmovie_test_config.rb
|
79
|
+
- test/util/print_methods.rb
|
70
80
|
test_files: []
|
71
81
|
|
72
82
|
rdoc_options: []
|
data/ext/rmovie/Makefile
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
#### Start of system configuration section. ####
|
5
|
-
|
6
|
-
srcdir = .
|
7
|
-
topdir = /usr/lib/ruby/1.8/i686-linux
|
8
|
-
hdrdir = $(topdir)
|
9
|
-
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
-
prefix = $(DESTDIR)/usr
|
11
|
-
exec_prefix = $(DESTDIR)/usr
|
12
|
-
sitedir = $(DESTDIR)/usr/lib/ruby/site_ruby
|
13
|
-
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
14
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
15
|
-
dvidir = $(docdir)
|
16
|
-
datarootdir = $(prefix)/share
|
17
|
-
archdir = $(rubylibdir)/$(arch)
|
18
|
-
sbindir = $(exec_prefix)/sbin
|
19
|
-
psdir = $(docdir)
|
20
|
-
localedir = $(datarootdir)/locale
|
21
|
-
htmldir = $(docdir)
|
22
|
-
datadir = $(DESTDIR)/usr/share
|
23
|
-
includedir = $(prefix)/include
|
24
|
-
infodir = $(DESTDIR)/usr/share/info
|
25
|
-
sysconfdir = $(DESTDIR)/etc
|
26
|
-
mandir = $(DESTDIR)/usr/share/man
|
27
|
-
libdir = $(DESTDIR)/usr/lib
|
28
|
-
sharedstatedir = $(prefix)/com
|
29
|
-
oldincludedir = $(DESTDIR)/usr/include
|
30
|
-
pdfdir = $(docdir)
|
31
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
32
|
-
bindir = $(exec_prefix)/bin
|
33
|
-
localstatedir = $(DESTDIR)/var/lib
|
34
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
35
|
-
libexecdir = $(exec_prefix)/libexec
|
36
|
-
|
37
|
-
CC = i686-pc-linux-gnu-gcc
|
38
|
-
LIBRUBY = $(LIBRUBY_SO)
|
39
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
40
|
-
LIBRUBYARG_SHARED = -Wl,-R -Wl,$(libdir) -L$(libdir) -L. -l$(RUBY_SO_NAME)
|
41
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
42
|
-
|
43
|
-
RUBY_EXTCONF_H = config.h
|
44
|
-
CFLAGS = -fPIC -O2 -march=athlon-xp -fPIC
|
45
|
-
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -Iquadrupel
|
46
|
-
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\"
|
47
|
-
CXXFLAGS = $(CFLAGS)
|
48
|
-
DLDFLAGS = -Lquadrupel/
|
49
|
-
LDSHARED = $(CC) -shared
|
50
|
-
AR = i686-pc-linux-gnu-ar
|
51
|
-
EXEEXT =
|
52
|
-
|
53
|
-
RUBY_INSTALL_NAME = ruby18
|
54
|
-
RUBY_SO_NAME = ruby18
|
55
|
-
arch = i686-linux
|
56
|
-
sitearch = i686-linux
|
57
|
-
ruby_version = 1.8
|
58
|
-
ruby = /usr/bin/ruby18
|
59
|
-
RUBY = $(ruby)
|
60
|
-
RM = rm -f
|
61
|
-
MAKEDIRS = mkdir -p
|
62
|
-
INSTALL = /bin/install -c
|
63
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
64
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
65
|
-
COPY = cp
|
66
|
-
|
67
|
-
#### End of system configuration section. ####
|
68
|
-
|
69
|
-
preload =
|
70
|
-
|
71
|
-
libpath = $(libdir)
|
72
|
-
LIBPATH = -L'$(libdir)' -Wl,-R'$(libdir)'
|
73
|
-
DEFFILE =
|
74
|
-
|
75
|
-
CLEANFILES =
|
76
|
-
DISTCLEANFILES =
|
77
|
-
|
78
|
-
extout =
|
79
|
-
extout_prefix =
|
80
|
-
target_prefix =
|
81
|
-
LOCAL_LIBS =
|
82
|
-
LIBS = $(LIBRUBYARG_SHARED) -lavformat -lavcodec -ldl -lcrypt -lm -lc -lquadrupel
|
83
|
-
SRCS = rmovie_frame.c rmovie_movie.c rmovie_main.c
|
84
|
-
OBJS = rmovie_frame.o rmovie_movie.o rmovie_main.o
|
85
|
-
TARGET = rmovie
|
86
|
-
DLLIB = $(TARGET).so
|
87
|
-
EXTSTATIC =
|
88
|
-
STATIC_LIB =
|
89
|
-
|
90
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
91
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
92
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
93
|
-
|
94
|
-
TARGET_SO = $(DLLIB)
|
95
|
-
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
|
96
|
-
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
97
|
-
|
98
|
-
all: $(DLLIB)
|
99
|
-
static: $(STATIC_LIB)
|
100
|
-
|
101
|
-
clean:
|
102
|
-
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
103
|
-
|
104
|
-
distclean: clean
|
105
|
-
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
106
|
-
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
107
|
-
|
108
|
-
realclean: distclean
|
109
|
-
install: install-so install-rb
|
110
|
-
|
111
|
-
install-so: $(RUBYARCHDIR)
|
112
|
-
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
113
|
-
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
114
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
115
|
-
install-rb: pre-install-rb install-rb-default
|
116
|
-
install-rb-default: pre-install-rb-default
|
117
|
-
pre-install-rb: Makefile
|
118
|
-
pre-install-rb-default: Makefile
|
119
|
-
$(RUBYARCHDIR):
|
120
|
-
$(MAKEDIRS) $@
|
121
|
-
|
122
|
-
site-install: site-install-so site-install-rb
|
123
|
-
site-install-so: install-so
|
124
|
-
site-install-rb: install-rb
|
125
|
-
|
126
|
-
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
127
|
-
|
128
|
-
.cc.o:
|
129
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
130
|
-
|
131
|
-
.cxx.o:
|
132
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
133
|
-
|
134
|
-
.cpp.o:
|
135
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
136
|
-
|
137
|
-
.C.o:
|
138
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
139
|
-
|
140
|
-
.c.o:
|
141
|
-
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
142
|
-
|
143
|
-
$(DLLIB): $(OBJS)
|
144
|
-
@-$(RM) $@
|
145
|
-
$(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o $@ $(OBJS) $(LOCAL_LIBS) $(LIBS)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
$(OBJS): ruby.h defines.h $(RUBY_EXTCONF_H)
|
data/ext/rmovie/config.h
DELETED
data/ext/rmovie/mkmf.log
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
have_library: checking for avcodec_init() in -lavcodec... -------------------- yes
|
2
|
-
|
3
|
-
"i686-pc-linux-gnu-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -O2 -march=athlon-xp -fPIC conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -lruby18-static -lavcodec -ldl -lcrypt -lm -lc"
|
4
|
-
checked program was:
|
5
|
-
/* begin */
|
6
|
-
1: /*top*/
|
7
|
-
2: int main() { return 0; }
|
8
|
-
3: int t() { avcodec_init(); return 0; }
|
9
|
-
/* end */
|
10
|
-
|
11
|
-
--------------------
|
12
|
-
|
13
|
-
have_library: checking for av_register_all() in -lavformat... -------------------- yes
|
14
|
-
|
15
|
-
"i686-pc-linux-gnu-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -O2 -march=athlon-xp -fPIC conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -lavcodec -lruby18-static -lavformat -lavcodec -ldl -lcrypt -lm -lc"
|
16
|
-
checked program was:
|
17
|
-
/* begin */
|
18
|
-
1: /*top*/
|
19
|
-
2: int main() { return 0; }
|
20
|
-
3: int t() { av_register_all(); return 0; }
|
21
|
-
/* end */
|
22
|
-
|
23
|
-
--------------------
|
24
|
-
|
data/test/media/1701-D.mov
DELETED
Binary file
|
Binary file
|
Binary file
|
data/test/media/test.mov
DELETED
Binary file
|