Skip to content

Commit

Permalink
* Upgrade dependencies for FFmpeg 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Feb 20, 2016
1 parent 526c872 commit 28065a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Clean up `IPCameraFrameGrabber` ([pull #323](https://github.com/bytedeco/javacv/pull/323)
* Fix swallowed `InterruptedException` and throw appropriate exception in `FrameGrabber.start()` ([issue #315](https://github.com/bytedeco/javacv/issues/315))
* Fix `IPCameraFrameGrabber.stop()` not checking for null ([pull #300](https://github.com/bytedeco/javacv/pull/300)
* Upgrade dependencies for OpenCV 3.1.0, FFmpeg 2.8.5, libdc1394 2.2.4
* Upgrade dependencies for OpenCV 3.1.0, FFmpeg 3.0, libdc1394 2.2.4
* Let users call `FFmpegFrameFilter.push(null)` to indicate EOF, as required by some filters like "palettegen" ([issue #287](https://github.com/bytedeco/javacv/issues/287))
* Call `cvHaarDetectObjects()` with `CV_HAAR_FIND_BIGGEST_OBJECT | CV_HAAR_DO_ROUGH_SEARCH` instead of `CV_HAAR_DO_CANNY_PRUNING` in the face detection samples to get acceptable performance with OpenCV 3.0 ([issue #272](https://github.com/bytedeco/javacv/issues/272))
* Change `WakeLock` for `keepScreenOn` in `AndroidManifest.xml` file and add `setPreviewDisplay()` call on `surfaceChanged()` event for the `RecordActivity` sample ([pull #269](https://github.com/bytedeco/javacv/pull/269), [pull #271](https://github.com/bytedeco/javacv/pull/271))
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>ffmpeg</artifactId>
<version>2.8.5-${javacpp.version}</version>
<version>3.0-${javacpp.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void releaseUnsafe() throws Exception {
}

@Override public int getVideoBitrate() {
return video_c == null ? super.getVideoBitrate() : video_c.bit_rate();
return video_c == null ? super.getVideoBitrate() : (int)video_c.bit_rate();
}

@Override public double getAspectRatio() {
Expand Down Expand Up @@ -286,7 +286,7 @@ void releaseUnsafe() throws Exception {
}

@Override public int getAudioBitrate() {
return audio_c == null ? super.getAudioBitrate() : audio_c.bit_rate();
return audio_c == null ? super.getAudioBitrate() : (int)audio_c.bit_rate();
}

@Override public int getSampleFormat() {
Expand Down Expand Up @@ -576,8 +576,7 @@ private void processImage() throws Exception {
case GRAY:
// Deinterlace Picture
if (deinterlace) {
AVPicture p = new AVPicture(picture);
avpicture_deinterlace(p, p, video_c.pix_fmt(), video_c.width(), video_c.height());
throw new Exception("Cannot deinterlace: Functionality moved to FFmpegFrameFilter.");
}

// Convert the image into BGR or GRAY format that OpenCV uses
Expand Down

0 comments on commit 28065a0

Please sign in to comment.