Srt: cross-compilation for Android platform?

Created on 30 Sep 2017  路  16Comments  路  Source: Haivision/srt

Great work !
Btw,Is there a simple way to implement
cross-compilation for Android on ubuntu?

Enhancement

Most helpful comment

Hi Shakin,

I have crossed compiled this for Android. I have used Android Studio and probably will be able to create a sample program and give it to you if you are interested.

Regards,
Gurtaj

All 16 comments

We haven't prepared any environment for this case - but anyway, this project is written with portability in mind, so this shouldn't be a big problem to provide fixes for that, if needed. If you have such an environment and have some problems compiling it there, share these here and we'll see how to fix it.

Maybe we can write Android.mk, using Android NDK to compile it?
I'm not familiar with code structure, don't know how to get started.
At least,I'm afraid that relying on openssl is a headache with NDK.

Hi Shakin,

I have crossed compiled this for Android. I have used Android Studio and probably will be able to create a sample program and give it to you if you are interested.

Regards,
Gurtaj

Hi,
everybody highly interested so please issue push request with project files necessary to build the library for Android

Hi, @gurtajs4 ,
It would be a great help if you could share your work. -).
Cross compiling encountered some trouble in my development environment , It should be a personal environment package dependency problem and it doesn't make sense to other people, so I did not paste the error message here.

Hi Shakin/Alex,

The code base I have has a dependency on Android Studio and OpenSSL.

  • Android Studio Version is 2.1.2
  • Openssl for Android is build using NDK and libs, includes are added into project manually.

The Problem is that Google has updated the way user can include JNI project and compile on Android Studio and the Latest one uses the CMAKE which I dont have any port yet.

Please let me know if you can use Android Studio Ver 2.1.2, then I will go ahead and strip down my source code and push the version which will compile and demonstrate testcapi.c from apps folder.

Regards,
Gurtaj

Dear Gurtaj,
Thank you for your infomation. I have a ver2.3 of AndroidStudio, and to download version 2.1.2 should be simple and fast. So feel free this. - ) .

Hi Shakin,
Please find the project attached.
You can import the project to Android Studio 2.1.2 and build them.

SRT Code is copied into jni folder and rule to build is present in App/build.gradle

Remember

  • You need to copy *.so from appbuildintermediatesbinariesdebuglibarmeabi to appsrcmainjniLibsarmeabi folder to take the native code change effect.

Right now the app demonstrate SRT client socket example wher it binds to IP/Port in OpenSRT function file SRTClient.c and start a thread to receive the data over SRT Sockets.

You should some logs

SRTAndroid.zip

Let me know if there is further doubt.

Regards,
Gurtaj

Could you please add necessary files to SRT project and issue push request ?
This way everybody can build it without these manual steps and without coping SRT project to folders etc.

Hi Gurtaj,
Thanks for your patience,it works.
alexpokotilo,good suggestions锛嶪t would be a starting point anyway.

Thanks for your patience,it works.

Shakin,
Thanks for verifying that.

alex,
Give me sometime, I will make it generic build and issue a push request.

Regards,
Gurtaj

Hi Gurtaj,
you are the best! Thanks a lot

You may want to look at pull request #325 which makes it a bit easier to build for Android.

Hi @rolandjon, @ocrete, @alexpokotilo, @gurtajs4
Looks like we can close this issue?

@maxlovic
we can close the ticket but I don't get why you add it to v1.3.3 revision history as
there were no any push request per this ticket so it was just empty ticket.

@alexpokotilo I am adding issues to a milestone to make a subset of issues, that I've read through and scheduled to resolve before the next release.
Kinda straightforward way, but so far helps me to clean things a bit.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexpokotilo picture alexpokotilo  路  3Comments

prabh13singh picture prabh13singh  路  9Comments

moonbc picture moonbc  路  4Comments

aamirrad picture aamirrad  路  4Comments

stevomatthews picture stevomatthews  路  7Comments