4

I need to implement a video DASH client for Android.

At this time I haven't find any solution except write the InputStream in a temp file and then read the file. Of course this solution is not efficient at all. I thought to use an OutputStream to use its FileDescriptor as the data source. But I'm not able to use a valid FileDescriptor without creating an existing file...

Because of the DASH protocol, the client has the charge of getting all the (little) segments, so I really need to find a way to read the media directly from the memory. Maybe the only solution is to use the JNI but I don't really know how.

To resume I'm open to every suggestions. The only constraints are :

  • At first I have an InputStream
  • Here it can be any intermediate operations but the more efficient as possible
  • Get a valid input to feed a MediaPlayer

That seems pretty basic but I can't found any way to achieve that. Thanks.

FabiF
  • 2,796
  • 2
  • 18
  • 27
  • Did you find a solution? I have this same problem I tried to solve it using PipedInputStream and PipedOutputStream, but they don't have a FileDescriptor to get and use on the MediaPlayer.setDataSource method. I also tried to create an URI form the PipedInputStream, but no sucess yet. – Derzu Feb 02 '13 at 19:59
  • @Derzu Actually I spent a lot of time on this and finally i gave up... But let me known if you find a solution please. – FabiF Feb 05 '13 at 11:01
  • I found a solution, but I'm still developing on it. Is to create a HTTP local server where the video data source is from an input stream. So the MediaPlayer reads from an http uri. Se this post: http://stackoverflow.com/questions/9257364/modifying-fileinputstream-for-mediaplayer-setdatasource/9428462 – Derzu Feb 05 '13 at 19:10
  • 1
    Hey Derzu Have you got any success I am working on same problem I think we can solve it by working together. – Ashwin N Bhanushali Apr 05 '13 at 07:00

1 Answers1

0

Derzu is correct that a local proxy can do this. See my answer here. Feel free to ask any questions.

Community
  • 1
  • 1
Dave
  • 4,282
  • 2
  • 19
  • 24