Giter VIP home page Giter VIP logo

Comments (25)

alfredh avatar alfredh commented on May 27, 2024 1

The Android NDK has changed to Unified Headers:

https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md

In r16b there now only a single set of system headers that is used for all API levels.

what needs to be done:

  • change sysroot to the new location of unified headers
  • define __ANDROID_API__=XX in CFLAGS
  • we should probably also change from gcc to clang

Alfred

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

saket424 avatar saket424 commented on May 27, 2024

Confirmed that with ndk r15c Makefile works but when ndk r16b is used, we get include file not found errors

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

@saket424 could you please try the following commands and send me the output:

make test
make selftest

(Remember to connect Android device first)

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

hi @juha-h

I have added support for NDK r16b in this branch:

https://github.com/alfredh/baresip-android/tree/android_ndk_r16b

it should now support r15 and r16

could you please test it ?

Alfred

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

Thanks for testing :)

it looks like the new sysroot in android ndk is split into 2 parts;
one for headers and one for libraries.

I made some fixes in the branch, please git pull and try again.

(commit 5e6b03e)

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

https://developer.android.com/ndk/guides/standalone_toolchain.html

# Tell configure what flags Android requires.
export CFLAGS="-fPIE -fPIC"
export LDFLAGS="-pie"

I think we should get the PIE/PIC thing working first in a separate commit,
and the NDK upgrade should be done in a separate commit.

BTW: Are you using the SPEEX codec actively? Since Jean-Marc has deprecated
it from speex.org I think we should deprecate/remove it (Everybody is using opus).

Alfred

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

please re-test with commit 9f0f1ad

I have made a couple of changes there.

as for getting it to work with r15 or r16:

  • we need to add a new target to generate the toolchain
  • we should use clang which automatically sets the ANDROID_API macro
  • we just need to split the SYSROOT into one for headers and one for libs

I am almost on top of this, just needed to start again from scratch
a couple of times.

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

hi @juha-h

could you please try now with commit 1290b36
from master branch ?

this should work with both r15 and r16

you need to override the NDK_PATH when invoking make
(or modify it in the makefile).

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

Great, thanks for testing!

You can try to do a complete clean build (remove src/static.c)

I just tested with a clean build using r16b and it works on my Android 6.0 phone:

call: connecting to 'sip:[email protected]'..
call: SIP Progress: 100 Trying (/)
call: SIP Progress: 180 Ringing (/)
audio: Set audio decoder: PCMU 8000Hz 1ch
audio: player started with sample format S16LE
audio: Set audio encoder: PCMU 8000Hz 1ch
audio: source started with sample format S16LE
audio tx pipeline:    opensles ---> vumeter ---> PCMU
audio rx pipeline:    opensles <--- vumeter <--- PCMU
[email protected]: Call established: sip:[email protected]
stream: incoming rtp for 'audio' established, receiving from 10.0.0.6:12284
sip:[email protected]: session closed: Connection reset by peer=========      ]  [==============  ]
sip:[email protected]: Call with sip:[email protected] terminated (duration: 10 secs)

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

my Android phone is:

shell@j5xnlte:/ $ getprop ro.build.version.release
6.0.1
shell@j5xnlte:/ $ getprop ro.build.version.sdk                                 
23

as a quick test, you can try to change API_LEVEL in the Makefile to the number
matching your phone, recompile everything, and do the test again to see if
it has any impact.

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

alfredh avatar alfredh commented on May 27, 2024

@juha-h could you please confirm that the original issue is solved ?
(i.e. NDK upgrade)

from baresip-android.

juha-h avatar juha-h commented on May 27, 2024

from baresip-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.