0

I would like to use cwac-cam2 to record video on a headless device. I was wondering if I could use this component to kick off video recording without a user interacting with the record button in the activity class?

Basically, using the library normally opens the VideoRecorderActivity activity which gives a user a button used to start/stop recording. What I'd like to do is to just call the function of that button directly since we do not have a screen. We interface with a user using hardware buttons that send broadcasts to the appropriate activity.

RobGries
  • 49
  • 1
  • 9

1 Answers1

0

I was wondering if I could use this component to kick off video recording without a user interacting with the record button in the activity class?

No, sorry. That's outside the scope of this library.

Moreover, I fail to see what this library gives you in your situation, and I would be stunned if the library worked on your hardware. I would expect failures with respect to the TextureView used for previews, for example.

I do not know if Android and your hardware collectively support video recording, but if it does, you will need to work with MediaRecorder directly.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks for the response, I just purchased a subscription today and I'm going through the camera chapter. When do you expect that you'll be ready to publish the bit about recording via camera2? I'd like to see if camera2 works any better with our implementation. I've tried a few things on my own with it and cannot get a good quality video out of it since the framerate always seems to be at or around 2 fps. – RobGries May 04 '16 at 15:55
  • @RobGries: "When do you expect that you'll be ready to publish the bit about recording via camera2?" -- 2017? It's not a high priority at the moment, particularly with Google I|O rolling towards me like a freight train. "since the framerate always seems to be at or around 2 fps" -- I would be somewhat surprised if the API choice makes a difference, as mostly the API is handling the camera handoff to `MediaRecorder`. "I just purchased a subscription today" -- please check your email, as I sent you a question about your purchase. – CommonsWare May 04 '16 at 15:59