I'm using SimpleRTPSink to send audio to a client. Works great. I have it setup like this:
SimpleRTPSink* sink = SimpleRTPSink::createNew(this->envir(), rtpGroupsock, payloadFormatCode, fSamplingFrequency, "audio", mimeType, fNumChannels); ..... RTCPInstance::createNew(this->envir(), _rtcpSock, estimatedSessionBandwidth, CNAME, sink, NULL /* we're a server */, False); ..... AudioInputDevice *audioSource = AudioInputDevice::createNew(this->envir(), 0, bitsPerSample, numChannels, samplingFrequency); FramedSource* swappedSource = EndianSwap16::createNew(this->envir(), audioSource); Boolean started = sink->startPlaying(*swappedSource, nullptr, sink); I'm using the RTPSink/Source so I can implement two-way audio (full duplex). What I'd like to do is properly shut things down when one or both ends of the two-way audio disconnects or decides to not longer participate in the call. What is the best way to do this using the Live555 libraries? I know to actually STOP playing I just do sink->stopPlaying(); but I need to know when to call this. I'm still pretty green when it comes to RTP/RTCP, so I'm not sure if this is something supported, or if I'm going to need to implement my own communication channel (my own socket connection just for control). I'm assuming that's what RTCPInstance affords me, though. RTCPInstance::createNew(this->envir(), _rtcpSock, estimatedSessionBandwidth, CNAME, sink, NULL /* we're a server */, False); I see I have the ability to call sendBYE() via the RTCPInstance. Do I do this from the client to initiate a shutdown with the sender? Thanks in advance.
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel