Skip to content

Commit

Permalink
* Add check for supported display size in the RecordActivity sampl…
Browse files Browse the repository at this point in the history
…e (pull #153)
  • Loading branch information
saudet committed May 24, 2015
1 parent 07b961c commit 2d43b87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Add check for supported display size in the `RecordActivity` sample ([pull #153](https://github.com/bytedeco/javacv/pull/153))
* Clarify the semantics of `FrameConverter` ([issue #150](https://github.com/bytedeco/javacv/issues/150))
* Fix `FFmpegFrameRecorder` not saving the last few frames, especially when encoding with x264 ([issue #50](https://github.com/bytedeco/javacv/issues/50))
* Add `FrameConverterTest` and fix a couple of bugs uncovered by it
Expand Down
10 changes: 5 additions & 5 deletions samples/RecordActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ public int compare(final Camera.Size a, final Camera.Size b) {
}
});

// Pick the first preview size that is equal or bigger, or pick the last (biggest) option if we cannot
// reach the initial settings of imageWidth/imageHeight.
// Pick the first preview size that is equal or bigger, or pick the last (biggest) option if we cannot
// reach the initial settings of imageWidth/imageHeight.
for (int i = 0; i < sizes.size(); i++) {
if ((sizes.get(i).width >= imageWidth && sizes.get(i).height >= imageHeight) || i == sizes.size() - 1) {
imageWidth = sizes.get(i).width;
Expand All @@ -496,12 +496,12 @@ public int compare(final Camera.Size a, final Camera.Size b) {
}
}
camParams.setPreviewSize(imageWidth, imageHeight);

Log.v(LOG_TAG,"Setting imageWidth: " + imageWidth + " imageHeight: " + imageHeight + " frameRate: " + frameRate);

camParams.setPreviewFrameRate(frameRate);
Log.v(LOG_TAG,"Preview Framerate: " + camParams.getPreviewFrameRate());
Log.v(LOG_TAG,"Preview Framerate: " + camParams.getPreviewFrameRate());

mCamera.setParameters(camParams);
startPreview();
}
Expand Down

0 comments on commit 2d43b87

Please sign in to comment.