更改 android 中的 MediaRecorder 源

发布于 2025-01-07 05:02:42 字数 209 浏览 2 评论 0原文

是否可以更改 android MediaRecorder 的源?

我想用视频流或文件而不是相机源进行录制,

我发现最有可能的方法是“MediaRecorder.setVideoSource”,

但它只有两个选择:DEFAULTCAMERA

有人可以帮我吗?

Is it possible to change the source for android MediaRecorder?

I would like to record with a video stream or file instead of camera source,

the most likely method I found is 'MediaRecorder.setVideoSource',

but it has only two choices: DEFAULT and CAMERA

Could someone give me a hand?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吻安 2025-01-14 05:02:42

您可以扩展 MediaRecorder,或者基于原始类创建一个新类,因为它的代码可以在 此处。然而,它只是执行实际工作的本机库的包装器,因此如果您想以这种方式修改功能,您可能需要构建自己的 Android 服装版本。

You can extend the MediaRecorder, or create a new class, based on the original, as its code may be seen here. Yet it is just a wrapper for the native library that does the actual work, so if you want to modify the functionality in such a way you might need to build your own costume version of Android.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文