diff --git a/go.mod b/go.mod index ea6fd89..c7ebcf0 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/cyrilix/robocar-camera go 1.18 require ( - github.com/cyrilix/robocar-base v0.1.6 - github.com/cyrilix/robocar-protobuf/go v1.0.4 - github.com/eclipse/paho.mqtt.golang v1.3.5 + github.com/cyrilix/robocar-base v0.1.7 + github.com/cyrilix/robocar-protobuf/go v1.0.5 + github.com/eclipse/paho.mqtt.golang v1.4.1 github.com/golang/protobuf v1.5.2 go.uber.org/zap v1.21.0 - gocv.io/x/gocv v0.30.0 - google.golang.org/protobuf v1.27.1 + gocv.io/x/gocv v0.31.0 + google.golang.org/protobuf v1.28.0 ) require ( @@ -17,4 +17,5 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect ) diff --git a/go.sum b/go.sum index fbceae1..60f231d 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,14 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/cyrilix/robocar-base v0.1.6 h1:VVcSZD8DPsha3XDLxRBMvtcd6uC8CcIjqbxG482dxvo= -github.com/cyrilix/robocar-base v0.1.6/go.mod h1:m5ov/7hpRHi0yMp2prKafL6UEsM2O71Uea85WR0/jjI= -github.com/cyrilix/robocar-protobuf/go v1.0.4 h1:XTolFYbiKw4gQ2l+z/LMZkLrmAUMzlHcQBzp/czlANo= -github.com/cyrilix/robocar-protobuf/go v1.0.4/go.mod h1:1fyGMVm4ZodfYRrbWCEQgtvKyvrhyTBe5zA7/Qeh/H0= +github.com/cyrilix/robocar-base v0.1.7 h1:EVzZ0KjigSFpke5f3A/PybEH3WFUEIrYSc3z/dhOZ48= +github.com/cyrilix/robocar-base v0.1.7/go.mod h1:4E11HQSNy2NT8e7MW188y6ST9C0RzarKyn7sK/3V/Lk= +github.com/cyrilix/robocar-protobuf/go v1.0.5 h1:PX1At+pf6G7gJwT4LzJLQu3/LPFTTNNlZmZSYtnSELY= +github.com/cyrilix/robocar-protobuf/go v1.0.5/go.mod h1:Y3AE28K5V7EZxMXp/6A8RhkRz15VOfFy4CjST35FbtQ= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/eclipse/paho.mqtt.golang v1.3.5 h1:sWtmgNxYM9P2sP+xEItMozsR3w0cqZFlqnNN1bdl41Y= -github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= +github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI= +github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -38,8 +38,8 @@ go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -gocv.io/x/gocv v0.30.0 h1:r8RU4w0lfa65NdftHEeBtrDxCCLRDu1H7X3aI37IOtk= -gocv.io/x/gocv v0.30.0/go.mod h1:oc6FvfYqfBp99p+yOEzs9tbYF9gOrAQSeL/dyIPefJU= +gocv.io/x/gocv v0.31.0 h1:BHDtK8v+YPvoSPQTTiZB2fM/7BLg6511JqkruY2z6LQ= +gocv.io/x/gocv v0.31.0/go.mod h1:oc6FvfYqfBp99p+yOEzs9tbYF9gOrAQSeL/dyIPefJU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -51,6 +51,7 @@ golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -72,8 +73,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/DISTRIBUTION b/vendor/github.com/eclipse/paho.mqtt.golang/DISTRIBUTION deleted file mode 100644 index 34e4973..0000000 --- a/vendor/github.com/eclipse/paho.mqtt.golang/DISTRIBUTION +++ /dev/null @@ -1,15 +0,0 @@ - - -Eclipse Distribution License - v 1.0 - -Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE b/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE index 9b9a9eb..f55c395 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE +++ b/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE @@ -1,20 +1,294 @@ -This project is dual licensed under the Eclipse Public License 1.0 and the -Eclipse Distribution License 1.0 as described in the epl-v10 and edl-v10 files. +Eclipse Public License - v 2.0 (EPL-2.0) -The EDL is copied below in order to pass the pkg.go.dev license check (https://pkg.go.dev/license-policy). +This program and the accompanying materials +are made available under the terms of the Eclipse Public License v2.0 +and Eclipse Distribution License v1.0 which accompany this distribution. + +The Eclipse Public License is available at + https://www.eclipse.org/legal/epl-2.0/ +and the Eclipse Distribution License is available at + http://www.eclipse.org/org/documents/edl-v10.php. + +For an explanation of what dual-licensing means to you, see: +https://www.eclipse.org/legal/eplfaq.php#DUALLIC **** -Eclipse Distribution License - v 1.0 +The epl-2.0 is copied below in order to pass the pkg.go.dev license check (https://pkg.go.dev/license-policy). +**** +Eclipse Public License - v 2.0 -Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -All rights reserved. +1. DEFINITIONS -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +"Contribution" means: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/NOTICE.md b/vendor/github.com/eclipse/paho.mqtt.golang/NOTICE.md new file mode 100644 index 0000000..10c4a1c --- /dev/null +++ b/vendor/github.com/eclipse/paho.mqtt.golang/NOTICE.md @@ -0,0 +1,77 @@ +# Notices for paho.mqtt.golang + +This content is produced and maintained by the Eclipse Paho project. + + * Project home: https://www.eclipse.org/paho/ + +Note that a [separate mqtt v5 client](https://github.com/eclipse/paho.golang) also exists (this is a full rewrite +and deliberately incompatible with this library). + +## Trademarks + +Eclipse Mosquitto trademarks of the Eclipse Foundation. Eclipse, and the +Eclipse Logo are registered trademarks of the Eclipse Foundation. + +Paho is a trademark of the Eclipse Foundation. Eclipse, and the Eclipse Logo are +registered trademarks of the Eclipse Foundation. + +## Copyright + +All content is the property of the respective authors or their employers. +For more information regarding authorship of content, please consult the +listed source code repository logs. + +## Declared Project Licenses + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 and Eclipse Distribution License v1.0 which accompany this +distribution. + +The Eclipse Public License is available at +https://www.eclipse.org/legal/epl-2.0/ +and the Eclipse Distribution License is available at +http://www.eclipse.org/org/documents/edl-v10.php. + +For an explanation of what dual-licensing means to you, see: +https://www.eclipse.org/legal/eplfaq.php#DUALLIC + +SPDX-License-Identifier: EPL-2.0 or BSD-3-Clause + +## Source Code + +The project maintains the following source code repositories: + + * https://github.com/eclipse/paho.mqtt.golang + +## Third-party Content + +This project makes use of the follow third party projects. + +Go Programming Language and Standard Library + +* License: BSD-style license (https://golang.org/LICENSE) +* Project: https://golang.org/ + +Go Networking + +* License: BSD 3-Clause style license and patent grant. +* Project: https://cs.opensource.google/go/x/net + +Go Sync + +* License: BSD 3-Clause style license and patent grant. +* Project: https://cs.opensource.google/go/x/sync/ + +Gorilla Websockets v1.4.2 + +* License: BSD 2-Clause "Simplified" License +* Project: https://github.com/gorilla/websocket + +## Cryptography + +Content may contain encryption software. The country in which you are currently +may have restrictions on the import, possession, and use, and/or re-export to +another country, of encryption software. BEFORE using any encryption software, +please check the country's laws, regulations and policies concerning the import, +possession, or use, and re-export of encryption software, to see if this is +permitted. \ No newline at end of file diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/README.md b/vendor/github.com/eclipse/paho.mqtt.golang/README.md index c1acf4e..63a7f44 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/README.md +++ b/vendor/github.com/eclipse/paho.mqtt.golang/README.md @@ -111,36 +111,54 @@ identifier; this is as per the [spec](https://docs.oasis-open.org/mqtt/mqtt/v3.1 `ClientOptions.SetOrderMatters(false)` set). If you wish to perform a long-running task, or publish a message, then please use a go routine (blocking in the handler is a common cause of unexpected `pingresp not received, disconnecting` errors). -* When QOS1+ subscriptions have been created previously and you connect with `CleanSession` set to false it is possible that the broker will deliver retained -messages before `Subscribe` can be called. To process these messages either configure a handler with `AddRoute` or -set a `DefaultPublishHandler`. +* When QOS1+ subscriptions have been created previously and you connect with `CleanSession` set to false it is possible +that the broker will deliver retained messages before `Subscribe` can be called. To process these messages either +configure a handler with `AddRoute` or set a `DefaultPublishHandler`. * Loss of network connectivity may not be detected immediately. If this is an issue then consider setting -`ClientOptions.KeepAlive` (sends regular messages to check the link is active). -* Brokers offer many configuration options; some settings may lead to unexpected results. If using Mosquitto check -`max_inflight_messages`, `max_queued_messages`, `persistence` (the defaults may not be what you expect). +`ClientOptions.KeepAlive` (sends regular messages to check the link is active). +* Reusing a `Client` is not completely safe. After calling `Disconnect` please create a new Client (`NewClient()`) rather +than attempting to reuse the existing one (note that features such as `SetAutoReconnect` mean this is rarely necessary). +* Brokers offer many configuration options; some settings may lead to unexpected results. +* Publish tokens will complete if the connection is lost and re-established using the default +options.SetAutoReconnect(true) functionality (token.Error() will return nil). Attempts will be made to re-deliver the +message but there is currently no easy way know when such messages are delivered. + +If using Mosquitto then there are a range of fairly common issues: +* `listener` - By default [Mosquitto v2+](https://mosquitto.org/documentation/migrating-to-2-0/) listens on loopback +interfaces only (meaning it will only accept connections made from the computer its running on). +* `max_inflight_messages` - Unless this is set to 1 mosquitto does not guarantee ordered delivery of messages. +* `max_queued_messages` / `max_queued_bytes` - These impose limits on the number/size of queued messages. The defaults +may lead to messages being silently dropped. +* `persistence` - Defaults to false (messages will not survive a broker restart) +* `max_keepalive` - defaults to 65535 and, from version 2.0.12, `SetKeepAlive(0)` will result in a rejected connection +by default. Reporting bugs -------------- Please report bugs by raising issues for this project in github https://github.com/eclipse/paho.mqtt.golang/issues -*A limited number of contributors monitor the issues section so if you have a general question please consider the -resources in the [more information](#more-information) section (your question will be seen by more people, and you are -likely to receive an answer more quickly).* +A limited number of contributors monitor the issues section so if you have a general question please see the +resources in the [more information](#more-information) section for help. We welcome bug reports, but it is important they are actionable. A significant percentage of issues reported are not resolved due to a lack of information. If we cannot replicate the problem then it is unlikely we will be able to fix it. -The information required will vary from issue to issue but consider including: +The information required will vary from issue to issue but almost all bug reports would be expected to include: -* Which version of the package you are using (tag or commit - this should be in your go.mod file) -* A [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). Providing an example -is the best way to demonstrate the issue you are facing; it is important this includes all relevant information -(including broker configuration). Docker (see `cmd/docker`) makes it relatively simple to provide a working end-to-end -example. +* Which version of the package you are using (tag or commit - this should be in your `go.mod` file) * A full, clear, description of the problem (detail what you are expecting vs what actually happens). +* Configuration information (code showing how you connect, please include all references to `ClientOption`) +* Broker details (name and version). + +If at all possible please also include: * Details of your attempts to resolve the issue (what have you tried, what worked, what did not). -* [Application Logs](#logging) covering the period the issue occurred. Unless you have isolated the root cause of the issue please include a link to a full log (including data from well before the problem arose). -* Broker Logs covering the period the issue occurred. +* A [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). Providing an example +is the best way to demonstrate the issue you are facing; it is important this includes all relevant information +(including broker configuration). Docker (see `cmd/docker`) makes it relatively simple to provide a working end-to-end +example. +* Broker logs covering the period the issue occurred. +* [Application Logs](#logging) covering the period the issue occurred. Unless you have isolated the root cause of the +issue please include a link to a full log (including data from well before the problem arose). It is important to remember that this library does not stand alone; it communicates with a broker and any issues you are seeing may be due to: @@ -158,7 +176,7 @@ Contributing ------------ We welcome pull requests but before your contribution can be accepted by the project, you need to create and -electronically sign the Eclipse Contributor Agreement (ECA) and sign off on the Eclipse Foundation Certificate of Origin. +electronically sign the Eclipse Contributor Agreement (ECA) and sign off on the Eclipse Foundation Certificate of Origin. More information is available in the [Eclipse Development Resources](http://wiki.eclipse.org/Development_Resources/Contributing_via_Git); please take special @@ -167,11 +185,12 @@ note of the requirement that the commit record contain a "Signed-off-by" entry. More information ---------------- +[Stack Overflow](https://stackoverflow.com/questions/tagged/mqtt+go) has a range questions/answers covering a range of +common issues (both relating to use of this library and MQTT in general). This is the best place to ask general questions +(including those relating to the use of this library). + Discussion of the Paho clients takes place on the [Eclipse paho-dev mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev). General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt). -There is much more information available via the [MQTT community site](http://mqtt.org). - -[Stack Overflow](https://stackoverflow.com/questions/tagged/mqtt+go) has a range questions covering a range of common -issues (both relating to use of this library and MQTT in general). +There is much more information available via the [MQTT community site](http://mqtt.org). \ No newline at end of file diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/about.html b/vendor/github.com/eclipse/paho.mqtt.golang/about.html deleted file mode 100644 index b183f41..0000000 --- a/vendor/github.com/eclipse/paho.mqtt.golang/about.html +++ /dev/null @@ -1,41 +0,0 @@ - -
- -December 9, 2013
-The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL"). -A copy of the EPL is available at -http://www.eclipse.org/legal/epl-v10.html -and a copy of the EDL is available at -http://www.eclipse.org/org/documents/edl-v10.php. -For purposes of the EPL, "Program" will mean the Content.
- -If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.
- - -The Content includes items that have been sourced from third parties as set out below. If you - did not receive this Content directly from the Eclipse Foundation, the following is provided - for informational purposes only, and you should look to the Redistributor's license for - terms and conditions of use.
-
- None
-
-
February 1, 2011
- -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS - (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND - CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE - OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR - NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND - CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.
- -Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 - ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. - For purposes of the EPL, "Program" will mean the Content.
- -Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code - repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").
- -The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and -Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module -including, but not limited to the following locations:
- -Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the -installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or -inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. -Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in -that directory.
- -THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE -OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
- -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please -contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.
- - -The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse - Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or - other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to - install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html - ("Specification").
- -You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the - applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology - in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the - Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:
- -Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to - another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, - possession, or use, and re-export of encryption software, to see if this is permitted.
- -Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
- - diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/oops.go b/vendor/github.com/eclipse/paho.mqtt.golang/oops.go index 39630d7..c454aeb 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/oops.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/oops.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/options.go b/vendor/github.com/eclipse/paho.mqtt.golang/options.go index 4a1420c..b87b503 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/options.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/options.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig @@ -19,6 +23,7 @@ package mqtt import ( "crypto/tls" + "net" "net/http" "net/url" "strings" @@ -52,8 +57,16 @@ type ReconnectHandler func(Client, *ClientOptions) // ConnectionAttemptHandler is invoked prior to making the initial connection. type ConnectionAttemptHandler func(broker *url.URL, tlsCfg *tls.Config) *tls.Config +// OpenConnectionFunc is invoked to establish the underlying network connection +// Its purpose if for custom network transports. +// Does not carry out any MQTT specific handshakes. +type OpenConnectionFunc func(uri *url.URL, options ClientOptions) (net.Conn, error) + // ClientOptions contains configurable options for an Client. Note that these should be set using the // relevant methods (e.g. AddBroker) rather than directly. See those functions for information on usage. +// WARNING: Create the below using NewClientOptions unless you have a compelling reason not to. It is easy +// to create a configuration with difficult to trace issues (e.g. Mosquitto 2.0.12+ will reject connections +// with KeepAlive=0 by default). type ClientOptions struct { Servers []*url.URL ClientID string @@ -70,7 +83,7 @@ type ClientOptions struct { ProtocolVersion uint protocolVersionExplicit bool TLSConfig *tls.Config - KeepAlive int64 + KeepAlive int64 // Warning: Some brokers may reject connections with Keepalive = 0. PingTimeout time.Duration ConnectTimeout time.Duration MaxReconnectInterval time.Duration @@ -88,6 +101,9 @@ type ClientOptions struct { ResumeSubs bool HTTPHeaders http.Header WebsocketOptions *WebsocketOptions + MaxResumePubInFlight int // // 0 = no limit; otherwise this is the maximum simultaneous messages sent while resuming + Dialer *net.Dialer + CustomOpenConnectionFn OpenConnectionFunc } // NewClientOptions will create a new ClientClientOptions type with some @@ -129,6 +145,8 @@ func NewClientOptions() *ClientOptions { ResumeSubs: false, HTTPHeaders: make(map[string][]string), WebsocketOptions: &WebsocketOptions{}, + Dialer: &net.Dialer{Timeout: 30 * time.Second}, + CustomOpenConnectionFn: nil, } return o } @@ -347,6 +365,7 @@ func (o *ClientOptions) SetWriteTimeout(t time.Duration) *ClientOptions { // Default 30 seconds. Currently only operational on TCP/TLS connections. func (o *ClientOptions) SetConnectTimeout(t time.Duration) *ClientOptions { o.ConnectTimeout = t + o.Dialer.Timeout = t return o } @@ -401,3 +420,29 @@ func (o *ClientOptions) SetWebsocketOptions(w *WebsocketOptions) *ClientOptions o.WebsocketOptions = w return o } + +// SetMaxResumePubInFlight sets the maximum simultaneous publish messages that will be sent while resuming. Note that +// this only applies to messages coming from the store (so additional sends may push us over the limit) +// Note that the connect token will not be flagged as complete until all messages have been sent from the +// store. If broker does not respond to messages then resume may not complete. +// This option was put in place because resuming after downtime can saturate low capacity links. +func (o *ClientOptions) SetMaxResumePubInFlight(MaxResumePubInFlight int) *ClientOptions { + o.MaxResumePubInFlight = MaxResumePubInFlight + return o +} + +// SetDialer sets the tcp dialer options used in a tcp connection +func (o *ClientOptions) SetDialer(dialer *net.Dialer) *ClientOptions { + o.Dialer = dialer + return o +} + +// SetCustomOpenConnectionFn replaces the inbuilt function that establishes a network connection with a custom function. +// The passed in function should return an open `net.Conn` or an error (see the existing openConnection function for an example) +// It enables custom networking types in addition to the defaults (tcp, tls, websockets...) +func (o *ClientOptions) SetCustomOpenConnectionFn(customOpenConnectionFn OpenConnectionFunc) *ClientOptions { + if customOpenConnectionFn != nil { + o.CustomOpenConnectionFn = customOpenConnectionFn + } + return o +} diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/options_reader.go b/vendor/github.com/eclipse/paho.mqtt.golang/options_reader.go index 7ff240f..10a9e49 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/options_reader.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/options_reader.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go index 1a0dc95..3a7b98f 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go index 2184703..b4446a5 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go index a24a84f..cf352a3 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go index 3c734b3..b2d7ed1 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go index 4fa54b2..cd52948 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go index 61388ca..d7becdf 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go index 5e6c381..f6e727e 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go index 47e043d..84a1af5 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go index cdd76b1..9fba5df 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go index f0a72c5..da9ed2a 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go index af29a82..f418ff8 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go index cdea660..261cf21 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go index daef901..313bf5a 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go index bdf5fd3..acdd400 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go index 9ccb850..54d06aa 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2021 IBM Corp and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Allan Stockdill-Mander + */ + package packets import ( diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/ping.go b/vendor/github.com/eclipse/paho.mqtt.golang/ping.go index 50421f4..63283bf 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/ping.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/ping.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/router.go b/vendor/github.com/eclipse/paho.mqtt.golang/router.go index 4737d87..bfaef61 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/router.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/router.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/store.go b/vendor/github.com/eclipse/paho.mqtt.golang/store.go index 24a76b7..f50873c 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/store.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/store.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig @@ -45,7 +49,7 @@ type Store interface { // where X is 'i' or 'o' func mIDFromKey(key string) uint16 { s := key[2:] - i, err := strconv.Atoi(s) + i, err := strconv.ParseUint(s, 10, 16) chkerr(err) return uint16(i) } diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/token.go b/vendor/github.com/eclipse/paho.mqtt.golang/token.go index dade215..996ab5b 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/token.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/token.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2014 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Allan Stockdill-Mander diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/topic.go b/vendor/github.com/eclipse/paho.mqtt.golang/topic.go index 6604e68..966540a 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/topic.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/topic.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2014 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/trace.go b/vendor/github.com/eclipse/paho.mqtt.golang/trace.go index 904a664..b07b604 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/trace.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/trace.go @@ -1,10 +1,14 @@ /* - * Copyright (c) 2013 IBM Corp. + * Copyright (c) 2021 IBM Corp and others. * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Seth Hoenig diff --git a/vendor/github.com/eclipse/paho.mqtt.golang/websocket.go b/vendor/github.com/eclipse/paho.mqtt.golang/websocket.go index 9fa41ce..e0f2583 100644 --- a/vendor/github.com/eclipse/paho.mqtt.golang/websocket.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/websocket.go @@ -1,3 +1,16 @@ +/* + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * https://www.eclipse.org/legal/epl-2.0/ + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + */ + package mqtt import ( diff --git a/vendor/gocv.io/x/gocv/.gitignore b/vendor/gocv.io/x/gocv/.gitignore index 7549fff..adf29f1 100644 --- a/vendor/gocv.io/x/gocv/.gitignore +++ b/vendor/gocv.io/x/gocv/.gitignore @@ -9,3 +9,4 @@ count.out /build .idea/ contrib/data.yaml +contrib/testOilPainting.png diff --git a/vendor/gocv.io/x/gocv/CHANGELOG.md b/vendor/gocv.io/x/gocv/CHANGELOG.md index 957cdb5..88a7ef7 100644 --- a/vendor/gocv.io/x/gocv/CHANGELOG.md +++ b/vendor/gocv.io/x/gocv/CHANGELOG.md @@ -1,3 +1,21 @@ +0.31.0 +--- +* **all** + * update to OpenCV 4.6.0 +* **build** + * Switch to Github Actions for Linux CI build + * Use go -tags static when verifying static build +* **core** + * Add Mat.ElemSize (#964) + * avoid index out of range panic in NewPointsVectorFromPoints +* **video** + * add findTransformECC function +* **contrib/ximgproc** + * add PeiLinNormalization() function + * add anisotropicDiffusion() function + * implement edgePreservingFilter() + * implement niBlackThreshold and thinning filters + 0.30.0 --- * **all** diff --git a/vendor/gocv.io/x/gocv/Dockerfile b/vendor/gocv.io/x/gocv/Dockerfile index 671bb57..4f78b96 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile +++ b/vendor/gocv.io/x/gocv/Dockerfile @@ -1,6 +1,6 @@ # to build this docker image: # docker build . -FROM gocv/opencv:4.5.5 +FROM gocv/opencv:4.6.0 ENV GOPATH /go diff --git a/vendor/gocv.io/x/gocv/Dockerfile-test b/vendor/gocv.io/x/gocv/Dockerfile-test index 4948e3c..8d122d9 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile-test +++ b/vendor/gocv.io/x/gocv/Dockerfile-test @@ -6,7 +6,7 @@ # docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix gocv-test # xhost - # -FROM gocv/opencv:4.5.5 AS gocv-test +FROM gocv/opencv:4.6.0 AS gocv-test ENV GOPATH /go diff --git a/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10 b/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10 index 26bf80b..6479594 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10 +++ b/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10 @@ -4,7 +4,7 @@ # To run tests: # docker run -it --rm --gpus all gocv-test-gpu-cuda-10 # -FROM gocv/opencv:4.5.5-gpu-cuda-10 AS gocv-gpu-test-cuda-10 +FROM gocv/opencv:4.6.0-gpu-cuda-10 AS gocv-gpu-test-cuda-10 ENV GOPATH /go ENV PATH="${PATH}:/go/bin" diff --git a/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11 b/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11 index a39bc66..72aa36c 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11 +++ b/vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11 @@ -4,7 +4,7 @@ # To run tests: # docker run -it --rm --gpus all gocv-test-gpu-cuda-11 # -FROM gocv/opencv:4.5.5-gpu-cuda-11 AS gocv-gpu-test-cuda-11 +FROM gocv/opencv:4.6.0-gpu-cuda-11 AS gocv-gpu-test-cuda-11 ENV GOPATH /go ENV PATH="${PATH}:/go/bin" diff --git a/vendor/gocv.io/x/gocv/Dockerfile.gpu b/vendor/gocv.io/x/gocv/Dockerfile.gpu index 921a992..57ab2ff 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile.gpu +++ b/vendor/gocv.io/x/gocv/Dockerfile.gpu @@ -1,6 +1,6 @@ # to build this docker image: # docker build -f Dockerfile.gpu . -FROM gocv/opencv:4.5.5-gpu-cuda-11 AS gocv-gpu +FROM gocv/opencv:4.6.0-gpu-cuda-11 AS gocv-gpu ENV GOPATH /go diff --git a/vendor/gocv.io/x/gocv/Dockerfile.opencv b/vendor/gocv.io/x/gocv/Dockerfile.opencv index 01e14c1..1b6ab2d 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile.opencv +++ b/vendor/gocv.io/x/gocv/Dockerfile.opencv @@ -1,6 +1,6 @@ # to build this docker image: -# docker build -f Dockerfile.opencv -t gocv/opencv:4.5.5 . -FROM golang:1.17-buster AS opencv +# docker build -f Dockerfile.opencv -t gocv/opencv:4.6.0 . +FROM golang:1.18-buster AS opencv LABEL maintainer="hybridgroup" RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \ rm -rf /var/lib/apt/lists/* -ARG OPENCV_VERSION="4.5.5" +ARG OPENCV_VERSION="4.6.0" ENV OPENCV_VERSION $OPENCV_VERSION RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \ diff --git a/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10 b/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10 index 333687f..dbfb166 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10 +++ b/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10 @@ -1,8 +1,13 @@ # to build this docker image: -# docker build -f Dockerfile.opencv-gpu-cuda-10 -t gocv/opencv:4.5.5-gpu-cuda-10 . -FROM nvidia/cuda:10.2-cudnn7-devel AS opencv-gpu-base +# docker build -f Dockerfile.opencv-gpu-cuda-10 -t gocv/opencv:4.6.0-gpu-cuda-10 . +FROM nvidia/cuda:10.2-cudnn8-devel AS opencv-gpu-base LABEL maintainer="hybridgroup" +# needed for cuda repo key rotation. see: +# https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771 +# +RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub + RUN apt-get update && apt-get install -y --no-install-recommends \ git build-essential cmake pkg-config unzip libgtk2.0-dev \ wget curl ca-certificates libcurl4-openssl-dev libssl-dev \ @@ -10,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \ rm -rf /var/lib/apt/lists/* -ARG OPENCV_VERSION="4.5.5" +ARG OPENCV_VERSION="4.6.0" ENV OPENCV_VERSION $OPENCV_VERSION RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \ @@ -54,7 +59,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO # install golang here FROM opencv-gpu-base AS opencv-gpu-golang -ENV GO_RELEASE=1.17.2 +ENV GO_RELEASE=1.18.3 RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \ tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \ rm go${GO_RELEASE}.linux-amd64.tar.gz diff --git a/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11 b/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11 index 9963bbe..14cbdb1 100644 --- a/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11 +++ b/vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11 @@ -1,6 +1,6 @@ # to build this docker image: -# docker build -f Dockerfile.opencv-gpu-cuda-11 -t gocv/opencv:4.5.5-gpu-cuda-11 . -FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base +# docker build -f Dockerfile.opencv-gpu-cuda-11 -t gocv/opencv:4.6.0-gpu-cuda-11 . +FROM nvidia/cuda:11.5.2-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base LABEL maintainer="hybridgroup" ENV DEBIAN_FRONTEND=noninteractive @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \ rm -rf /var/lib/apt/lists/* -ARG OPENCV_VERSION="4.5.5" +ARG OPENCV_VERSION="4.6.0" ENV OPENCV_VERSION $OPENCV_VERSION RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \ @@ -55,7 +55,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO # install golang here FROM opencv-gpu-cuda-11-base AS opencv-gpu-cuda-11-golang -ENV GO_RELEASE=1.17.2 +ENV GO_RELEASE=1.18.3 RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \ tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \ rm go${GO_RELEASE}.linux-amd64.tar.gz diff --git a/vendor/gocv.io/x/gocv/Makefile b/vendor/gocv.io/x/gocv/Makefile index 5dd0b90..2efb37b 100644 --- a/vendor/gocv.io/x/gocv/Makefile +++ b/vendor/gocv.io/x/gocv/Makefile @@ -2,10 +2,10 @@ .PHONY: test deps download build clean astyle cmds docker # GoCV version to use. -GOCV_VERSION?="v0.30.0" +GOCV_VERSION?="v0.31.0" # OpenCV version to use. -OPENCV_VERSION?=4.5.5 +OPENCV_VERSION?=4.6.0 # Go version to use when building Docker image GOVERSION?=1.16.2 @@ -250,7 +250,7 @@ install_cuda: deps download sudo_pre_install_clean build_cuda sudo_install clean install_openvino: deps download download_openvino sudo_pre_install_clean build_openvino_package sudo_install_openvino build_openvino sudo_install clean verify_openvino # Do everything statically. -install_static: deps download sudo_pre_install_clean build_static sudo_install clean verify +install_static: deps download sudo_pre_install_clean build_static sudo_install clean verify_static # Do everything with non-free modules from cpencv_contrib. install_nonfree: deps download sudo_pre_install_clean build_nonfree sudo_install clean verify @@ -276,6 +276,10 @@ sudo_install_openvino: verify: go run ./cmd/version/main.go +# Build a minimal Go app to confirm gocv works with statically built OpenCV. +verify_static: + go run -tags static ./cmd/version/main.go + # Build a minimal Go app to confirm gocv cuda works. verify_cuda: go run ./cmd/cuda/main.go diff --git a/vendor/gocv.io/x/gocv/README.md b/vendor/gocv.io/x/gocv/README.md index 08c6406..5aa4a0e 100644 --- a/vendor/gocv.io/x/gocv/README.md +++ b/vendor/gocv.io/x/gocv/README.md @@ -3,14 +3,14 @@ [](http://gocv.io/) [](https://pkg.go.dev/gocv.io/x/gocv) -[](https://circleci.com/gh/hybridgroup/gocv/tree/dev) -[](https://ci.appveyor.com/project/deadprogram/gocv/branch/dev) +[](https://github.com/hybridgroup/gocv/actions/workflows/linux.yml) +[](https://ci.appveyor.com/project/deadprogram/gocv/branch/dev) [](https://goreportcard.com/report/github.com/hybridgroup/gocv) [](https://github.com/hybridgroup/gocv/blob/release/LICENSE.txt) The GoCV package provides Go language bindings for the [OpenCV 4](http://opencv.org/) computer vision library. -The GoCV package supports the latest releases of Go and OpenCV (v4.5.5) on Linux, macOS, and Windows. We intend to make the Go language a "first-class" client compatible with the latest developments in the OpenCV ecosystem. +The GoCV package supports the latest releases of Go and OpenCV (v4.6.0) on Linux, macOS, and Windows. We intend to make the Go language a "first-class" client compatible with the latest developments in the OpenCV ecosystem. GoCV supports [CUDA](https://en.wikipedia.org/wiki/CUDA) for hardware acceleration using Nvidia GPUs. Check out the [CUDA README](./cuda/README.md) for more info on how to use GoCV with OpenCV/CUDA. @@ -122,7 +122,7 @@ There are examples in the [cmd directory](./cmd) of this repo in the form of var ## How to install -To install GoCV, you must first have the matching version of OpenCV installed on your system. The current release of GoCV requires OpenCV 4.5.5. +To install GoCV, you must first have the matching version of OpenCV installed on your system. The current release of GoCV requires OpenCV 4.6.0. Here are instructions for Ubuntu, Raspian, macOS, and Windows. @@ -130,7 +130,7 @@ Here are instructions for Ubuntu, Raspian, macOS, and Windows. ### Installation -You can use `make` to install OpenCV 4.5.5 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way. +You can use `make` to install OpenCV 4.6.0 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way. #### Quick Install @@ -141,7 +141,7 @@ First, change directories to where you want to install GoCV, and then use git to Make sure to change `$HOME/folder/with/your/src/` to where you actually want to save the code. -Once you have cloned the repo, the following commands should do everything to download and install OpenCV 4.5.5 on Linux: +Once you have cloned the repo, the following commands should do everything to download and install OpenCV 4.6.0 on Linux: cd gocv make install @@ -152,8 +152,8 @@ If you need static opencv libraries If it works correctly, at the end of the entire process, the following message should be displayed: - gocv version: 0.30.0 - opencv lib version: 4.5.5 + gocv version: 0.31.0 + opencv lib version: 4.6.0 That's it, now you are ready to use GoCV. @@ -167,7 +167,7 @@ See the [openvino directory](./openvino) for information. #### Make Install for OpenVINO and Cuda -The following commands should do everything to download and install OpenCV 4.5.5 with CUDA and OpenVINO on Linux. Make sure to change `$HOME/folder/with/your/src/` to the directory you used to clone GoCV: +The following commands should do everything to download and install OpenCV 4.6.0 with CUDA and OpenVINO on Linux. Make sure to change `$HOME/folder/with/your/src/` to the directory you used to clone GoCV: cd $HOME/folder/with/gocv/ make install_all @@ -178,8 +178,8 @@ If you need static opencv libraries If it works correctly, at the end of the entire process, the following message should be displayed: - gocv version: 0.30.0 - opencv lib version: 4.5.5-openvino + gocv version: 0.31.0 + opencv lib version: 4.6.0-openvino cuda information: Device 0: "GeForce MX150" 2003Mb, sm_61, Driver/Runtime ver.10.0/10.0 @@ -206,7 +206,7 @@ Next, you need to update the system, and install any required packages: #### Download source -Now, download the OpenCV 4.5.5 and OpenCV Contrib source code: +Now, download the OpenCV 4.6.0 and OpenCV Contrib source code: make download @@ -240,8 +240,8 @@ Now you should be able to build or run any of the examples: The version program should output the following: - gocv version: 0.30.0 - opencv lib version: 4.5.5 + gocv version: 0.31.0 + opencv lib version: 4.6.0 #### Cleanup extra files @@ -320,7 +320,7 @@ There is a Docker image with Alpine 3.7 that has been created by project contrib ### Installation -We have a special installation for the Raspberry Pi that includes some hardware optimizations. You use `make` to install OpenCV 4.5.5 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way. +We have a special installation for the Raspberry Pi that includes some hardware optimizations. You use `make` to install OpenCV 4.6.0 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way. #### Quick Install @@ -331,15 +331,15 @@ First, change directories to where you want to install GoCV, and then use git to Make sure to change `$HOME/folder/with/your/src/` to where you actually want to save the code. -The following make command should do everything to download and install OpenCV 4.5.5 on Raspbian: +The following make command should do everything to download and install OpenCV 4.6.0 on Raspbian: cd $HOME/folder/with/your/src/gocv make install_raspi If it works correctly, at the end of the entire process, the following message should be displayed: - gocv version: 0.30.0 - opencv lib version: 4.5.5 + gocv version: 0.31.0 + opencv lib version: 4.6.0 That's it, now you are ready to use GoCV. @@ -347,13 +347,13 @@ That's it, now you are ready to use GoCV. ### Installation -You can install OpenCV 4.5.5 using Homebrew. +You can install OpenCV 4.6.0 using Homebrew. If you already have an earlier version of OpenCV (3.4.x) installed, you should probably remove it before installing the new version: brew uninstall opencv -You can then install OpenCV 4.5.5: +You can then install OpenCV 4.6.0: brew install opencv @@ -377,8 +377,8 @@ Now you should be able to build or run any of the examples: The version program should output the following: - gocv version: 0.30.0 - opencv lib version: 4.5.5 + gocv version: 0.31.0 + opencv lib version: 4.6.0 ### Custom Environment @@ -387,8 +387,8 @@ By default, pkg-config is used to determine the correct flags for compiling and For example: export CGO_CXXFLAGS="--std=c++11" - export CGO_CPPFLAGS="-I/usr/local/Cellar/opencv/4.5.5/include" - export CGO_LDFLAGS="-L/usr/local/Cellar/opencv/4.5.5/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core" + export CGO_CPPFLAGS="-I/usr/local/Cellar/opencv/4.6.0/include" + export CGO_LDFLAGS="-L/usr/local/Cellar/opencv/4.6.0/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core" Please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code, in order to setup the needed ENV variables. Once you have done so, you can execute code that uses GoCV with your custom environment like this: @@ -400,7 +400,7 @@ Please note that you will need to run these 3 lines of code one time in your cur The following assumes that you are running a 64-bit version of Windows 10. -In order to build and install OpenCV 4.5.5 on Windows, you must first download and install MinGW-W64 and CMake, as follows. +In order to build and install OpenCV 4.6.0 on Windows, you must first download and install MinGW-W64 and CMake, as follows. #### MinGW-W64 @@ -416,9 +416,9 @@ Add the `C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bi Download and install CMake [https://cmake.org/download/](https://cmake.org/download/) to the default location. CMake installer will add CMake to your system path. -#### OpenCV 4.5.5 and OpenCV Contrib Modules +#### OpenCV 4.6.0 and OpenCV Contrib Modules -The following commands should do everything to download and install OpenCV 4.5.5 on Windows: +The following commands should do everything to download and install OpenCV 4.6.0 on Windows: chdir %GOPATH%\src\gocv.io\x\gocv win_build_opencv.cmd @@ -439,8 +439,8 @@ Now you should be able to build or run any of the command examples: The version program should output the following: - gocv version: 0.30.0 - opencv lib version: 4.5.5 + gocv version: 0.31.0 + opencv lib version: 4.6.0 That's it, now you are ready to use GoCV. @@ -454,7 +454,7 @@ For example: set CGO_CXXFLAGS="--std=c++11" set CGO_CPPFLAGS=-IC:\opencv\build\install\include - set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core455 -lopencv_face455 -lopencv_videoio455 -lopencv_imgproc455 -lopencv_highgui455 -lopencv_imgcodecs455 -lopencv_objdetect455 -lopencv_features2d455 -lopencv_video455 -lopencv_dnn455 -lopencv_xfeatures2d455 -lopencv_plot455 -lopencv_tracking455 -lopencv_img_hash455 + set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core460 -lopencv_face460 -lopencv_videoio460 -lopencv_imgproc460 -lopencv_highgui460 -lopencv_imgcodecs460 -lopencv_objdetect460 -lopencv_features2d460 -lopencv_video460 -lopencv_dnn460 -lopencv_xfeatures2d460 -lopencv_plot460 -lopencv_tracking460 -lopencv_img_hash460 Please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code, in order to setup the needed ENV variables. Once you have done so, you can execute code that uses GoCV with your custom environment like this: diff --git a/vendor/gocv.io/x/gocv/ROADMAP.md b/vendor/gocv.io/x/gocv/ROADMAP.md index 603140c..a38f245 100644 --- a/vendor/gocv.io/x/gocv/ROADMAP.md +++ b/vendor/gocv.io/x/gocv/ROADMAP.md @@ -395,6 +395,6 @@ Your pull requests will be greatly appreciated! - [ ] viz. 3D Visualizer - [X] **wechat_qrcode. WeChat QR code detector for detecting and parsing QR code** - [ ] **xfeatures2d. Extra 2D Features Framework - WORK STARTED** -- [ ] ximgproc. Extended Image Processing +- [ ] **ximgproc. Extended Image Processing - WORK STARTED** - [ ] xobjdetect. Extended object detection -- [ ] **xphoto. Additional photo processing algorithms - WORK STARTED** +- [X] **xphoto. Additional photo processing algorithms** diff --git a/vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd b/vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd index 0ee01c7..82d43d7 100644 --- a/vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd +++ b/vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd @@ -3,17 +3,17 @@ if not exist "C:\opencv" mkdir "C:\opencv" if not exist "C:\opencv\build" mkdir "C:\opencv\build" if not exist "C:\opencv\testdata" mkdir "C:\opencv\testdata" -appveyor DownloadFile https://github.com/opencv/opencv/archive/4.5.5.zip -FileName c:\opencv\opencv-4.5.5.zip -7z x c:\opencv\opencv-4.5.5.zip -oc:\opencv -y -del c:\opencv\opencv-4.5.5.zip /q -appveyor DownloadFile https://github.com/opencv/opencv_contrib/archive/4.5.5.zip -FileName c:\opencv\opencv_contrib-4.5.5.zip -7z x c:\opencv\opencv_contrib-4.5.5.zip -oc:\opencv -y -del c:\opencv\opencv_contrib-4.5.5.zip /q +appveyor DownloadFile https://github.com/opencv/opencv/archive/4.6.0.zip -FileName c:\opencv\opencv-4.6.0.zip +7z x c:\opencv\opencv-4.6.0.zip -oc:\opencv -y +del c:\opencv\opencv-4.6.0.zip /q +appveyor DownloadFile https://github.com/opencv/opencv_contrib/archive/4.6.0.zip -FileName c:\opencv\opencv_contrib-4.6.0.zip +7z x c:\opencv\opencv_contrib-4.6.0.zip -oc:\opencv -y +del c:\opencv\opencv_contrib-4.6.0.zip /q cd C:\opencv\build set PATH=C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\PsTools;C:\Program Files (x86)\CMake\bin;C:\go\bin;C:\Tools\NuGet;C:\Program Files\LLVM\bin;C:\Tools\curl\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Yarn\bin;C:\Users\appveyor\AppData\Local\Yarn\bin;C:\Program Files\AppVeyor\BuildAgent\ set PATH=%PATH%;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin dir C:\opencv -cmake C:\opencv\opencv-4.5.5 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.5\modules -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_wechat_qrcode=ON -DCPU_DISPATCH= -DBUILD_opencv_gapi=OFF -DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -DWITH_TBB=ON -Wno-dev +cmake C:\opencv\opencv-4.6.0 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.6.0\modules -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_wechat_qrcode=ON -DCPU_DISPATCH= -DBUILD_opencv_gapi=OFF -DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -DWITH_TBB=ON -Wno-dev mingw32-make -j%NUMBER_OF_PROCESSORS% mingw32-make install appveyor DownloadFile https://raw.githubusercontent.com/opencv/opencv_extra/master/testdata/dnn/bvlc_googlenet.prototxt -FileName C:\opencv\testdata\bvlc_googlenet.prototxt @@ -25,5 +25,5 @@ appveyor DownloadFile http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemod appveyor DownloadFile https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -FileName C:\opencv\testdata\inception5h.zip appveyor DownloadFile https://github.com/onnx/models/raw/main/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx -FileName C:\opencv\testdata\googlenet-9.onnx 7z x C:\opencv\testdata\inception5h.zip -oC:\opencv\testdata tensorflow_inception_graph.pb -y -rmdir c:\opencv\opencv-4.5.5 /s /q -rmdir c:\opencv\opencv_contrib-4.5.5 /s /q +rmdir c:\opencv\opencv-4.6.0 /s /q +rmdir c:\opencv\opencv_contrib-4.6.0 /s /q diff --git a/vendor/gocv.io/x/gocv/cgo.go b/vendor/gocv.io/x/gocv/cgo.go index 3084b1e..e314c52 100644 --- a/vendor/gocv.io/x/gocv/cgo.go +++ b/vendor/gocv.io/x/gocv/cgo.go @@ -9,6 +9,6 @@ package gocv #cgo !windows pkg-config: opencv4 #cgo CXXFLAGS: --std=c++11 #cgo windows CPPFLAGS: -IC:/opencv/build/install/include -#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/lib -lopencv_core455 -lopencv_face455 -lopencv_videoio455 -lopencv_imgproc455 -lopencv_highgui455 -lopencv_imgcodecs455 -lopencv_objdetect455 -lopencv_features2d455 -lopencv_video455 -lopencv_dnn455 -lopencv_xfeatures2d455 -lopencv_plot455 -lopencv_tracking455 -lopencv_img_hash455 -lopencv_calib3d455 -lopencv_bgsegm455 -lopencv_photo455 -lopencv_aruco455 -lopencv_wechat_qrcode455 +#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/lib -lopencv_core460 -lopencv_face460 -lopencv_videoio460 -lopencv_imgproc460 -lopencv_highgui460 -lopencv_imgcodecs460 -lopencv_objdetect460 -lopencv_features2d460 -lopencv_video460 -lopencv_dnn460 -lopencv_xfeatures2d460 -lopencv_plot460 -lopencv_tracking460 -lopencv_img_hash460 -lopencv_calib3d460 -lopencv_bgsegm460 -lopencv_photo460 -lopencv_aruco460 -lopencv_wechat_qrcode460 -lopencv_ximgproc460 */ import "C" diff --git a/vendor/gocv.io/x/gocv/cgo_static.go b/vendor/gocv.io/x/gocv/cgo_static.go index e74799c..33eaf81 100644 --- a/vendor/gocv.io/x/gocv/cgo_static.go +++ b/vendor/gocv.io/x/gocv/cgo_static.go @@ -10,6 +10,6 @@ package gocv #cgo !windows CPPFLAGS: -I/usr/local/include -I/usr/local/include/opencv4 #cgo !windows LDFLAGS: -L/usr/local/lib -L/usr/local/lib/opencv4/3rdparty -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_highgui -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_video -lopencv_videoio -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_wechat_qrcode -lopencv_photo -lopencv_imgproc -lopencv_core -littnotify -llibprotobuf -lIlmImf -lquirc -lippiw -lippicv -lade -lz -ljpeg -ldl -lm -lpthread -lrt -lquadmath #cgo windows CPPFLAGS: -IC:/opencv/build/install/include -#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/staticlib -lopencv_stereo455 -lopencv_tracking455 -lopencv_superres455 -lopencv_stitching455 -lopencv_optflow455 -lopencv_gapi455 -lopencv_face455 -lopencv_dpm455 -lopencv_dnn_objdetect455 -lopencv_ccalib455 -lopencv_bioinspired455 -lopencv_bgsegm455 -lopencv_aruco455 -lopencv_xobjdetect455 -lopencv_ximgproc455 -lopencv_xfeatures2d455 -lopencv_videostab455 -lopencv_video455 -lopencv_structured_light455 -lopencv_shape455 -lopencv_rgbd455 -lopencv_rapid455 -lopencv_objdetect455 -lopencv_mcc455 -lopencv_highgui455 -lopencv_datasets455 -lopencv_calib3d455 -lopencv_videoio455 -lopencv_text455 -lopencv_line_descriptor455 -lopencv_imgcodecs455 -lopencv_img_hash455 -lopencv_hfs455 -lopencv_fuzzy455 -lopencv_features2d455 -lopencv_dnn_superres455 -lopencv_dnn455 -lopencv_xphoto455 -lopencv_wechat_qrcode455 -lopencv_surface_matching455 -lopencv_reg455 -lopencv_quality455 -lopencv_plot455 -lopencv_photo455 -lopencv_phase_unwrapping455 -lopencv_ml455 -lopencv_intensity_transform455 -lopencv_imgproc455 -lopencv_flann455 -lopencv_core455 -lade -lquirc -llibprotobuf -lIlmImf -llibpng -llibopenjp2 -llibwebp -llibtiff -llibjpeg-turbo -lzlib -lkernel32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -luser32 +#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/staticlib -lopencv_stereo460 -lopencv_tracking460 -lopencv_superres460 -lopencv_stitching460 -lopencv_optflow460 -lopencv_gapi460 -lopencv_face460 -lopencv_dpm460 -lopencv_dnn_objdetect460 -lopencv_ccalib460 -lopencv_bioinspired460 -lopencv_bgsegm460 -lopencv_aruco460 -lopencv_xobjdetect460 -lopencv_ximgproc460 -lopencv_xfeatures2d460 -lopencv_videostab460 -lopencv_video460 -lopencv_structured_light460 -lopencv_shape460 -lopencv_rgbd460 -lopencv_rapid460 -lopencv_objdetect460 -lopencv_mcc460 -lopencv_highgui460 -lopencv_datasets460 -lopencv_calib3d460 -lopencv_videoio460 -lopencv_text460 -lopencv_line_descriptor460 -lopencv_imgcodecs460 -lopencv_img_hash460 -lopencv_hfs460 -lopencv_fuzzy460 -lopencv_features2d460 -lopencv_dnn_superres460 -lopencv_dnn460 -lopencv_xphoto460 -lopencv_wechat_qrcode460 -lopencv_surface_matching460 -lopencv_reg460 -lopencv_quality460 -lopencv_plot460 -lopencv_photo460 -lopencv_phase_unwrapping460 -lopencv_ml460 -lopencv_intensity_transform460 -lopencv_imgproc460 -lopencv_flann460 -lopencv_core460 -lade -lquirc -llibprotobuf -lIlmImf -llibpng -llibopenjp2 -llibwebp -llibtiff -llibjpeg-turbo -lzlib -lkernel32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -luser32 */ import "C" diff --git a/vendor/gocv.io/x/gocv/core.cpp b/vendor/gocv.io/x/gocv/core.cpp index 0b5a12c..e614c61 100644 --- a/vendor/gocv.io/x/gocv/core.cpp +++ b/vendor/gocv.io/x/gocv/core.cpp @@ -210,6 +210,10 @@ int Mat_Total(Mat m) { return m->total(); } +int Mat_ElemSize(Mat m){ + return m->elemSize(); +} + void Mat_Size(Mat m, IntVector* res) { cv::MatSize ms(m->size); int* ids = new int[ms.dims()]; diff --git a/vendor/gocv.io/x/gocv/core.go b/vendor/gocv.io/x/gocv/core.go index b39f20a..95010ee 100644 --- a/vendor/gocv.io/x/gocv/core.go +++ b/vendor/gocv.io/x/gocv/core.go @@ -668,6 +668,11 @@ func (m *Mat) Step() int { return int(C.Mat_Step(m.p)) } +// ElemSize returns the matrix element size in bytes. +func (m *Mat) ElemSize() int { + return int(C.Mat_ElemSize(m.p)) +} + // GetUCharAt returns a value from a specific row/col // in this Mat expecting it to be of type uchar aka CV_8U. func (m *Mat) GetUCharAt(row int, col int) uint8 { @@ -2119,6 +2124,9 @@ func NewPointsVector() PointsVector { // NewPointsVectorFromPoints returns a new PointsVector that has been // initialized to a slice of slices of image.Point. func NewPointsVectorFromPoints(pts [][]image.Point) PointsVector { + if len(pts) <= 0 { + return NewPointsVector() + } points := make([]C.struct_Points, len(pts)) for i, pt := range pts { diff --git a/vendor/gocv.io/x/gocv/core.h b/vendor/gocv.io/x/gocv/core.h index 29992c3..6f85f25 100644 --- a/vendor/gocv.io/x/gocv/core.h +++ b/vendor/gocv.io/x/gocv/core.h @@ -304,6 +304,7 @@ int Mat_Cols(Mat m); int Mat_Channels(Mat m); int Mat_Type(Mat m); int Mat_Step(Mat m); +int Mat_ElemSize(Mat m); Mat Eye(int rows, int cols, int type); Mat Zeros(int rows, int cols, int type); Mat Ones(int rows, int cols, int type); diff --git a/vendor/gocv.io/x/gocv/imgproc.cpp b/vendor/gocv.io/x/gocv/imgproc.cpp index cc8682b..2182ffb 100644 --- a/vendor/gocv.io/x/gocv/imgproc.cpp +++ b/vendor/gocv.io/x/gocv/imgproc.cpp @@ -501,6 +501,13 @@ void WarpPerspective(Mat src, Mat dst, Mat m, Size dsize) { cv::warpPerspective(*src, *dst, *m, sz); } +void WarpPerspectiveWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode, + Scalar borderValue) { + cv::Size sz(dsize.width, dsize.height); + cv::Scalar c = cv::Scalar(borderValue.val1, borderValue.val2, borderValue.val3, borderValue.val4); + cv::warpPerspective(*src, *dst, *rot_mat, sz, flags, borderMode, c); +} + void Watershed(Mat image, Mat markers) { cv::watershed(*image, *markers); } diff --git a/vendor/gocv.io/x/gocv/imgproc.go b/vendor/gocv.io/x/gocv/imgproc.go index 0ab0edb..e3b5ca7 100644 --- a/vendor/gocv.io/x/gocv/imgproc.go +++ b/vendor/gocv.io/x/gocv/imgproc.go @@ -1568,6 +1568,12 @@ const ( // InterpolationMax indicates use maximum interpolation. InterpolationMax InterpolationFlags = 7 + + // WarpFillOutliers fills all of the destination image pixels. If some of them correspond to outliers in the source image, they are set to zero. + WarpFillOutliers = 8 + + // WarpInverseMap, inverse transformation. + WarpInverseMap = 16 ) // Resize resizes an image. @@ -1649,6 +1655,7 @@ func WarpAffineWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags Interp } // WarpPerspective applies a perspective transformation to an image. +// For more parameters please check WarpPerspectiveWithParams. // // For further details, please see: // https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87 @@ -1661,6 +1668,24 @@ func WarpPerspective(src Mat, dst *Mat, m Mat, sz image.Point) { C.WarpPerspective(src.p, dst.p, m.p, pSize) } +// WarpPerspectiveWithParams applies a perspective transformation to an image. +// +// For further details, please see: +// https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87 +func WarpPerspectiveWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA) { + pSize := C.struct_Size{ + width: C.int(sz.X), + height: C.int(sz.Y), + } + bv := C.struct_Scalar{ + val1: C.double(borderValue.B), + val2: C.double(borderValue.G), + val3: C.double(borderValue.R), + val4: C.double(borderValue.A), + } + C.WarpPerspectiveWithParams(src.p, dst.p, m.p, pSize, C.int(flags), C.int(borderType), bv) +} + // Watershed performs a marker-based image segmentation using the watershed algorithm. // // For further details, please see: diff --git a/vendor/gocv.io/x/gocv/imgproc.h b/vendor/gocv.io/x/gocv/imgproc.h index 63b1bc3..bd97fd7 100644 --- a/vendor/gocv.io/x/gocv/imgproc.h +++ b/vendor/gocv.io/x/gocv/imgproc.h @@ -104,6 +104,8 @@ void WarpAffine(Mat src, Mat dst, Mat rot_mat, Size dsize); void WarpAffineWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode, Scalar borderValue); void WarpPerspective(Mat src, Mat dst, Mat m, Size dsize); +void WarpPerspectiveWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode, + Scalar borderValue); void Watershed(Mat image, Mat markers); void ApplyColorMap(Mat src, Mat dst, int colormap); void ApplyCustomColorMap(Mat src, Mat dst, Mat colormap); diff --git a/vendor/gocv.io/x/gocv/version.go b/vendor/gocv.io/x/gocv/version.go index f6141f0..5363676 100644 --- a/vendor/gocv.io/x/gocv/version.go +++ b/vendor/gocv.io/x/gocv/version.go @@ -7,7 +7,7 @@ package gocv import "C" // GoCVVersion of this package, for display purposes. -const GoCVVersion = "0.30.0" +const GoCVVersion = "0.31.0" // Version returns the current golang package version func Version() string { diff --git a/vendor/gocv.io/x/gocv/video.cpp b/vendor/gocv.io/x/gocv/video.cpp index f8c97bd..0727c8e 100644 --- a/vendor/gocv.io/x/gocv/video.cpp +++ b/vendor/gocv.io/x/gocv/video.cpp @@ -47,6 +47,10 @@ void CalcOpticalFlowPyrLKWithParams(Mat prevImg, Mat nextImg, Mat prevPts, Mat n cv::calcOpticalFlowPyrLK(*prevImg, *nextImg, *prevPts, *nextPts, *status, *err, sz, maxLevel, *criteria, flags, minEigThreshold); } +double FindTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize){ + return cv::findTransformECC(*templateImage, *inputImage, *warpMatrix, motionType, *criteria, *inputMask, gaussFiltSize); +} + bool Tracker_Init(Tracker self, Mat image, Rect boundingBox) { cv::Rect bb(boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height); diff --git a/vendor/gocv.io/x/gocv/video.go b/vendor/gocv.io/x/gocv/video.go index be6f310..9e3301b 100644 --- a/vendor/gocv.io/x/gocv/video.go +++ b/vendor/gocv.io/x/gocv/video.go @@ -22,6 +22,20 @@ const ( OptflowFarnebackGaussian = 256 ) +/** + cv::MOTION_TRANSLATION = 0, + cv::MOTION_EUCLIDEAN = 1, + cv::MOTION_AFFINE = 2, + cv::MOTION_HOMOGRAPHY = 3 + For further details, please see: https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a01106d6d20122b782ff25eaeffe9a5be +*/ +const ( + MotionTranslation = 0 + MotionEuclidean = 1 + MotionAffine = 2 + MotionHomography = 3 +) + // BackgroundSubtractorMOG2 is a wrapper around the cv::BackgroundSubtractorMOG2. type BackgroundSubtractorMOG2 struct { // C.BackgroundSubtractorMOG2 @@ -156,6 +170,15 @@ func CalcOpticalFlowPyrLKWithParams(prevImg Mat, nextImg Mat, prevPts Mat, nextP return } +// FindTransformECC finds the geometric transform (warp) between two images in terms of the ECC criterion. +// +// For futther details, please see: +// https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47 +// +func FindTransformECC(templateImage Mat, inputImage Mat, warpMatrix *Mat, motionType int, criteria TermCriteria, inputMask Mat, gaussFiltSize int) float64 { + return float64(C.FindTransformECC(templateImage.p, inputImage.p, warpMatrix.p, C.int(motionType), criteria.p, inputMask.p, C.int(gaussFiltSize))) +} + // Tracker is the base interface for object tracking. // // see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html diff --git a/vendor/gocv.io/x/gocv/video.h b/vendor/gocv.io/x/gocv/video.h index 9ff1698..af09b51 100644 --- a/vendor/gocv.io/x/gocv/video.h +++ b/vendor/gocv.io/x/gocv/video.h @@ -39,6 +39,8 @@ void CalcOpticalFlowPyrLKWithParams(Mat prevImg, Mat nextImg, Mat prevPts, Mat n void CalcOpticalFlowFarneback(Mat prevImg, Mat nextImg, Mat flow, double pyrScale, int levels, int winsize, int iterations, int polyN, double polySigma, int flags); +double FindTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize); + bool Tracker_Init(Tracker self, Mat image, Rect boundingBox); bool Tracker_Update(Tracker self, Mat image, Rect* boundingBox); diff --git a/vendor/gocv.io/x/gocv/win_build_opencv.cmd b/vendor/gocv.io/x/gocv/win_build_opencv.cmd index b9bcfb5..fc91411 100644 --- a/vendor/gocv.io/x/gocv/win_build_opencv.cmd +++ b/vendor/gocv.io/x/gocv/win_build_opencv.cmd @@ -11,18 +11,18 @@ echo. REM This is why there is no progress bar: REM https://github.com/PowerShell/PowerShell/issues/2138 -echo Downloading: opencv-4.5.5.zip [91MB] -powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/4.5.5.zip -OutFile c:\opencv\opencv-4.5.5.zip" +echo Downloading: opencv-4.6.0.zip [91MB] +powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/4.6.0.zip -OutFile c:\opencv\opencv-4.6.0.zip" echo Extracting... -powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv-4.5.5.zip -DestinationPath c:\opencv" -del c:\opencv\opencv-4.5.5.zip /q +powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv-4.6.0.zip -DestinationPath c:\opencv" +del c:\opencv\opencv-4.6.0.zip /q echo. -echo Downloading: opencv_contrib-4.5.5.zip [58MB] -powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv_contrib/archive/4.5.5.zip -OutFile c:\opencv\opencv_contrib-4.5.5.zip" +echo Downloading: opencv_contrib-4.6.0.zip [58MB] +powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv_contrib/archive/4.6.0.zip -OutFile c:\opencv\opencv_contrib-4.6.0.zip" echo Extracting... -powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv_contrib-4.5.5.zip -DestinationPath c:\opencv" -del c:\opencv\opencv_contrib-4.5.5.zip /q +powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv_contrib-4.6.0.zip -DestinationPath c:\opencv" +del c:\opencv\opencv_contrib-4.6.0.zip /q echo. echo Done with downloading and extracting sources. @@ -38,9 +38,9 @@ if [%1]==[static] ( ) else ( set enable_shared=ON ) -cmake C:\opencv\opencv-4.5.5 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.5\modules -DBUILD_SHARED_LIBS=%enable_shared% -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_wechat_qrcode=ON -DCPU_DISPATCH= -DOPENCV_GENERATE_PKGCONFIG=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -Wno-dev +cmake C:\opencv\opencv-4.6.0 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.6.0\modules -DBUILD_SHARED_LIBS=%enable_shared% -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_wechat_qrcode=ON -DCPU_DISPATCH= -DOPENCV_GENERATE_PKGCONFIG=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -Wno-dev mingw32-make -j%NUMBER_OF_PROCESSORS% mingw32-make install -rmdir c:\opencv\opencv-4.5.5 /s /q -rmdir c:\opencv\opencv_contrib-4.5.5 /s /q +rmdir c:\opencv\opencv-4.6.0 /s /q +rmdir c:\opencv\opencv_contrib-4.6.0 /s /q chdir /D %GOPATH%\src\gocv.io\x\gocv diff --git a/vendor/golang.org/x/sync/AUTHORS b/vendor/golang.org/x/sync/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/sync/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/sync/CONTRIBUTORS b/vendor/golang.org/x/sync/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/sync/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/vendor/golang.org/x/sync/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/sync/PATENTS b/vendor/golang.org/x/sync/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/vendor/golang.org/x/sync/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/sync/semaphore/semaphore.go b/vendor/golang.org/x/sync/semaphore/semaphore.go new file mode 100644 index 0000000..30f632c --- /dev/null +++ b/vendor/golang.org/x/sync/semaphore/semaphore.go @@ -0,0 +1,136 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package semaphore provides a weighted semaphore implementation. +package semaphore // import "golang.org/x/sync/semaphore" + +import ( + "container/list" + "context" + "sync" +) + +type waiter struct { + n int64 + ready chan<- struct{} // Closed when semaphore acquired. +} + +// NewWeighted creates a new weighted semaphore with the given +// maximum combined weight for concurrent access. +func NewWeighted(n int64) *Weighted { + w := &Weighted{size: n} + return w +} + +// Weighted provides a way to bound concurrent access to a resource. +// The callers can request access with a given weight. +type Weighted struct { + size int64 + cur int64 + mu sync.Mutex + waiters list.List +} + +// Acquire acquires the semaphore with a weight of n, blocking until resources +// are available or ctx is done. On success, returns nil. On failure, returns +// ctx.Err() and leaves the semaphore unchanged. +// +// If ctx is already done, Acquire may still succeed without blocking. +func (s *Weighted) Acquire(ctx context.Context, n int64) error { + s.mu.Lock() + if s.size-s.cur >= n && s.waiters.Len() == 0 { + s.cur += n + s.mu.Unlock() + return nil + } + + if n > s.size { + // Don't make other Acquire calls block on one that's doomed to fail. + s.mu.Unlock() + <-ctx.Done() + return ctx.Err() + } + + ready := make(chan struct{}) + w := waiter{n: n, ready: ready} + elem := s.waiters.PushBack(w) + s.mu.Unlock() + + select { + case <-ctx.Done(): + err := ctx.Err() + s.mu.Lock() + select { + case <-ready: + // Acquired the semaphore after we were canceled. Rather than trying to + // fix up the queue, just pretend we didn't notice the cancelation. + err = nil + default: + isFront := s.waiters.Front() == elem + s.waiters.Remove(elem) + // If we're at the front and there're extra tokens left, notify other waiters. + if isFront && s.size > s.cur { + s.notifyWaiters() + } + } + s.mu.Unlock() + return err + + case <-ready: + return nil + } +} + +// TryAcquire acquires the semaphore with a weight of n without blocking. +// On success, returns true. On failure, returns false and leaves the semaphore unchanged. +func (s *Weighted) TryAcquire(n int64) bool { + s.mu.Lock() + success := s.size-s.cur >= n && s.waiters.Len() == 0 + if success { + s.cur += n + } + s.mu.Unlock() + return success +} + +// Release releases the semaphore with a weight of n. +func (s *Weighted) Release(n int64) { + s.mu.Lock() + s.cur -= n + if s.cur < 0 { + s.mu.Unlock() + panic("semaphore: released more than held") + } + s.notifyWaiters() + s.mu.Unlock() +} + +func (s *Weighted) notifyWaiters() { + for { + next := s.waiters.Front() + if next == nil { + break // No more waiters blocked. + } + + w := next.Value.(waiter) + if s.size-s.cur < w.n { + // Not enough tokens for the next waiter. We could keep going (to try to + // find a waiter with a smaller request), but under load that could cause + // starvation for large requests; instead, we leave all remaining waiters + // blocked. + // + // Consider a semaphore used as a read-write lock, with N tokens, N + // readers, and one writer. Each reader can Acquire(1) to obtain a read + // lock. The writer can Acquire(N) to obtain a write lock, excluding all + // of the readers. If we allow the readers to jump ahead in the queue, + // the writer will starve — there is always one token available for every + // reader. + break + } + + s.cur += w.n + s.waiters.Remove(next) + close(w.ready) + } +} diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go index a427f8b..9c61112 100644 --- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go @@ -21,10 +21,11 @@ import ( type Number int32 const ( - MinValidNumber Number = 1 - FirstReservedNumber Number = 19000 - LastReservedNumber Number = 19999 - MaxValidNumber Number = 1<<29 - 1 + MinValidNumber Number = 1 + FirstReservedNumber Number = 19000 + LastReservedNumber Number = 19999 + MaxValidNumber Number = 1<<29 - 1 + DefaultRecursionLimit = 10000 ) // IsValid reports whether the field number is semantically valid. @@ -55,6 +56,7 @@ const ( errCodeOverflow errCodeReserved errCodeEndGroup + errCodeRecursionDepth ) var ( @@ -112,6 +114,10 @@ func ConsumeField(b []byte) (Number, Type, int) { // When parsing a group, the length includes the end group marker and // the end group is verified to match the starting field number. func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { + return consumeFieldValueD(num, typ, b, DefaultRecursionLimit) +} + +func consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) { switch typ { case VarintType: _, n = ConsumeVarint(b) @@ -126,6 +132,9 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { _, n = ConsumeBytes(b) return n case StartGroupType: + if depth < 0 { + return errCodeRecursionDepth + } n0 := len(b) for { num2, typ2, n := ConsumeTag(b) @@ -140,7 +149,7 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { return n0 - len(b) } - n = ConsumeFieldValue(num2, typ2, b) + n = consumeFieldValueD(num2, typ2, b, depth-1) if n < 0 { return n // forward error code } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index eb10ea1..3780377 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -381,7 +381,7 @@ func (d *Decoder) currentOpenKind() (Kind, byte) { case '[': return ListOpen, ']' } - panic(fmt.Sprintf("Decoder: openStack contains invalid byte %s", string(openCh))) + panic(fmt.Sprintf("Decoder: openStack contains invalid byte %c", openCh)) } func (d *Decoder) pushOpenStack(ch byte) { diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go index f90e909..fbcd349 100644 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +++ b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !go1.13 // +build !go1.13 package errors diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go index dc05f41..5e72f1c 100644 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +++ b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.13 // +build go1.13 package errors diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go index a72995f..bda8e8c 100644 --- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !protolegacy // +build !protolegacy package flags diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go index 772e2f0..6d8d9bd 100644 --- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build protolegacy // +build protolegacy package flags diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go index 2706bb6..4b15493 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !go1.12 // +build !go1.12 package impl diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go index 1533ef6..0b31b66 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.12 // +build go1.12 package impl diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go index 90705e3..145c577 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package impl diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go index e118af1..757642e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package impl diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go index 949dc49..c65b032 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -18,6 +18,7 @@ import ( ) var errDecode = errors.New("cannot parse invalid wire-format data") +var errRecursionDepth = errors.New("exceeded maximum recursion depth") type unmarshalOptions struct { flags protoiface.UnmarshalInputFlags @@ -25,6 +26,7 @@ type unmarshalOptions struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + depth int } func (o unmarshalOptions) Options() proto.UnmarshalOptions { @@ -44,6 +46,7 @@ func (o unmarshalOptions) IsDefault() bool { var lazyUnmarshalOptions = unmarshalOptions{ resolver: preg.GlobalTypes, + depth: protowire.DefaultRecursionLimit, } type unmarshalOutput struct { @@ -62,6 +65,7 @@ func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutp out, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{ flags: in.Flags, resolver: in.Resolver, + depth: in.Depth, }) var flags piface.UnmarshalOutputFlags if out.initialized { @@ -82,6 +86,10 @@ var errUnknown = errors.New("unknown") func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { mi.init() + opts.depth-- + if opts.depth < 0 { + return out, errRecursionDepth + } if flags.ProtoLegacy && mi.isMessageSet { return unmarshalMessageSet(mi, b, p, opts) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 9e3ed82..4c491bd 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package impl diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 9ecf23a..ee0e057 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package impl diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go index 85e074c..a1f6f33 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package strs diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go index 2160c70..56a8a4e 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package strs diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index 14e774f..3d40d52 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -52,8 +52,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 27 - Patch = 1 + Minor = 28 + Patch = 0 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index 49f9b8c..11bf717 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -42,18 +42,25 @@ type UnmarshalOptions struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + + // RecursionLimit limits how deeply messages may be nested. + // If zero, a default limit is applied. + RecursionLimit int } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func Unmarshal(b []byte, m Message) error { - _, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect()) + _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect()) return err } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { + if o.RecursionLimit == 0 { + o.RecursionLimit = protowire.DefaultRecursionLimit + } _, err := o.unmarshal(b, m.ProtoReflect()) return err } @@ -63,6 +70,9 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { // This method permits fine-grained control over the unmarshaler. // Most users should use Unmarshal instead. func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + if o.RecursionLimit == 0 { + o.RecursionLimit = protowire.DefaultRecursionLimit + } return o.unmarshal(in.Buf, in.Message) } @@ -86,12 +96,17 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto Message: m, Buf: b, Resolver: o.Resolver, + Depth: o.RecursionLimit, } if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } out, err = methods.Unmarshal(in) } else { + o.RecursionLimit-- + if o.RecursionLimit < 0 { + return out, errors.New("exceeded max recursion depth") + } err = o.unmarshalMessageSlow(b, m) } if err != nil { diff --git a/vendor/google.golang.org/protobuf/proto/proto_methods.go b/vendor/google.golang.org/protobuf/proto/proto_methods.go index d8dd604..465e057 100644 --- a/vendor/google.golang.org/protobuf/proto/proto_methods.go +++ b/vendor/google.golang.org/protobuf/proto/proto_methods.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The protoreflect build tag disables use of fast-path methods. +//go:build !protoreflect // +build !protoreflect package proto diff --git a/vendor/google.golang.org/protobuf/proto/proto_reflect.go b/vendor/google.golang.org/protobuf/proto/proto_reflect.go index b103d43..494d6ce 100644 --- a/vendor/google.golang.org/protobuf/proto/proto_reflect.go +++ b/vendor/google.golang.org/protobuf/proto/proto_reflect.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The protoreflect build tag disables use of fast-path methods. +//go:build protoreflect // +build protoreflect package proto diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go index 6be5d16..d5d5af6 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go @@ -53,6 +53,7 @@ type ( FindExtensionByName(field FullName) (ExtensionType, error) FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) } + Depth int } unmarshalOutput = struct { pragma.NoUnkeyedLiterals diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go index 918e685..7ced876 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package protoreflect diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index 5a34147..eb7764c 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -41,6 +41,31 @@ import ( // Converting to/from a Value and a concrete Go value panics on type mismatch. // For example, ValueOf("hello").Int() panics because this attempts to // retrieve an int64 from a string. +// +// List, Map, and Message Values are called "composite" values. +// +// A composite Value may alias (reference) memory at some location, +// such that changes to the Value updates the that location. +// A composite value acquired with a Mutable method, such as Message.Mutable, +// always references the source object. +// +// For example: +// // Append a 0 to a "repeated int32" field. +// // Since the Value returned by Mutable is guaranteed to alias +// // the source message, modifying the Value modifies the message. +// message.Mutable(fieldDesc).(List).Append(protoreflect.ValueOfInt32(0)) +// +// // Assign [0] to a "repeated int32" field by creating a new Value, +// // modifying it, and assigning it. +// list := message.NewField(fieldDesc).(List) +// list.Append(protoreflect.ValueOfInt32(0)) +// message.Set(fieldDesc, list) +// // ERROR: Since it is not defined whether Set aliases the source, +// // appending to the List here may or may not modify the message. +// list.Append(protoreflect.ValueOfInt32(0)) +// +// Some operations, such as Message.Get, may return an "empty, read-only" +// composite Value. Modifying an empty, read-only value panics. type Value value // The protoreflect API uses a custom Value union type instead of interface{} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go index c45debd..702ddf2 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package protoreflect diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 32c04f6..44cf467 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -103,6 +103,7 @@ type UnmarshalInput = struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + Depth int } // UnmarshalOutput is output from the Unmarshal method. diff --git a/vendor/modules.txt b/vendor/modules.txt index 871a879..dc28735 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,11 +1,11 @@ -# github.com/cyrilix/robocar-base v0.1.6 -## explicit; go 1.17 +# github.com/cyrilix/robocar-base v0.1.7 +## explicit; go 1.18 github.com/cyrilix/robocar-base/cli github.com/cyrilix/robocar-base/service -# github.com/cyrilix/robocar-protobuf/go v1.0.4 -## explicit; go 1.17 +# github.com/cyrilix/robocar-protobuf/go v1.0.5 +## explicit; go 1.18 github.com/cyrilix/robocar-protobuf/go/events -# github.com/eclipse/paho.mqtt.golang v1.3.5 +# github.com/eclipse/paho.mqtt.golang v1.4.1 ## explicit; go 1.14 github.com/eclipse/paho.mqtt.golang github.com/eclipse/paho.mqtt.golang/packets @@ -29,15 +29,18 @@ go.uber.org/zap/internal/bufferpool go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore -# gocv.io/x/gocv v0.30.0 +# gocv.io/x/gocv v0.31.0 ## explicit; go 1.13 gocv.io/x/gocv # golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 ## explicit; go 1.11 golang.org/x/net/internal/socks golang.org/x/net/proxy -# google.golang.org/protobuf v1.27.1 -## explicit; go 1.9 +# golang.org/x/sync v0.0.0-20210220032951-036812b2e83c +## explicit +golang.org/x/sync/semaphore +# google.golang.org/protobuf v1.28.0 +## explicit; go 1.11 google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt