1

there is a MAX_LENGTH value that we can set. that value limits the recording approximately.. sometimes it can get up to double. so lets say i set the value of MAX_LENGTH to 15 then launch the app and start recording sometimes it exceed that limitation and get to 30! that limitation mechanism is broken.. there is a way to hard limit it so it won't exceed MAX_LENGTH ever? thanks

shkschneider
  • 17,833
  • 13
  • 59
  • 112
Barina
  • 53
  • 8
  • Limiting the amount of data recorded into the buffer is tricky. Limiting the amount of data written to disk is easier. Your best bet would be to store more data than you need in the circular buffer, then only write the desired portion of it to disk when "capture" is clicked. I think you could do this by modifying `CircularEncoderBuffer#getFirstIndex()`, which returns the index of the *oldest* sync frame, to return the one that yields N seconds of video. – fadden May 31 '15 at 16:25
  • Sounds way more interesting than the other solution.. i'll try it sometime.. thanks. now i am cropping the video from the end which = more job to the device and bigger "Saving..." times – Barina Jun 01 '15 at 13:21

1 Answers1

0

First

Grafika is experimental and has no support. From the README file:

It's not stable.

It's not polished or well tested. Expect the UI to be ugly and awkward.

It's not intended as a demonstration of the proper way to do things. The code may handle edge cases poorly or not at all. Logging is often left enabled at a moderately verbose level.

It's barely documented.

It's generally just not supported.

Second

The code comment itself specifies that the FPS can be variable:

Opens a camera, and attempts to establish preview mode at the specified width and height.

Sets mCameraPreviewFps to the expected frame rate (which might actually be variable).

Source Code: https://github.com/google/grafika/blob/master/src/com/android/grafika/ContinuousCaptureActivity.java

shkschneider
  • 17,833
  • 13
  • 59
  • 112