samedi 31 janvier 2015

Read video bytes array in Android SurfaceView

I'm currently on a project in my engineering school which consists in broadcasting videos ( with the audio ) in Multicast to Android devices. Firstly, we succeed to read a .mp4 file on a Android device thanks to 2 MediaExtractor, 2 MediaCodec , a SurfaceView and a AudioTrack. And it works pretty well.


Secondly , we want to send a .mp4 from a Computer to this Android device. For this, we use Xuggle on the PC, and we send the audio and the video bytes arrays through 2 separate ports ( with UDP ). We achieve to read the audio thanks to a AudioTrack ( with the write() method ) on the Android device. But, how can we read the bytes sent for the video? Do you have any ideas ? Can we use a BitmapFactory and after send it to the SurfaceView ?


Aucun commentaire:

Enregistrer un commentaire