Sha256: cd31630bfe75202260d4fad89972942b0d2d80ae05032cb1246efc228c0e2880

Contents?: true

Size: 1.23 KB

Versions: 14

Compression:

Stored size: 1.23 KB

Contents

# Copyright (C) 2016-2022  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

class TestMapInfo < Test::Unit::TestCase
  def setup
    @pipeline = Gst.parse_launch("videotestsrc ! appsink name=sink")
    @sink = @pipeline.get_by_name("sink")
  end

  def test_data
    @pipeline.play
    begin
      sample = @sink.try_pull_sample(Gst::SECOND)
      buffer = sample.buffer
      success, map_info = buffer.map(:read)
      assert_true(success)
      assert do
        map_info.data.size >= 115200
      end
    ensure
      @pipeline.stop
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gstreamer-4.1.7 test/test-map-info.rb
gstreamer-4.1.6 test/test-map-info.rb
gstreamer-4.1.5 test/test-map-info.rb
gstreamer-4.1.4 test/test-map-info.rb
gstreamer-4.1.3 test/test-map-info.rb
gstreamer-4.1.2 test/test-map-info.rb
gstreamer-4.1.1 test/test-map-info.rb
gstreamer-4.1.0 test/test-map-info.rb
gstreamer-4.0.9 test/test-map-info.rb
gstreamer-4.0.8 test/test-map-info.rb
gstreamer-4.0.7 test/test-map-info.rb
gstreamer-4.0.6 test/test-map-info.rb
gstreamer-4.0.5 test/test-map-info.rb
gstreamer-4.0.4 test/test-map-info.rb