gstreamer 4.3.2 → 4.3.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/sample/video-thumbnail.rb +75 -0
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea71c540264e2fdd1f4a9d52aaa4adb6ca2db71c721d142e0cdfcbc69b263589
4
- data.tar.gz: f7fc52fe4276890a76fe9b5701a3aa8915d5424a6697d450682fb48a3a20896c
3
+ metadata.gz: a8185a5041578c54deeb9ba0f27c3a1d0c4de2d59cf86ba692ecbcb07f34d30f
4
+ data.tar.gz: 33d93c0829983cc1855ea77567ce48806be0b381176aee3eae2847e96080e1a7
5
5
  SHA512:
6
- metadata.gz: 68d79964b2e8bd484253d29a81b5ce94b791887015a70d9bc5c5d6567381df9d1098bbb633ff5f5db0c9175451c1afc33480e2065c0d28dcdb4da88acd53ff63
7
- data.tar.gz: b833938874c72e273ab73044592bc6d40c8b0882d9a3fc83d35a589efec6072345567666a3250ab13af6aff8f6a7b8886ce4e6b311fbffcc097f64b46b8916c0
6
+ metadata.gz: fcd0408222599f1badc1c27b7157d8089d0a80eeb9aa4e37c0a92016148431392404223b8e0b1761978e8df8cb169dbc8472270d478c00cc52c56c42e86d879a
7
+ data.tar.gz: 2e889042e6ef2ee2fec114b83722fedc1c330d76d9b2d01d53ffe8814e39fef4ee9ab28a2880cfe8d27fdfec22a7ea93c3a5491eb86c301d7a46bc6e90207a72
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (C) 2025 Ruby-GNOME 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
+ require "gst"
20
+
21
+ if ARGV.size < 2
22
+ puts "usage: #{$0} <input> <output>"
23
+ exit(false)
24
+ end
25
+
26
+ input = ARGV[0]
27
+ output = ARGV[1]
28
+
29
+ pipeline = Gst::Pipeline.new
30
+ filesrc = Gst::ElementFactory.make("filesrc")
31
+ filesrc.location = ARGV[0]
32
+ decodebin = Gst::ElementFactory.make("decodebin", nil)
33
+ raise "need decodebin from gst-plugins-base" if decodebin.nil?
34
+ videoconvert = Gst::ElementFactory.make("videoconvert", nil)
35
+ raise "need videoconvert from gst-plugins-base" if decodebin.nil?
36
+ image_encoder_name = output.split(".").last + "enc"
37
+ image_encoder = Gst::ElementFactory.make(image_encoder_name, nil)
38
+ raise "need #{iamge_encoder_name}" if image_encoder.nil?
39
+ filesink = Gst::ElementFactory.make("filesink", nil)
40
+ filesink.location = output
41
+
42
+ pipeline << filesrc << decodebin << videoconvert << image_encoder << filesink
43
+ filesrc >> decodebin
44
+ decodebin.signal_connect(:pad_added) do |_, pad|
45
+ sink_pad = videoconvert.get_static_pad("sink")
46
+ pad.link(sink_pad)
47
+ end
48
+ videoconvert >> image_encoder >> filesink
49
+
50
+ loop = GLib::MainLoop.new
51
+
52
+ bus = pipeline.bus
53
+ bus.add_watch do |bus, message|
54
+ case message.type
55
+ when Gst::MessageType::EOS
56
+ loop.quit
57
+ when Gst::MessageType::ERROR
58
+ error, debug = message.parse_error
59
+ puts "Debugging info: #{debug || 'none'}"
60
+ puts "Error: #{error.message}"
61
+ loop.quit
62
+ end
63
+ true
64
+ end
65
+
66
+ pipeline.play
67
+ begin
68
+ loop.run
69
+ rescue Interrupt
70
+ puts "Interrupt"
71
+ rescue => error
72
+ puts "Error: #{error.message}"
73
+ ensure
74
+ pipeline.stop
75
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gstreamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 4.3.2
18
+ version: 4.3.3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 4.3.2
25
+ version: 4.3.3
26
26
  description: Ruby/GStreamer is a Ruby binding for GStreamer.
27
27
  email: ruby-gnome2-devel-en@lists.sourceforge.net
28
28
  executables: []
@@ -69,6 +69,7 @@ files:
69
69
  - sample/stream-status.rb
70
70
  - sample/text-color-example.rb
71
71
  - sample/typefind.rb
72
+ - sample/video-thumbnail.rb
72
73
  - test/gstreamer-test-utils.rb
73
74
  - test/run-test.rb
74
75
  - test/test-audio.rb