<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>I am trying to modify an existing RTSP server based on live555. It streams live video without problems, and I have to add live audio sub-streams for each video streams.<br><br>As a first step, I wanted to stream an MP3 file, so I created an audio source class based on the "DeviceSource" template.</div></blockquote><div><br></div>Before you do this, you should first just add a "MP3AudioFileServerMediaSubsession" with the MP3 file - just to make sure that this (an audio subsession with data coming from a file) works OK for you.</div><div><br></div><div><br><blockquote type="cite"><div> Every time the doGetNextFrame() function is called, I read 10000 bytes from the file and update the data members of the class accordingly, and then call the static FramedSource::afterGetting() method.<br>I normally connected the output of my class to an "MPEG1or2AudioStreamFramer" by calling<br> CMySource* src = CMySource::createNew(...)<br> MPEG1or2AudioStreamFramer::createNew(envir(), src)<br><br>In the existing code, there is also a class based on OnDemandServerMediaSubsession, let's call it CMySubsession. It implements:<br> - createNewStreamSource(): which returns a MPEG1or2AudioStreamFramer* created as above<br> - createNewRTPSink(): which returns an MPEG1or2AudioRTPSink<br><br>Now, if I don't add the audio sub-session, the video plays fine with VLC. If I add the audio substream, the destination address in the "groupsock" for the video stream stays at 0.0.0.0, and thus nothing is sent. I also noticed on the VLC side that no SDP is sent and the server closes the RTSP TCP connection after about 10 seconds.<br></div></blockquote></div><br><div>That's strange. Before using VLC, I suggest using "openRTSP" as a client. That should give you a little more information about where things are going wrong.</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; font-size: medium; "><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; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>