# File gstreamer/sample/media-type2.rb, line 98
  def find_type(location)
    @type = nil
    @pipeline.add @typefind
    @source.location = location
    @source >> @typefind
    @typefind.signal_connect 'have-type' do |typefind, type|
      @type = type
    end
    @pipeline.play
    while @type == nil && @pipeline.iterate do end
    @pipeline.ready
    # TODO: this is different
    @source.unlink_pads @typefind
    @pipeline.remove @typefind
  end