Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access own libmediaplayerservice library from libmedia_jni in Android Gingerbread

By default android Gigerbread 2.3 use PV_Player(opencore library). I found one solution just it should be patched system build.prop file, but I don't want to patch system. I want to create my own library using android media frame work which will use StageFright player. I know that libmediaplayerservice decides the player selection. Have a look at the media framework

I want to create library according to android framework -

  • libmedia_jni_own
  • libmedia_own
  • libmediaplayerservice_own

    But the problem is that libmedia doesn't directly interact with libmediaplayerservice library, it is not directly dependent with libmediaplayerservice library. So that it is unable to create stagefright player. Libmedia communicates with libmediaplayerservice library via Binder IPC mechanism. How can I patch the libmedia source library, so that it can access my libmediaplayerservice library and able to create StageFright player as well as all access of StageFright recorder etc instead of opencore library.

  • like image 586
    Suvam Roy Avatar asked May 13 '12 07:05

    Suvam Roy


    1 Answers

    I don't think you can modify how media service work w/o patching the system. As media service and its libraries are on the system partition you don't really have any way to hijack the jni load. If you are running a none-AOSP rom (like stock Samsung, HTC, etc), you won't be able to just swap out the libs as the ones from stock rom contains lots of linkage to proprietary libs.

    like image 98
    Phuong Nguyen Avatar answered Sep 28 '22 00:09

    Phuong Nguyen