androidmedia encoder problems

Sebastian Dröge sebastian at centricular.com
Sun Jan 19 01:05:26 PST 2014


On Sa, 2014-01-18 at 23:55 +0100, stic at free.fr wrote:
> Hi all,
> 
> I'm still trying to use androidmedia encoder provided here by cee1: https://bugzilla.gnome.org/show_bug.cgi?id=705129
> I try h264 video encoder. One of the problem I have with the encoder is the following:
> it seems codec config data (sps pps) are sent only 1 time when the stream begins to send data ... so if a client tries to connect to the pipeline server later (not at the stream startup) then it doesn't have received such information and can't display anything.
> 
> I also tried to use h264parse interval-config=xxx to resend config at xxx interval but it does not work -> message saying: no SPS/PPS yet, will be dropped

That would either indicate a bug in h264parse, or there really was no
SPS/PPS yet... but then decoding would fail in general.

> There is probably a way to ask the encoder the resend config when needed, but how can this be done ?

Check
https://developer.android.com/reference/android/media/MediaCodec.html#PARAMETER_KEY_REQUEST_SYNC_FRAME
and
https://developer.android.com/reference/android/media/MediaCodec.html#setParameters%28android.os.Bundle%29

This would need to be called when a keyframe is requested for the
current frame, which is GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME and
can be checked with GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME(frame).

See some other encoders for the implementation.


However the API of MediaCodec and what exactly it expects as input and
what it outputs seems rather undefined to me. I'm not sure if it will be
simple to get something that works in general on all devices.

I hope to find some time to look at this patch myself in the near
future...

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140119/53a8d512/attachment.pgp>


More information about the gstreamer-android mailing list