Sends a chunk of data which represents a frame to SDL Core.
The format of the chunk should align with MediaCodec's "Compressed Buffer" format, i.e. it should contain a single video frame, and it should start and end on frame boundaries. Please refer to https://developer.android.com/reference/android/media/MediaCodec.html Also, for H.264 codec case the stream must be in byte-stream format (also known as Annex-B format). This isn't explained in the document above, but MediaCodec does output in this format.
In short, you can just provide MediaCodec's data outputs to this method without tweaking any data.
Note: this method must not be called after SdlProxyBase.endVideoStream() is called.
public void sendFrame(byte[] data,int offset,int length,long presentationTimeUs) throws java.lang.ArrayIndexOutOfBoundsException
Sends chunks of data which represent a frame to SDL Core.
The format of the chunk should align with MediaCodec's "Compressed Buffer" format, i.e. it should contain a single video frame, and it should start and end on frame boundaries. Please refer to https://developer.android.com/reference/android/media/MediaCodec.html Also, for H.264 codec case the stream must be in byte-stream format (also known as Annex-B format). This isn't explained in the document above, but MediaCodec does output in this format.
In short, you can just provide MediaCodec's data outputs to this method without tweaking any data.
Note: this method must not be called after SdlProxyBase.endVideoStream() is called.
public void sendFrame(ByteBuffer data,long presentationTimeUs)