![]() ![]() The buffer-to-buffer method uses calls to dequeueInputBuffer and ( (int, int, int, long, int)) to feed the encoder with raw data. There are actually two ways to use the MediaCodec API: with buffers or with a surface. The MediaCodec API do not present the limitations I just mentionned, but has its own issues. It does work well on many devices though. It's hard to tell how well this hack is going to work on a phone. libstreaming tries to compensate that jitter. The MediaRecorder internal buffers can lead to some important jitter.More details in the file MediaStream.java! ( Thanks to those guys for the insight) But using a ParcelFileDescriptor does the trick. The trick is to configure a MediaRecorder instance to write to a LocalSocket instead of a regular file (see MediaStream.java).Įdit: as of Android Lollipop using a LocalSocket is not possible anymore for security reasons. The MediaRecorder API was not intended for streaming applications but can be used to retrieve encoded data from the peripherals of the phone. With the MediaCodec API and the surface-to-buffer method which requires Android 4.3.With the MediaCodec API and the buffer-to-buffer method which requires Android 4.1.With the MediaRecorder API and a simple hack. ![]() There are three ways on Android to get encoded data from the peripherals: The full javadoc documentation of the API is available here: How does it work? You should really read this, it's important! Or you use libstreaming without using the RTSP protocol at all, and signal the session using SDP over a protocol you like.This use case is illustated in the example 1. With the RTSP server: in that case the phone will act as a RTSP server and wait for a RTSP client to request a stream.With the RTSP client: if you want to stream to a Wowza Media Server, it's the way to go.You have three ways to do that with libstreaming. During this step you will contact the receiver and send a description of the incomming streams. The first step you will need to achieve to start a streaming session to some peer is called 'signaling'. Supported encoders include H.264, H.263, AAC and AMR. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |