Identifier of currently used codec during a call? (Oleg Lutsenko)

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

 



Hi,

FYI pjsip version 2.0 has some new API: pjsua_call_get_stream_info(),
pjsua_call_get_stream_stat(), and pjsua_call_get_med_transport_info(),
which is exactly what you want.

Best regards,
 Benny

On Thu, Aug 2, 2012 at 3:35 PM, Arjun Kamath <junnaonly at gmail.com> wrote:

> Hi
>
> I had a similar requirement but for getting the active voice codec. I
> couldn't find any existing API for it hence I wrote the code below. It
> works, but I am guessing that there should be a simpler method.
>
> ...
> char* dll_get_active_codec(pjsua_call_id call_id)
> {
>     pjmedia_stream *stream;
>     pjmedia_stream_info info;
>     pj_str_t active_codec;
>
>     stream = pjsua_var.calls[call_id].media_prov[0].strm.a.stream;
>     pjmedia_stream_get_info(stream, &info);
>
>     return info.fmt.encoding_name.ptr;
> }
>
> ...
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120803/d8d6d32f/attachment-0001.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