- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用带有 ipv6 地址的 opencv 中的 VideoCapture 函数从我的树莓派流式传输到我的 debian 虚拟机,但是当我尝试时,标题中出现错误。
我已经确认通过 netcat 和 mplayer 可以访问 ipv6 地址,具体如下:
Debian 主机:
网猫-l -6 -u 2222
树莓派:
/opt/vc/bin/raspivid -t 0 -w 300 -h 300 -hf -fps 20 -o - | nc -u(ipv6地址)2222
代码:
VideoCapture vcap;
const string videoStreamAddress = "udp://" + "(my Ipv6 address)" + ":2222";
vcap.open(videoStreamAddress);
最佳答案
以您指定的格式使用的 IPv6 地址 <protocol>://
, 需要用括号括起来( [
和 ]
)。这最初是在 RFC 2732, Format for Literal IPv6 Addresses in URL's 中指定的。并继续 RFC 3896:, Uniform Resource Identifier (URI): Generic Syntax :
3.2.2. Host
The host subcomponent of authority is identified by an IP literalencapsulated within square brackets, an IPv4 address in dotted-decimal form, or a registered name. The host subcomponent is case-insensitive. he presence of a host subcomponent within a URI does notimply that the scheme requires access to the given host on theInternet. In many cases, the host syntax is used only for the sake ofreusing the existing registration process created and deployed forDNS, thus obtaining a globally unique name without the cost ofdeploying another registry. However, such use comes with its owncosts: domain name ownership may change over time for reasons notanticipated by the URI producer. In other cases, the data within thehost component identifies a registered name that has nothing to dowith an Internet host. We use the name "host" for the ABNF rulebecause that is its most common purpose, not its only purpose.
host = IP-literal / IPv4address / reg-name
The syntax rule for host is ambiguous because it does not completelydistinguish between an IPv4address and a reg-name. In order todisambiguate the syntax, we apply the "first-match-wins" algorithm: Ifhost matches the rule for IPv4address, then it should be considered anIPv4 address literal and not a reg-name. Although host iscase-insensitive, producers and normalizers should use lowercase forregistered names and hexadecimal addresses for the sake of uniformity,while only using uppercase letters for percent-encodings.
A host identified by an Internet Protocol literal address, version 6[RFC3513] or later, is distinguished by enclosing the IP literalwithin square brackets ("[" and "]"). This is the only place wheresquare bracket characters are allowed in the URI syntax. Inanticipation of future, as-yet-undefined IP literal address formats,an implementation may use an optional version flag to indicate such aformat explicitly rather than rely on heuristic determination.
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )The version flag does not indicate the IP version; rather, itindicates future versions of the literal format. As such,implementations must not provide the version flag for the existingIPv4 and IPv6 literal address forms described below. If a URIcontaining an IP-literal that starts with "v" (case-insensitive),indicating that the version flag is present, is dereferenced by anapplication that does not know the meaning of that version flag, thenthe application should return an appropriate error for "addressmechanism not supported".
A host identified by an IPv6 literal address is represented inside thesquare brackets without a preceding version flag. The ABNF providedhere is a translation of the text definition of an IPv6 literaladdress provided in [RFC3513]. This syntax does not support IPv6scoped addressing zone identifiers.
A 128-bit IPv6 address is divided into eight 16-bit pieces. Each pieceis represented numerically in case-insensitive hexadecimal, using oneto four hexadecimal digits (leading zeroes are permitted). The eightencoded pieces are given most-significant first, separated by coloncharacters. Optionally, the least-significant two pieces may insteadbe represented in IPv4 address textual format. A sequence of one ormore consecutive zero-valued 16-bit pieces within the address may beelided, omitting all their digits and leaving exactly two consecutivecolons in their place to mark the elision.
IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
ls32 = ( h16 ":" h16 ) / IPv4address
; least-significant 32 bits of address
h16 = 1*4HEXDIG
; 16 bits of address represented in hexadecimalA host identified by an IPv4 literal address is represented indotted-decimal notation (a sequence of four decimal numbers in therange 0 to 255, separated by "."), as described in [RFC1123] byreference to [RFC0952]. Note that other forms of dotted notation maybe interpreted on some platforms, as described in Section 7.4, butonly the dotted-decimal form of four octets is allowed by thisgrammar.
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255A host identified by a registered name is a sequence of charactersusually intended for lookup within a locally defined host or servicename registry, though the URI's scheme-specific semantics may requirethat a specific registry (or fixed name table) be used instead. Themost common name registry mechanism is the Domain Name System (DNS). Aregistered name intended for lookup in the DNS uses the syntax definedin Section 3.5 of [RFC1034] and Section 2.1 of [RFC1123]. Such a nameconsists of a sequence of domain labels separated by ".", each domainlabel starting and ending with an alphanumeric character and possiblyalso containing "-" characters. The rightmost domain label of a fullyqualified domain name in DNS may be followed by a single "." andshould be if it is necessary to distinguish between the completedomain name and some local domain.
reg-name = *( unreserved / pct-encoded / sub-delims )
If the URI scheme defines a default for host, then that defaultapplies when the host subcomponent is undefined or when the registeredname is empty (zero length). For example, the "file" URI scheme isdefined so that no authority, an empty host, and "localhost" all meanthe end-user's machine, whereas the "http" scheme considers a missingauthority or empty host invalid.
This specification does not mandate a particular registered namelookup technology and therefore does not restrict the syntax of reg-name beyond what is necessary for interoperability. Instead, itdelegates the issue of registered name syntax conformance to theoperating system of each application performing URI resolution, andthat operating system decides what it will allow for the purpose ofhost identification. A URI resolution implementation might use DNS,host tables, yellow pages, NetInfo, WINS, or any other system forlookup of registered names. However, a globally scoped naming system,such as DNS fully qualified domain names, is necessary for URIsintended to have global scope. URI producers should use names thatconform to the DNS syntax, even when use of DNS is not immediatelyapparent, and should limit these names to no more than 255 charactersin length.
The reg-name syntax allows percent-encoded octets in order torepresent non-ASCII registered names in a uniform way that isindependent of the underlying name resolution technology. Non-ASCIIcharacters must first be encoded according to UTF-8 [STD63], and theneach octet of the corresponding UTF-8 sequence must be percent-encoded to be represented as URI characters. URI producingapplications must not use percent-encoding in host unless it is usedto represent a UTF-8 character sequence. When a non-ASCII registeredname represents an internationalized domain name intended forresolution via the DNS, the name must be transformed to the IDNAencoding [RFC3490] prior to name lookup. URI producers should providethese registered names in the IDNA encoding, rather than apercent-encoding, if they wish to maximize interoperability withlegacy URI resolvers.
关于opencv - vcap 无法打开 [udp @ 0x56378e8a76a0] 绑定(bind)失败 : Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55384201/
问题故障解决记录 -- Java RMI Connection refused to host: x.x.x.x .... 在学习JavaRMI时,我遇到了以下情况 问题原因:可
我正在玩 Rank-N-type 并尝试输入 x x .但我发现这两个函数可以以相同的方式输入,这很不直观。 f :: (forall a b. a -> b) -> c f x = x x g ::
这个问题已经有答案了: How do you compare two version Strings in Java? (31 个回答) 已关闭 8 年前。 有谁知道如何在Java中比较两个版本字符串
这个问题已经有答案了: How do the post increment (i++) and pre increment (++i) operators work in Java? (14 个回答)
下面是带有 -n 和 -r 选项的 netstat 命令的输出,其中目标字段显示压缩地址 (127.1/16)。我想知道 netstat 命令是否有任何方法或选项可以显示整个目标 IP (127.1.
我知道要证明 : (¬ ∀ x, p x) → (∃ x, ¬ p x) 证明是: theorem : (¬ ∀ x, p x) → (∃ x, ¬ p x) := begin intro n
x * x 如何通过将其存储在“auto 变量”中来更改?我认为它应该仍然是相同的,并且我的测试表明类型、大小和值显然都是相同的。 但即使 x * x == (xx = x * x) 也是错误的。什么
假设,我们这样表达: someIQueryable.Where(x => x.SomeBoolProperty) someIQueryable.Where(x => !x.SomeBoolProper
我有一个字符串 1234X5678 我使用这个正则表达式来匹配模式 .X|..X|X. 我得到了 34X 问题是为什么我没有得到 4X 或 X5? 为什么正则表达式选择执行第二种模式? 最佳答案 这里
我的一个 friend 在面试时遇到了这个问题 找到使该函数返回真值的 x 值 function f(x) { return (x++ !== x) && (x++ === x); } 面试官
这个问题在这里已经有了答案: 10年前关闭。 Possible Duplicate: Isn't it easier to work with foo when it is represented b
我是 android 的新手,我一直在练习开发一个针对 2.2 版本的应用程序,我需要帮助了解如何将我的应用程序扩展到其他版本,即 1.x、2.3.x、3 .x 和 4.x.x,以及一些针对屏幕分辨率
为什么案例 1 给我们 :error: TypeError: x is undefined on line... //case 1 var x; x.push(x); console.log(x);
代码优先: # CASE 01 def test1(x): x += x print x l = [100] test1(l) print l CASE01 输出: [100, 100
我正在努力温习我的大计算。如果我有将所有项目移至 'i' 2 个空格右侧的函数,我有一个如下所示的公式: (n -1) + (n - 2) + (n - 3) ... (n - n) 第一次迭代我必须
给定 IP 字符串(如 x.x.x.x/x),我如何或将如何计算 IP 的范围最常见的情况可能是 198.162.1.1/24但可以是任何东西,因为法律允许的任何东西。 我要带198.162.1.1/
在我作为初学者努力编写干净的 Javascript 代码时,我最近阅读了 this article当我偶然发现这一段时,关于 JavaScript 中的命名空间: The code at the ve
我正在编写一个脚本,我希望避免污染 DOM 的其余部分,它将是一个用于收集一些基本访问者分析数据的第 3 方脚本。 我通常使用以下内容创建一个伪“命名空间”: var x = x || {}; 我正在
我尝试运行我的test_container_services.py套件,但遇到了以下问题: docker.errors.APIError:500服务器错误:内部服务器错误(“ b'{” message
是否存在这两个 if 语句会产生不同结果的情况? if(x as X != null) { // Do something } if(x is X) { // Do something } 编
我是一名优秀的程序员,十分优秀!