Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haogg committed Apr 9, 2015
1 parent 2df7d30 commit 88f55c2
Show file tree
Hide file tree
Showing 19 changed files with 12 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {

@Override
public void onClick(View v) {
if (mManager.recording) {

if (!mManager.recording) {
mManager.startRecording();
Log.w(LOG_TAG, "Start Button Pushed");
btnRecorderControl.setText("Stop");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public static Camera getCamera(){
}

/***In order to get a better preview:
* 1. autofocus
* 2.
* 1. focusmode
* 2. framerate
* 3. whitestablization
* 4. ....
* */
@SuppressLint("NewApi")
private static void fixParameters(Parameters mParameters2) {
Expand All @@ -70,7 +72,7 @@ private static void fixParameters(Parameters mParameters2) {
mParameters.setPreviewFormat(ImageFormat.NV21);

// set focus mode
String mode = getAutoFocusMode();
String mode = checkFocusMode();

// sansung need to handle special
if (TextUtils.isEmpty(mode)) {
Expand Down Expand Up @@ -104,7 +106,9 @@ public static Camera switchCamera(int cameraId) {
return getCamera();
}

private static String getAutoFocusMode() {
/***check the autofocus mode*/
private static String checkFocusMode() {

if (mParameters != null) {

List<String> focusModes = mParameters.getSupportedFocusModes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static RecorderManager getInstance(){


public boolean recording = false;

/** The number of seconds in the continuous record loop (or 0 to disable loop). */
final int RECORD_LENGTH = 10;
int imagesIndex, samplesIndex;
Expand All @@ -68,7 +69,7 @@ public static RecorderManager getInstance(){


public void startRecording() {

initRecorder();

try {
Expand Down

0 comments on commit 88f55c2

Please sign in to comment.