Sha256: 146796f1c5b3aea4188ec3a7dca9f84a377d355c93b718658b7a986d4015da65

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

# Copyright (C) 2013-2025  Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module Gst
  class Structure
    def fields
      n_fields.times.collect do |i|
        field_name = nth_field_name(i)
        value = get_value(field_name)
        value.extend(ValueMethods)
        [field_name, value]
      end
    end

    def [](name)
      get_value(name)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gstreamer-4.2.7 lib/gst/structure.rb
gstreamer-4.2.6 lib/gst/structure.rb