Skip to content

Commit

Permalink
test of sequential setVideoFrameNumber (issue bytedeco#1697)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherche committed Jul 29, 2022
1 parent 587bc88 commit 716eed3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions platform/src/test/java/org/bytedeco/javacv/FrameGrabberTest.java
Expand Up @@ -431,6 +431,16 @@ public void testFFmpegFrameGrabberSeeking() throws IOException {
System.out.println("delta from " + mindelta + " to " + maxdelta);
System.out.println();
}
if (seektestnum==0) {
System.out.println();
System.out.println("======== Check sequential setVideoFrameNumber (issue #1697) ========");
for (int i = 0; i < 10; i++) {
grabber.setVideoFrameNumber(i);
long timestamp = grabber.grabImage().timestamp;
System.out.println("frame number:" + i + " timestamp:" + timestamp);
assertTrue(i == Math.round(timestamp * grabber.getFrameRate() / 1000000L));
}
}
if (seektestnum==2) {

long count1 = 0;
Expand Down

0 comments on commit 716eed3

Please sign in to comment.