How to signalize EOF from PJMEDIA source port (get_frame())?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux