clutter-gstreamer 2.2.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +70 -0
- data/lib/clutter-gst.rb +79 -0
- data/lib/clutter-gstreamer.rb +17 -0
- data/sample/media-actions-pause.png +0 -0
- data/sample/media-actions-start.png +0 -0
- data/sample/vid-panel.png +0 -0
- data/sample/video-player.rb +376 -0
- data/sample/video-sink-navigation.rb +98 -0
- data/sample/video-sink.rb +87 -0
- data/test/clutter-gstreamer-test-utils.rb +41 -0
- data/test/run-test.rb +63 -0
- data/test/test-clutter-gst.rb +26 -0
- data/vendor/local/bin/libclutter-gst-3.0-0.dll +0 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-aspectratio.h +105 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-camera-device.h +119 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-camera-manager.h +100 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-camera.h +206 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-content.h +107 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-crop.h +104 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-enum-types.h +23 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-playback.h +169 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-player.h +157 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-types.h +167 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-util.h +53 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-version.h +98 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst-video-sink.h +124 -0
- data/vendor/local/include/clutter-gst-3.0/clutter-gst/clutter-gst.h +47 -0
- data/vendor/local/lib/girepository-1.0/ClutterGst-3.0.typelib +0 -0
- data/vendor/local/lib/gstreamer-1.0/libgstclutter-3.0.dll +0 -0
- data/vendor/local/lib/gstreamer-1.0/libgstclutter-3.0.dll.a +0 -0
- data/vendor/local/lib/gstreamer-1.0/libgstclutter-3.0.la +41 -0
- data/vendor/local/lib/libclutter-gst-3.0.dll.a +0 -0
- data/vendor/local/lib/libclutter-gst-3.0.la +41 -0
- data/vendor/local/lib/pkgconfig/clutter-gst-3.0.pc +12 -0
- data/vendor/local/share/gir-1.0/ClutterGst-3.0.gir +3308 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstAspectratio.html +171 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstCamera.html +1528 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstCameraDevice.html +418 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstContent.html +551 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstCrop.html +198 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstPlayback.html +1559 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ClutterGstPlayer.html +805 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ch01.html +33 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ch02.html +42 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ch03.html +45 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ch04.html +35 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/ch05.html +39 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/clutter-gst-3.0.devhelp2 +197 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/clutter-gst-Utilities.html +316 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/clutter-gst-Versioning-Macros.html +176 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/clutter-gst-Video-Sink.html +560 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/index.html +98 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/index.sgml +273 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/license.html +59 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/style.css +476 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gst-3.0/up.png +0 -0
- data/vendor/local/share/license/clutter-gst/AUTHORS +7 -0
- data/vendor/local/share/license/clutter-gst/COPYING +502 -0
- metadata +163 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This sample code is a port of clutter-gst/examples/video-sink-navigation.c.
|
4
|
+
# It is licensed under the terms of the GNU Lesser General Public
|
5
|
+
# License, version 2.1 or (at your option) later.
|
6
|
+
#
|
7
|
+
# The original header:
|
8
|
+
# video-sink.c - A small example around the videotestsrc ! capsfilter !
|
9
|
+
# navigationtest ! videoconvert ! cluttersink pipeline.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2007,2008 OpenedHand
|
12
|
+
#
|
13
|
+
# Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
|
14
|
+
#
|
15
|
+
# This library is free software; you can redistribute it and/or
|
16
|
+
# modify it under the terms of the GNU Lesser General Public
|
17
|
+
# License as published by the Free Software Foundation; either
|
18
|
+
# version 2.1 of the License, or (at your option) any later version.
|
19
|
+
#
|
20
|
+
# This library is distributed in the hope that it will be useful,
|
21
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
23
|
+
# Lesser General Public License for more details.
|
24
|
+
#
|
25
|
+
# You should have received a copy of the GNU Lesser General Public
|
26
|
+
# License along with this library; if not, write to the Free Software
|
27
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
28
|
+
|
29
|
+
require "clutter-gst"
|
30
|
+
|
31
|
+
stage = Clutter::Stage.new
|
32
|
+
stage.user_resizable = true
|
33
|
+
stage.signal_connect("destroy") do
|
34
|
+
Clutter.main_quit
|
35
|
+
end
|
36
|
+
|
37
|
+
# Make a timeline
|
38
|
+
timeline = Clutter::Timeline.new(1000)
|
39
|
+
timeline.loop = true
|
40
|
+
|
41
|
+
# We need to set certain props on the target texture currently for
|
42
|
+
# efficient/correct playback onto the texture (which sucks a bit)
|
43
|
+
texture = Clutter::Texture.new
|
44
|
+
# NOTE: Because warning is given, I comment out.
|
45
|
+
#texture.set_property("disable-slicing", true)
|
46
|
+
|
47
|
+
texture.signal_connect("size-change") do |texture, width, height|
|
48
|
+
stage = texture.stage
|
49
|
+
next if stage.nil? # go out of the block if stage is nil
|
50
|
+
stage_width, stage_height = stage.size
|
51
|
+
new_height = (height * stage_width) / width
|
52
|
+
if new_height <= stage_height
|
53
|
+
new_width = stage_width
|
54
|
+
new_x = 0
|
55
|
+
new_y = (stage_height - new_height) / 2
|
56
|
+
else
|
57
|
+
new_width = (width * stage_height) / height
|
58
|
+
new_height = stage_height
|
59
|
+
new_x = (stage_width - new_width) / 2
|
60
|
+
new_y = 0
|
61
|
+
end
|
62
|
+
texture.set_position(new_x, new_y)
|
63
|
+
texture.set_size(new_width, new_height)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Set up pipeline
|
67
|
+
pipeline = Gst::Pipeline.new("pipeline")
|
68
|
+
|
69
|
+
src = Gst::ElementFactory.make("videotestsrc")
|
70
|
+
filter = Gst.parse_launch("capsfilter caps=video/x-raw,pixel-aspect-ratio=1/4")
|
71
|
+
|
72
|
+
test = Gst::ElementFactory.make("navigationtest")
|
73
|
+
colorspace = Gst::ElementFactory.make("videoconvert")
|
74
|
+
sink = ClutterGst::VideoSink.new(texture)
|
75
|
+
|
76
|
+
# We can try other patterns
|
77
|
+
# src.pattern = 10
|
78
|
+
|
79
|
+
pipeline << src << filter << test << colorspace << sink
|
80
|
+
src >> filter >> test >> colorspace >> sink
|
81
|
+
pipeline.play
|
82
|
+
|
83
|
+
# Resize with the window
|
84
|
+
constraint = Clutter::BindConstraint.new(stage, :size, 0.0)
|
85
|
+
texture.constraints = constraint
|
86
|
+
|
87
|
+
# Rotate a bit
|
88
|
+
texture.set_pivot_point(0.5, 0.5)
|
89
|
+
texture.set_rotation_angle(:z_axis, 45.0)
|
90
|
+
|
91
|
+
# start the timeline
|
92
|
+
timeline.start
|
93
|
+
|
94
|
+
stage.add_child(texture)
|
95
|
+
# texture.opacity = 0x11
|
96
|
+
stage.show
|
97
|
+
|
98
|
+
Clutter.main
|
@@ -0,0 +1,87 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This sample code is a port of clutter-gst/examples/video-sink.c.
|
4
|
+
# It is licensed under the terms of the GNU Lesser General Public
|
5
|
+
# License, version 2.1 or (at your option) later.
|
6
|
+
#
|
7
|
+
# The original header:
|
8
|
+
# video-sink.c - A small example around the videotestsrc ! warptv !
|
9
|
+
# videoconvert ! cluttersink pipeline.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2007,2008 OpenedHand
|
12
|
+
#
|
13
|
+
# Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
|
14
|
+
#
|
15
|
+
# This library is free software; you can redistribute it and/or
|
16
|
+
# modify it under the terms of the GNU Lesser General Public
|
17
|
+
# License as published by the Free Software Foundation; either
|
18
|
+
# version 2.1 of the License, or (at your option) any later version.
|
19
|
+
#
|
20
|
+
# This library is distributed in the hope that it will be useful,
|
21
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
23
|
+
# Lesser General Public License for more details.
|
24
|
+
#
|
25
|
+
# You should have received a copy of the GNU Lesser General Public
|
26
|
+
# License along with this library; if not, write to the Free Software
|
27
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
28
|
+
|
29
|
+
require "clutter-gst"
|
30
|
+
|
31
|
+
stage = Clutter::Stage.new
|
32
|
+
stage.signal_connect("destroy") do
|
33
|
+
Clutter.main_quit
|
34
|
+
end
|
35
|
+
|
36
|
+
# Make a timeline
|
37
|
+
timeline = Clutter::Timeline.new(1000)
|
38
|
+
timeline.loop = true
|
39
|
+
|
40
|
+
# We need to set certain props on the target texture currently for
|
41
|
+
# efficient/correct playback onto the texture (which sucks a bit)
|
42
|
+
texture = Clutter::Texture.new
|
43
|
+
# NOTE: Because warning is given, I comment out.
|
44
|
+
#texture.set_property("disable-slicing", true)
|
45
|
+
|
46
|
+
texture.signal_connect("size-change") do |widget, width, height|
|
47
|
+
stage = widget.stage
|
48
|
+
next if stage.nil? # go out of the block if stage is nil
|
49
|
+
stage_width, stage_height = stage.size
|
50
|
+
new_height = (height * stage_width) / width
|
51
|
+
if new_height <= stage_height
|
52
|
+
new_width = stage_width
|
53
|
+
new_x = 0
|
54
|
+
new_y = (stage_height - new_height) / 2
|
55
|
+
else
|
56
|
+
new_width = (width * stage_height) / height
|
57
|
+
new_height = stage_height
|
58
|
+
new_x = (stage_width - new_width) / 2
|
59
|
+
new_y = 0
|
60
|
+
end
|
61
|
+
widget.set_position(new_x, new_y)
|
62
|
+
widget.set_size(new_width, new_height)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Set up pipeline
|
66
|
+
pipeline = Gst::Pipeline.new("pipeline")
|
67
|
+
|
68
|
+
src = Gst::ElementFactory.make("videotestsrc")
|
69
|
+
warp = Gst::ElementFactory.make("warptv")
|
70
|
+
colorspace = Gst::ElementFactory.make("videoconvert")
|
71
|
+
sink = ClutterGst::VideoSink.new(texture)
|
72
|
+
|
73
|
+
# We can try other patterns
|
74
|
+
# src.pattern = 10
|
75
|
+
|
76
|
+
pipeline << src << warp << colorspace << sink
|
77
|
+
src >> warp >> colorspace >> sink
|
78
|
+
pipeline.play
|
79
|
+
|
80
|
+
# start the timeline
|
81
|
+
timeline.start
|
82
|
+
|
83
|
+
stage.add_child(texture)
|
84
|
+
# texture.opacity = 0x11
|
85
|
+
stage.show
|
86
|
+
|
87
|
+
Clutter.main
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "test-unit"
|
18
|
+
require "test/unit/notify"
|
19
|
+
|
20
|
+
module ClutterGStreamerTestUtils
|
21
|
+
def later_version?(major, minor, micro=nil)
|
22
|
+
micro ||= 0
|
23
|
+
clutter_gstreamer_version = [
|
24
|
+
ClutterGst::MAJOR_VERSION,
|
25
|
+
ClutterGst::MINOR_VERSION,
|
26
|
+
ClutterGst::MICRO_VERSION,
|
27
|
+
]
|
28
|
+
(clutter_gstreamer_version <=> [major, minor, micro]) >= 0
|
29
|
+
end
|
30
|
+
|
31
|
+
def only_clutter_gstreamer_version(major, minor, micro=nil)
|
32
|
+
micro ||= 0
|
33
|
+
unless later_version?(major, minor, micro)
|
34
|
+
omit("Require Clutter-GStreamer >= #{major}.#{minor}.#{micro}")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def omit_on_travis_ci
|
39
|
+
omit("This test can't be run on Travis CI") if ENV["CI"]
|
40
|
+
end
|
41
|
+
end
|
data/test/run-test.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
have_make = system("which make > /dev/null")
|
20
|
+
|
21
|
+
ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
22
|
+
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
23
|
+
|
24
|
+
glib_base = File.join(ruby_gnome2_base, "glib2")
|
25
|
+
cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
|
26
|
+
gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
|
27
|
+
clutter_base = File.join(ruby_gnome2_base, "clutter")
|
28
|
+
gstreamer_base = File.join(ruby_gnome2_base, "gstreamer")
|
29
|
+
clutter_gstreamer_base = File.join(ruby_gnome2_base, "clutter-gstreamer")
|
30
|
+
|
31
|
+
modules = [
|
32
|
+
[glib_base, "glib2"],
|
33
|
+
[cairo_gobject_base, "cairo-gobject"],
|
34
|
+
[gobject_introspection_base, "gobject-introspection"],
|
35
|
+
[clutter_base, "clutter"],
|
36
|
+
[gstreamer_base, "gstreamer"],
|
37
|
+
[clutter_gstreamer_base, "clutter-gst"],
|
38
|
+
]
|
39
|
+
modules.each do |target, module_name|
|
40
|
+
if File.exist?(File.join(target, "Makefile")) and have_make
|
41
|
+
`make -C #{target.dump} > /dev/null` or exit(false)
|
42
|
+
end
|
43
|
+
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
44
|
+
$LOAD_PATH.unshift(File.join(target, "lib"))
|
45
|
+
end
|
46
|
+
|
47
|
+
$LOAD_PATH.unshift(File.join(glib_base, "test"))
|
48
|
+
require "glib-test-init"
|
49
|
+
|
50
|
+
$VERBOSE = false # TODO: remove me
|
51
|
+
|
52
|
+
$LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
|
53
|
+
require "gobject-introspection-test-utils"
|
54
|
+
|
55
|
+
$LOAD_PATH.unshift(File.join(clutter_base, "test"))
|
56
|
+
require "clutter-test-utils"
|
57
|
+
|
58
|
+
$LOAD_PATH.unshift(File.join(clutter_gstreamer_base, "test"))
|
59
|
+
require "clutter-gstreamer-test-utils"
|
60
|
+
|
61
|
+
require "clutter-gst"
|
62
|
+
|
63
|
+
exit Test::Unit::AutoRunner.run(true)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class ClutterGstTest < Test::Unit::TestCase
|
18
|
+
include ClutterGStreamerTestUtils
|
19
|
+
|
20
|
+
def test_init
|
21
|
+
omit_on_travis_ci
|
22
|
+
assert_nothing_raised do
|
23
|
+
ClutterGst.init
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
Binary file
|
@@ -0,0 +1,105 @@
|
|
1
|
+
/*
|
2
|
+
* Clutter-GStreamer.
|
3
|
+
*
|
4
|
+
* GStreamer integration library for Clutter.
|
5
|
+
*
|
6
|
+
* clutter-gst-aspectratio.c - An object implementing the
|
7
|
+
* ClutterContent interface to render a video with respect to its
|
8
|
+
* aspect ratio.
|
9
|
+
*
|
10
|
+
* Authored by Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
|
11
|
+
*
|
12
|
+
* Copyright (C) 2013 Intel Corporation
|
13
|
+
*
|
14
|
+
* This library is free software; you can redistribute it and/or
|
15
|
+
* modify it under the terms of the GNU Lesser General Public
|
16
|
+
* License as published by the Free Software Foundation; either
|
17
|
+
* version 2 of the License, or (at your option) any later version.
|
18
|
+
*
|
19
|
+
* This library is distributed in the hope that it will be useful,
|
20
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
22
|
+
* Lesser General Public License for more details.
|
23
|
+
*
|
24
|
+
* You should have received a copy of the GNU Lesser General Public
|
25
|
+
* License along with this library; if not, write to the
|
26
|
+
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
27
|
+
* Boston, MA 02111-1307, USA.
|
28
|
+
*/
|
29
|
+
|
30
|
+
#if !defined(__CLUTTER_GST_H_INSIDE__) && !defined(CLUTTER_GST_COMPILATION)
|
31
|
+
#error "Only <clutter-gst/clutter-gst.h> can be include directly."
|
32
|
+
#endif
|
33
|
+
|
34
|
+
#ifndef __CLUTTER_GST_ASPECTRATIO_H__
|
35
|
+
#define __CLUTTER_GST_ASPECTRATIO_H__
|
36
|
+
|
37
|
+
#include <glib-object.h>
|
38
|
+
|
39
|
+
#include <clutter-gst/clutter-gst-content.h>
|
40
|
+
|
41
|
+
G_BEGIN_DECLS
|
42
|
+
|
43
|
+
#define CLUTTER_GST_TYPE_ASPECTRATIO clutter_gst_aspectratio_get_type()
|
44
|
+
|
45
|
+
#define CLUTTER_GST_ASPECTRATIO(obj) \
|
46
|
+
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
47
|
+
CLUTTER_GST_TYPE_ASPECTRATIO, ClutterGstAspectratio))
|
48
|
+
|
49
|
+
#define CLUTTER_GST_ASPECTRATIO_CLASS(klass) \
|
50
|
+
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
51
|
+
CLUTTER_GST_TYPE_ASPECTRATIO, ClutterGstAspectratioClass))
|
52
|
+
|
53
|
+
#define CLUTTER_GST_IS_ASPECTRATIO(obj) \
|
54
|
+
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
|
55
|
+
CLUTTER_GST_TYPE_ASPECTRATIO))
|
56
|
+
|
57
|
+
#define CLUTTER_GST_IS_ASPECTRATIO_CLASS(klass) \
|
58
|
+
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
59
|
+
CLUTTER_GST_TYPE_ASPECTRATIO))
|
60
|
+
|
61
|
+
#define CLUTTER_GST_ASPECTRATIO_GET_CLASS(obj) \
|
62
|
+
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
|
63
|
+
CLUTTER_GST_TYPE_ASPECTRATIO, ClutterGstAspectratioClass))
|
64
|
+
|
65
|
+
typedef struct _ClutterGstAspectratio ClutterGstAspectratio;
|
66
|
+
typedef struct _ClutterGstAspectratioClass ClutterGstAspectratioClass;
|
67
|
+
typedef struct _ClutterGstAspectratioPrivate ClutterGstAspectratioPrivate;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* ClutterGstAspectratio:
|
71
|
+
*
|
72
|
+
* Implementation of #ClutterGstContent that displays video streams
|
73
|
+
* with respects to their aspect ratio.
|
74
|
+
*
|
75
|
+
* The #ClutterGstAspectratio structure contains only private data and
|
76
|
+
* should not be accessed directly.
|
77
|
+
*/
|
78
|
+
struct _ClutterGstAspectratio
|
79
|
+
{
|
80
|
+
/*< private >*/
|
81
|
+
ClutterGstContent parent;
|
82
|
+
|
83
|
+
ClutterGstAspectratioPrivate *priv;
|
84
|
+
};
|
85
|
+
|
86
|
+
/**
|
87
|
+
* ClutterGstAspectratioClass:
|
88
|
+
*
|
89
|
+
* Base class for #ClutterGstAspectratio.
|
90
|
+
*/
|
91
|
+
struct _ClutterGstAspectratioClass
|
92
|
+
{
|
93
|
+
/*< private >*/
|
94
|
+
ClutterGstContentClass parent_class;
|
95
|
+
|
96
|
+
void *_padding_dummy[8];
|
97
|
+
};
|
98
|
+
|
99
|
+
GType clutter_gst_aspectratio_get_type (void) G_GNUC_CONST;
|
100
|
+
|
101
|
+
ClutterContent *clutter_gst_aspectratio_new (void);
|
102
|
+
|
103
|
+
G_END_DECLS
|
104
|
+
|
105
|
+
#endif /* __CLUTTER_GST_ASPECTRATIO_H__ */
|
@@ -0,0 +1,119 @@
|
|
1
|
+
/*
|
2
|
+
* Clutter-GStreamer.
|
3
|
+
*
|
4
|
+
* GStreamer integration library for Clutter.
|
5
|
+
*
|
6
|
+
* clutter-gst-camera-device.h - GObject representing a camera device using GStreamer.
|
7
|
+
*
|
8
|
+
* Authored By Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
|
9
|
+
*
|
10
|
+
* Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
|
11
|
+
*
|
12
|
+
* This library is free software; you can redistribute it and/or
|
13
|
+
* modify it under the terms of the GNU Lesser General Public
|
14
|
+
* License as published by the Free Software Foundation; either
|
15
|
+
* version 2 of the License, or (at your option) any later version.
|
16
|
+
*
|
17
|
+
* This library is distributed in the hope that it will be useful,
|
18
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
20
|
+
* Lesser General Public License for more details.
|
21
|
+
*
|
22
|
+
* You should have received a copy of the GNU Lesser General Public
|
23
|
+
* License along with this library; if not, write to the
|
24
|
+
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
25
|
+
* Boston, MA 02111-1307, USA.
|
26
|
+
*/
|
27
|
+
|
28
|
+
#if !defined(__CLUTTER_GST_H_INSIDE__) && !defined(CLUTTER_GST_COMPILATION)
|
29
|
+
#error "Only <clutter-gst/clutter-gst.h> can be included directly."
|
30
|
+
#endif
|
31
|
+
|
32
|
+
#ifndef __CLUTTER_GST_CAMERA_DEVICE_H__
|
33
|
+
#define __CLUTTER_GST_CAMERA_DEVICE_H__
|
34
|
+
|
35
|
+
#include <glib-object.h>
|
36
|
+
#include <gst/gstelement.h>
|
37
|
+
|
38
|
+
G_BEGIN_DECLS
|
39
|
+
|
40
|
+
#define CLUTTER_GST_TYPE_CAMERA_DEVICE clutter_gst_camera_device_get_type()
|
41
|
+
|
42
|
+
#define CLUTTER_GST_CAMERA_DEVICE(obj) \
|
43
|
+
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
44
|
+
CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDevice))
|
45
|
+
|
46
|
+
#define CLUTTER_GST_CAMERA_DEVICE_CLASS(klass) \
|
47
|
+
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
48
|
+
CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDeviceClass))
|
49
|
+
|
50
|
+
#define CLUTTER_GST_IS_CAMERA_DEVICE(obj) \
|
51
|
+
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
|
52
|
+
CLUTTER_GST_TYPE_CAMERA_DEVICE))
|
53
|
+
|
54
|
+
#define CLUTTER_GST_IS_CAMERA_DEVICE_CLASS(klass) \
|
55
|
+
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
56
|
+
CLUTTER_GST_TYPE_CAMERA_DEVICE))
|
57
|
+
|
58
|
+
#define CLUTTER_GST_CAMERA_DEVICE_GET_CLASS(obj) \
|
59
|
+
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
|
60
|
+
CLUTTER_GST_TYPE_CAMERA_DEVICE, ClutterGstCameraDeviceClass))
|
61
|
+
|
62
|
+
typedef struct _ClutterGstCameraDevice ClutterGstCameraDevice;
|
63
|
+
typedef struct _ClutterGstCameraDeviceClass ClutterGstCameraDeviceClass;
|
64
|
+
typedef struct _ClutterGstCameraDevicePrivate ClutterGstCameraDevicePrivate;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* ClutterGstCameraDevice:
|
68
|
+
*
|
69
|
+
* GObject representing a camera device using GStreamer.
|
70
|
+
*
|
71
|
+
* The #ClutterGstCameraDevice structure contains only private data and
|
72
|
+
* should not be accessed directly.
|
73
|
+
*/
|
74
|
+
struct _ClutterGstCameraDevice
|
75
|
+
{
|
76
|
+
/*< private >*/
|
77
|
+
GObject parent;
|
78
|
+
ClutterGstCameraDevicePrivate *priv;
|
79
|
+
};
|
80
|
+
|
81
|
+
/**
|
82
|
+
* ClutterGstCameraDeviceClass:
|
83
|
+
*
|
84
|
+
* Base class for #ClutterGstCameraDevice.
|
85
|
+
*/
|
86
|
+
struct _ClutterGstCameraDeviceClass
|
87
|
+
{
|
88
|
+
/*< private >*/
|
89
|
+
GObjectClass parent_class;
|
90
|
+
|
91
|
+
void (* capture_resolution_changed) (ClutterGstCameraDevice *device,
|
92
|
+
gint width,
|
93
|
+
gint height);
|
94
|
+
|
95
|
+
/* Future padding */
|
96
|
+
void (* _clutter_reserved1) (void);
|
97
|
+
void (* _clutter_reserved2) (void);
|
98
|
+
void (* _clutter_reserved3) (void);
|
99
|
+
void (* _clutter_reserved4) (void);
|
100
|
+
void (* _clutter_reserved5) (void);
|
101
|
+
void (* _clutter_reserved6) (void);
|
102
|
+
};
|
103
|
+
|
104
|
+
GType clutter_gst_camera_device_get_type (void) G_GNUC_CONST;
|
105
|
+
|
106
|
+
const gchar * clutter_gst_camera_device_get_node (ClutterGstCameraDevice *device);
|
107
|
+
const gchar * clutter_gst_camera_device_get_name (ClutterGstCameraDevice *device);
|
108
|
+
|
109
|
+
const GPtrArray * clutter_gst_camera_device_get_supported_resolutions (ClutterGstCameraDevice *device);
|
110
|
+
void clutter_gst_camera_device_get_capture_resolution (ClutterGstCameraDevice *device,
|
111
|
+
gint *width,
|
112
|
+
gint *height);
|
113
|
+
void clutter_gst_camera_device_set_capture_resolution (ClutterGstCameraDevice *device,
|
114
|
+
gint width,
|
115
|
+
gint height);
|
116
|
+
|
117
|
+
G_END_DECLS
|
118
|
+
|
119
|
+
#endif /* __CLUTTER_GST_CAMERA_DEVICE_H__ */
|