Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to support video recording in future? #33

Closed
edisonlao opened this issue Aug 29, 2020 · 2 comments
Closed

Is it possible to support video recording in future? #33

edisonlao opened this issue Aug 29, 2020 · 2 comments

Comments

@edisonlao
Copy link

Hello, hms-ml-face is a great library.
Is it possible to support video recording function in future?
when i using MediaRecorder to record video
the MediaRecorder will take over Camera From hms-mlsdk's MLLensSelector

Thank you for produced hms-ml-face
it will be better If record function can be supported in future

@Mike-mei
Copy link
Contributor

Could you please tell us your detailed demand? Do you want to output the face detection result as a video?

@edisonlao
Copy link
Author

edisonlao commented Sep 7, 2020

Could you please tell us your detailed demand? Do you want to output the face detection result as a video?

Hello, I have implemented the recording function.
In order to perform ml-face while recording video,
I have modified the three methods of

①LensEngine.run()
run(Camera lens){
-return this.a(var2) ;
+return this.a(var2, lens);
}

②LensEngine.a()
a(SurfaceWrapper var1, Camera lens){
-this.e = this.d.selectLens(this.b, this.c);
+this.e = this.d.selectLens(this.b, this.c, lens);

-var2.setPreviewDisplay(var1.getSurfaceHolder());
-var2.setPreviewTexture(var1.getSurfaceTexture());
-var2.startPreview();
}
③MLLensSelector.selectLens()
selectLens(Context var1, LensRequest var2, Camera lens){
-var3 = Camera.open(var6);
+var3 = lens;

-var3.setParameters(var10);
}

So I can sync control Camera in somewhere else
final result:
preview on own SurfaceView or use MediaCodec to recording video when running FaceAnalyzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants