pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.57k stars 776 forks source link

Question on migrating to latest version #1636

Open TroyTheGod opened 2 weeks ago

TroyTheGod commented 2 weeks ago

HI, i have a project that use this labrary a few years ago, and now i decide to update my code to the latest version of this library. on the old days i use RtmpCamera2 with OpenGLView to add filter to the video, but now from the sample(rotation activity) i see that i can use surfaceView with GenericStream and doing the same thing, so i am considering to make a change.

but before doing that i have a few question, i see there is Camera2Source in class GenericStream, and i want to access the Camera2ApiManager of class Camera2Source since i want to addImageListener for processing the frames with TFLite, should i create my own "GenericStream" and expose the Camera2ApiManager out for adding image listener? sorry if i was missing something.

there is another question regarding the Fps, i want to record video at 60Fps. there is a getSupportedFps() function in Camera2ApiManager, only a few devices report that are supporting 60FPS from this function, but if i hard coded 60fps on builderInputSurface.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, 60), some of the devices that repord not support can still filming at 60fps, and some of them are not, i am wondering is there any ways that i can check 60fps support more accurately.

finally sorry for those dumb question, and Thank you.