On Thu, Apr 30, 2009 at 1:40 PM, Marek Peca <marek at duch.cz> wrote: > Hello, > > first many thanks for excellent PJSIP/PJSUA libraries. Now the problem: > how can I inform pjmedia get_frame() caller, that EOF occured? > > I would like to implement my own audio source pjmedia port. The source > should be active only for a short time (kind of answering message or beep), > then it should be destroyed. How can I signalize from the port, that its > playing (talking/beeping) has been done? > > I tried to set frame->size to zero, frame->type to PJMEDIA_FRAME_TYPE_NONE, > return PJ_EEOF, but nothing works, the port is called by master next time > and further on. > > The port has been pjsua_conf_connect()-ed to PJSUA incoming call. > > The EOF signaling is somewhat undefined indeed. Relationships between media components (media ports) are more like siblings rather than parent-child, hence one media port does not normally stop or destroy one another. Rather, normally it's the upper layer logic that determines when to stop. So the pattern that we use so far is for the object to emit the EOF signal to a callback (see WAV/memory player for example), which application can use to stop the media flow. HTH -benny -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090430/28a99ab9/attachment.html>