[Top][All Lists]

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

[Linphone-developers] A question about the configuration of mediacodec

From: 马兆良
Subject: [Linphone-developers] A question about the configuration of mediacodec
Date: Fri, 26 Jan 2018 23:13:12 +0800 (CST)

Hi Linphone dev group.

I need your help with a question about the configuration of mediacodec.

I want to turn on the option of Intra refresh (IR) of the H264 encoder in 
mediacodec. The device I tested is supporting this technique.
The last sentence in the following code is  what I later added in the file of 
mediacodech264enc.c. The purpose is to use IR, however, analyzing the results 
of the code stream shows that IR is not used.
Anyone who knows how to configure it to use this technology?
        AMediaFormat_setString(format, "mime", "video/avc");
        AMediaFormat_setInt32(format, "width", d->vconf.vsize.width);
        AMediaFormat_setInt32(format, "height", d->vconf.vsize.height);
        AMediaFormat_setInt32(format, "i-frame-interval", 20);
        AMediaFormat_setInt32(format, "bitrate", (d->vconf.required_bitrate * 
9)/10); /*take a margin*/
        AMediaFormat_setInt32(format, "frame-rate", d->vconf.fps);
        AMediaFormat_setInt32(format, "bitrate-mode", 1);
        AMediaFormat_setInt32(format, "profile", 1); // AVCProfileBaseline
        AMediaFormat_setInt32(format, "level", 1024); // AVCLevel32
        AMediaFormat_setInt32(format, "intra-refresh-period", 10);// 0118

In the meantime, Google's official document describes parameter 
i-frame-interval like this: "This key is used by video encoders. A negative 
value means no key frames are requested after the first frame. A zero value 
means a stream containing all key frames is requested.".
But when I set the value of i-frame-interval to 0, the bitstream is not all I 
frame, Could you suggest a fix on that one? Or something I could try to fix it? 
Thank you!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]