Welthungerhilfe / ChildGrowthMonitor

Quick, accurate data on malnutrition
GNU General Public License v3.0
79 stars 16 forks source link

record video to file #20

Closed mmatiaschek closed 6 years ago

mmatiaschek commented 6 years ago

record the video from rgb camera to a file in external storage while logging pointCloudData.timestamp & .numPoints and (RecorderActivity line 354) and Pose (RecorderActivity Line 300-306)

i currently see two possibilities to record the pure video from tango api in Java:

  1. grab video data from GLSurface or Texture and feed to TextureMovieEncoder similar to grafikas CameraCapture Example https://github.com/google/grafika/blob/master/app/src/main/java/com/android/grafika/CameraCaptureActivity.java
  2. OR use the raw frame data from mTango.experimentalConnectOnFrameListener

please use one of this or document if there is a better possibility

mmatiaschek commented 6 years ago

also see https://developer.android.com/reference/android/media/MediaRecorder.html#getSurface()

mmatiaschek commented 6 years ago

maybe related to current issue with TextureMovieEncoder https://stackoverflow.com/questions/32986283/how-to-get-frame-timestamp-when-mediacodec-decoder-is-configured-with-surfacetex

https://android.googlesource.com/platform/cts/+/jb-mr2-release/tests/tests/media/src/android/media/cts/InputSurface.java#167

mmatiaschek commented 6 years ago

https://developer.android.com/reference/android/media/MediaCodec.html https://bigflake.com/mediacodec/EncodeAndMuxTest.java.txt

mmatiaschek commented 6 years ago

Timestamp from Tango appears to always be 0 - maybe this is a solution? https://stackoverflow.com/questions/32986283/how-to-get-frame-timestamp-when-mediacodec-decoder-is-configured-with-surfacetex

mmatiaschek commented 6 years ago

important information: https://stackoverflow.com/questions/36440620/android-share-a-texture-between-glsurfaceviews-in-separate-egl-contexts

solution for unity? https://assetstore.unity.com/packages/add-ons/services/everyplay-16005

mmatiaschek commented 6 years ago

is recording app activity to file