<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">I cross compiled the dynamic library of live555 for ARM linux first, and then mixed compiled the modified example “testH264VideoStreaming.cpp” </div></blockquote><div><br class=""></div>You should first verify that the *unmodified* “testH264VideoStreamer” (sic) application code works OK for you. Then, and only then, should you modify the supplied code.</div><div><br class=""></div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">The only problem is that the URL is wrong, so I tracked back to the live555 library, and in the RTSPServer.cpp, in the function rtspURLPrefix(), the address in urlBuffer is wrong when using sprintf, the portNumHostOrder is defined as unsigned short, then %hu is right, but when urlBuffer is printed out, 8554 is printed out as 20552, it seems the output is in its octonary format, do have one have this problem similar with. Thank you. </div></div></div></blockquote><div><br class=""></div>The library code is correct. Note that port numbers are stored (in the “Port” class; see “groupsock/include/NetAddress.hh”) in network byte order. That’s why the implementation of "RTSPServer::rtspURLPrefix()” calls “ntohs()” on the port number before putting it into a “<a href="rtsp://“" class="">rtsp://“</a> URL.</div><div><br class=""></div><div>Therefore - assuming that the “ntohs()” (etc.) functions are working correctly on your system - the problem must be in the way that you are giving your RTSP server its port number. Note that the code for “testH264VideoStreamer” (and other applications that create RTSP servers) call “RTSPServer::createNew()”, passing the port number parameter as an integer in host order (e.g., 554 or 8554). You should do the same in your application.</div><div><br class=""></div><div>You’ll note, however, that “RTSPServer::createNew()” actually takes a “Port” object as parameter. If you instead give it an integer as parameter (as all of the application examples do), then this integer will be automatically converted to a “Port” object. This is done using the “Port()” constructor that’s defined in “groupsock/include/NetAddress.hh”, line 96 (and implemented (in “groupsock/NetAddress.cpp”) by calling “htons()” on the integer parameter, before storing it (in network byte order).</div><br class=""><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span></span>
</div><div class=""><br class="webkit-block-placeholder"></div>
<br class=""></body></html>