Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android example use of RtpStream

Tags:

android

rtp

Since Android API 12, RTP is supported in the SDK, which includes RtpStream as the base class, and AudioStream, AudioCodec, and AudioGroup. However, there is no documentation, examples, or tutorials to help me use these specific APIs to take input from the device's microphone, and output it to an RTP stream.

Where do I specify using the mic as the source, and not to use a speaker? Does it perform any RTCP? Can I extend the RtpStream base class to create my own VideoStream class (ideally I would like to use these for video streaming too)?

Any help out there on these new(ish) APIs please?

like image 233
barkside Avatar asked Nov 15 '11 15:11

barkside


1 Answers

Unfortunately these APIs are the thinnest necessary wrapper around native code that performs the actual work. This means that they cannot be extended in java, and to extend them in C++ you would have to have a custom Android version I believe.

As far as I can see the AudioGroup cannot actually be set to not output sound.

I don't believe it does an RTCP but my use of it doesn't involve RTCP so I would not know.

My advice is that if you want to be able to extend functionality or have greater flexibility, then you should find a C or C++ native library that someone has written or ported to Android and use that instead, this should allow you to control what audio it uses and add video streaming and other such extensions.

like image 167
OmniMancer Avatar answered Sep 19 '22 12:09

OmniMancer