开发者

How to capture **Video and Photo** at same time in an activity

I want to take video and photo at same time.

I have two buttons.

  1. When user click on one it have to take video and

  2. Another button then it have to stop recording video and take photo.

Now I am trying recorder and camera but its not working fine ,

Also note not both in same time 开发者_JAVA百科i want to do one after another vice versa ..

What is a good idea for this?


If your recording video then, you could when the button is pressed, calculate the frame of the video that corresponds to the time the button was pressed then just pull that frame out of the video file and use that as your image. I've never done it on android, but it should be possible.

EDIT: have a look at the previewcallback() in camera:

http://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html


Don't think it's possible. Camera and recorder will not work together because they both block camera and don't allow other apps' recorders and cameras (and each other) to use camera at the same time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜