<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>After reviewing RFC 4175 (and your code), I've decided not to implement this RTP payload format in the released "LIVE555 Streaming Media" source code (at least, not right now). There are a number of issues:</div><div><br></div><div><br></div><div>1/ For the "RTPSource" subclass (for receiving RTP packets using this payload format):</div><div><br></div><div>The basic problem here is that the RTP payload format defined in RFC 4175 is very general. It allows a sender to (in principle) transmit just some lines of a frame, and even just parts of some lines of a frame. These lines (and/or parts of lines) could even be in some arbitrary order. It would be very difficult to implement a "RTPSource" subclass that handled all of this generality.</div><div><br></div><div>In practice, however, most streams that use this payload format will probably do so in a 'simple and sane' way: By including all lines of each frame, in order. It would be possible to implement a "RTPSource" subclass that properly handled the reception of only 'simple and sane' streams - and that's basically what you've done with your "UncompressedVideoRTPSource" code. Even with this, however, there's a problem: The first (valid) line number of each frame is *not* zero (see section 3 of RFC 4175), so you can't - in general - use a line number of zero to determine when a packet begins a frame. (You can do this for *your* streams, though, because your "UncompressedVideoRTPSink" implementation starts line numbers at zero. However, you could not assume this in general, for other people's streams.)</div><div><br></div><div><br></div><div>2/ For the "RTPSink" subclass (for transmitting RTP packets using this payload format):</div><div><br></div><div>As before, the RTP payload format is very flexible in what it lets you do, although you can "be conservative in what you send" when implementing your RTP sink, so that you transmit just a 'simple and sane' stream - and that's basically what you've done with your "UncompressedVideoRTPSink" code.</div><div><br></div><div>As you noted, the fact that this RTP payload format has a variable-length 'payload-specific header' (i.e., depending on how many lines are packed into the packet) is problematic. (I was probably sitting in the room in the IETF meeting(s) several years ago when this payload format document was being discussed. I wish I'd realized at the time that this was going to be a problem, otherwise I would have objected at the time.) Your solution, however, seems reasonable: Use the output packet size to figure out - in advance - how many lines are going to be packed into the packet. Note, though, that you shouldn't hardwire a packet size of '1448 bytes' into your code. Instead, you can just call "ourMaxPacketSize()", which should give you the same value.</div><div><br></div><div>One other thing that I noticed from your code, BTW, is that your "m_lineLength" member variable seems to be assigned to be a length in bits (i.e., "imgWidth * imgChannels"), but when you use it (e.g., by passing it as a parameter to your "getHeaderSize()" function), you seem to be assuming that it's a length in bytes. That looks like a bug to me...</div><br><br><div apple-content-edited="true">
<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>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>