• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Modding MediaPlayer Encrypted Stream

Hello everyone, I'm new here!

I'm writing an application for personal use which streams data from my own server, where i would like to keep some encrypted media files, e.g. by a simple xor password, and let the app decrypt the data while remotely streamed.
I figured out the quickest way to achieve this would be to mod an existing player with remote stream capability, as to decrypt the received data before sending it to playback.
Now, Since i'm quite a newbie I'd like to ask you which would be my best choice here:
do you think it's possible to access and change the code of a class in the sdk like MediaPlayer or it would be best to find a good third party embeddable media player, add it to my app and mod that one? If so, do you know a good one to work with?

Thanks in advance
 
Hi. Welcome to Android Forums.
Wouldn't it be easier for your code to receive the encrypted data stream, decrypt it, then send it to the MediaPlayer?
 
Hi, thank you for your quick answer.
Provided one can find the right spot in the code of a media player, the job would be done just by adding a few lines there, that's why i thought this would be the easyest way, at least for me, with experience in programming but not android.
Could you provide some keywords so that I can do further research?
Maybe some class that handles download streams and how to feed MediaPlayer with a local stream?
Thank you very much!
 
So you are suggesting to start a download process in background which saves decrypted data to a local file and start MediaPlayer in the meantime using that file as source. Are you sure it is possible to play from the same file which is being written to by the process?
 
No. You would download the file, decrypt it, then start the MediaPlayer.
 
Then that's no good, I need to preserve the real time streaming.
Maybe if I'm able to pause/resume the buffering of the MediaPlayer (not the video playback), I might be able to alternate the download process and the video buffering in a non overlapping fashion.
Or I could just pause/resume the download process, hoping the MediaPlayer doesen't crash while the file is locked.
I'll do some tests
 
Back
Top Bottom