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

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

 



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;
}

...



----

>
> Hi Fedot,
>
> Probably not the most elegant solution but works for me. Thank you!
>
> Regards,
> Oleg
>
>
> --
> Oleg Lutsenko
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>
>
> On Wednesday, August 1, 2012 at 12:14 PM, Fedot Fedotov wrote:
>
> > Hi!
> >
> > command-line command:
> > dq
> >
> > returns to you quality info about the call. Needed info might be parsed
> from next statistic strings
> > ==============================
> >     #1 video H264, sendrecv, peer=-
> >        SRTP status: Not active Crypto-suite: (null)
> >        RX pt=99, size=1280x720, fps=22.00, last update:never
> >           total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
> >           pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0
> (0.0%)
> >                 (msec)    min     avg     max     last    dev
> >           loss period:   0.000   0.000   0.000   0.000   0.000
> >           jitter     :   0.000   0.000   0.000   0.000   0.000
> >        TX pt=99, size=1280x720, fps=5.00, last update:never
> >           total 122pkt 140.7KB (145.6KB +IP hdr) @avg=281.7Kbps/291.5Kbps
> >           pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
> >                 (msec)    min     avg     max     last    dev
> >           loss period:   0.000   0.000   0.000   0.000   0.000
> >           jitter     :   0.000   0.000   0.000   0.000   0.000
> >        RTT msec      :   0.000   0.000   0.000   0.000   0.000
> >
> > ==============================
> > where H264 - the coded which had been used.
> > RX - info about receiving video
> > TX - info about transmitting video
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120802/e31925c9/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