1

If app A in Android uses camera, can I create an app B that applies custom filter to app A so that app A gets the video stream from app B as if the stream is from the camera directly? In other words, I want to pipe the camera input.

Camera ========================================> app A uses camera

         app B does something in the middle

If this is possible, can someone point me to the right library for doing it?

===========================================================

@CommonsWare mentioned that I should create a ROM. Does anyone know which part of the android kernel should I look into?

Assuming I will start from CyanogenMod https://github.com/CyanogenMod

Pu Shi
  • 31
  • 3

1 Answers1

0

You cannot create an app that pretends to be a source of camera images, such that other apps using the camera APIs wind up using your app as the camera image source. You can create a custom ROM that does what you want, at least in theory.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks! Are you familiar with android kernel? If I want to start from CyanogenMod, do you know which part should I look into? https://github.com/CyanogenMod – Pu Shi Mar 03 '17 at 19:19
  • @PuShi: I have no idea, sorry. – CommonsWare Mar 03 '17 at 19:27
  • OK. I think here is the place. https://github.com/android/platform_frameworks_base/tree/master/core/java/android/hardware/camera2 – Pu Shi Mar 03 '17 at 19:42