Now I have created a library to combine 2 videos using mp4parser library. And with this, I can pause and resume video recording (after he records the second video, he adds it to the first). Now my boss told me to make a wrapper and use it for phones that do not have hardware support to pause the video. For phones that have this (Samsung Galaxy S2 and Samsung Galaxy S1 can pause the video using the camera app), I need to do this without libraries, so it will be fast. How can I implement this native if, as you can see in the status diagram of the media recorder, http://developer.android.com/reference/android/media/MediaRecorder.html , there is no pause state?
I decompiled the Samsung Galaxe Ace Camera.apk application, and the code in CamcorderEngine.class has a method similar to this:
public void doPauseVideoRecordingSync() { Log.v("CamcorderEngine", "doPauseVideoRecordingSync"); if (this.mMediaRecorder == null) { Log.e("CamcorderEngine", "MediaRecorder is not initialized."); return; } if (!this.mMediaRecorderRecording) { Log.e("CamcorderEngine", "Recording is not started yet."); return; } try { this.mMediaRecorder.pause(); enableAlertSound(); return; } catch (RuntimeException localRuntimeException) { Log.e("CamcorderEngine", "Could not pause media recorder. ", localRuntimeException); enableAlertSound(); }
}
If I try this.mMediaRecorder.pause(); in my code, this will not work as possible, they use the same import (android.media.MediaRecorder). Did they rewrite all the code at the system level?
Is it possible to take the input stream of the second video (during recording) and directly add this data to my first video? for my concatenate method I use 2 parameters (2 videos, which are both FileInputStream), is it possible to take an InputStream from a recording function and pass it as a second parameter?
source share