gstreamer_pbutils 1.0.0 → 1.1.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/CHANGELOG.md +10 -0
- data/lib/gstreamer_pbutils/gsttag.rb +29 -0
- data/lib/gstreamer_pbutils/gstvideo.rb +60 -0
- data/lib/gstreamer_pbutils/loader.rb +6 -4
- data/lib/gstreamer_pbutils/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b141fef841e01492f4114ffba29cf7d59276a9a768e70f47dc56d95f2b59e674
|
|
4
|
+
data.tar.gz: cd07bad95afd349aa59648828217f661a7d2cf0d79012c5da015b8839d5bbc61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a8b7658394c119474409cfb25db2b7b2cc6139940cf168a86888defb225e95221e3ea3bd33e13575939a9dcab5da96c74a8412a930caaca6d1589a8b1d17eba
|
|
7
|
+
data.tar.gz: 54cf429da6e3fa07281a0f536e49f88a213c238dba4329a6766a88e336147bbf4f20d155ae2f8431f9ee5415c1aa52e7393bfa60b2f65c7671aa25cfb326d88b
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.1.0] - 2026-11-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- GstTag and GstVideo, defined from the typelibs that ship in the same package as this
|
|
15
|
+
gem's own. They need the same `gst_init` and the same search path, so they
|
|
16
|
+
are loaded here rather than given gems of their own -- which is what
|
|
17
|
+
ruby-gnome's gstreamer gem does for GstBase, GstController and GstAudio.
|
|
18
|
+
This closes the GstTag and GstVideo gaps on the project's Bindings board.
|
|
19
|
+
|
|
10
20
|
## [1.0.0] - 2026-11-03
|
|
11
21
|
|
|
12
22
|
### Added
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
# GstTag -- tag reading and writing -- the metadata nautilus shows for a media file.
|
|
7
|
+
#
|
|
8
|
+
# It lives here rather than in a gem of its own because `GstTag-1.0.typelib`
|
|
9
|
+
# ships in the same package as GstPbutils's, so this gem already pins everything
|
|
10
|
+
# it needs and already has gst_init run by GstPbutils's loader. A separate gem
|
|
11
|
+
# would add a repository, a release and a dependency for twenty lines.
|
|
12
|
+
module GstTag
|
|
13
|
+
LOG_DOMAIN = "GstTag"
|
|
14
|
+
GLib::Log.set_log_domain(LOG_DOMAIN)
|
|
15
|
+
|
|
16
|
+
class Error < StandardError
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Modelled on ruby-gnome's gstreamer gem, which brings up GstBase,
|
|
20
|
+
# GstController and GstAudio behind Gst in exactly this way.
|
|
21
|
+
class Loader < GObjectIntrospection::Loader
|
|
22
|
+
def load
|
|
23
|
+
self.version = "1.0"
|
|
24
|
+
super("GstTag")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Loader.new(self).load
|
|
29
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
# GstVideo -- video format description, overlays and the colour-space helpers
|
|
7
|
+
# snapshot uses.
|
|
8
|
+
#
|
|
9
|
+
# It lives here rather than in a gem of its own because `GstVideo-1.0.typelib`
|
|
10
|
+
# ships in the same package as GstPbutils', so this gem already pins everything
|
|
11
|
+
# it needs and already has gst_init run by GstPbutils' loader.
|
|
12
|
+
module GstVideo
|
|
13
|
+
LOG_DOMAIN = "GstVideo"
|
|
14
|
+
GLib::Log.set_log_domain(LOG_DOMAIN)
|
|
15
|
+
|
|
16
|
+
class Error < StandardError
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Methods in the typelib whose names cannot be Ruby method names, as
|
|
20
|
+
# "Class#name". See {Loader#define_method}.
|
|
21
|
+
UNNAMEABLE_METHODS = []
|
|
22
|
+
|
|
23
|
+
class Loader < GObjectIntrospection::Loader
|
|
24
|
+
def load
|
|
25
|
+
self.version = "1.0"
|
|
26
|
+
super("GstVideo")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
private
|
|
30
|
+
|
|
31
|
+
# GstVideo has a method named `2d`. The loader defines methods by
|
|
32
|
+
# generating source and class_eval'ing it:
|
|
33
|
+
#
|
|
34
|
+
# def #{method_name}(*arguments, &block)
|
|
35
|
+
#
|
|
36
|
+
# so a name beginning with a digit is not a NameError but a SyntaxError
|
|
37
|
+
# raised from inside the loader, and it takes down the whole namespace:
|
|
38
|
+
#
|
|
39
|
+
# SyntaxError: loader.rb:593: syntax errors found
|
|
40
|
+
# > 593 | def 2d(*arguments, &block)
|
|
41
|
+
# | ^ expected a delimiter to close the parameters
|
|
42
|
+
#
|
|
43
|
+
# Only a leading digit is filtered, not everything that fails
|
|
44
|
+
# /\A[a-z_]/ -- operator names like == and [] are legitimate Ruby method
|
|
45
|
+
# names and must still reach super.
|
|
46
|
+
#
|
|
47
|
+
# The skipped name is recorded rather than silently dropped. Reaching it
|
|
48
|
+
# needs GObjectIntrospection directly; that is a fair trade for having the
|
|
49
|
+
# other several hundred methods in this namespace.
|
|
50
|
+
def define_method(info, klass, method_name)
|
|
51
|
+
if /\A\d/.match?(method_name)
|
|
52
|
+
GstVideo::UNNAMEABLE_METHODS << "#{klass}##{method_name}"
|
|
53
|
+
else
|
|
54
|
+
super
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
Loader.new(self).load
|
|
60
|
+
end
|
|
@@ -77,10 +77,12 @@ module GstPbutils
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
def require_libraries
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
80
|
+
# GstTag, GstVideo ship in the same package as GstPbutils and need the same
|
|
81
|
+
# gst_init, so they are brought up here rather than given gems of their
|
|
82
|
+
# own. This is what ruby-gnome's gstreamer gem does for GstBase,
|
|
83
|
+
# GstController and GstAudio.
|
|
84
|
+
require_relative "gsttag"
|
|
85
|
+
require_relative "gstvideo"
|
|
84
86
|
end
|
|
85
87
|
end
|
|
86
88
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gstreamer_pbutils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Kidd
|
|
@@ -66,6 +66,8 @@ files:
|
|
|
66
66
|
- NOTICE
|
|
67
67
|
- README.md
|
|
68
68
|
- lib/gstreamer_pbutils.rb
|
|
69
|
+
- lib/gstreamer_pbutils/gsttag.rb
|
|
70
|
+
- lib/gstreamer_pbutils/gstvideo.rb
|
|
69
71
|
- lib/gstreamer_pbutils/loader.rb
|
|
70
72
|
- lib/gstreamer_pbutils/version.rb
|
|
71
73
|
- lib/gstreamer_pbutils/version.rb.erb
|