Skip to content

Commit

Permalink
ffmpeg: pre-load required files in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh committed May 28, 2022
1 parent e16dd55 commit 544133f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
import java.awt.image.DataBufferByte;
import org.bytedeco.ffmpeg.avutil.AVFrame;
import org.bytedeco.javacpp.BytePointer;
import org.bytedeco.javacpp.Loader;
import org.bytedeco.javacpp.PointerPointer;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class FrameConverterTest extends LoggerChecks {
Expand All @@ -23,6 +25,12 @@ public FrameConverterTest() {
super(FrameConverter.class);
}

@BeforeClass
public void loadPresets() {
// See https://github.com/WestRidgeSystems/jmisb/issues/403
Loader.load(org.bytedeco.ffmpeg.global.swscale.class);
}

@Test
public void basicConstruct() {
FrameConverter frameConverter = new FrameConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
import javax.imageio.ImageIO;
import org.bytedeco.javacpp.Loader;
import org.jmisb.api.klv.IMisbMessage;
import org.jmisb.core.video.TimingUtils;
import org.jmisb.st0102.Classification;
Expand Down Expand Up @@ -49,6 +50,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/** Integration test for {@link VideoFileInput} and {@link VideoFileOutput} */
Expand All @@ -63,6 +65,12 @@ public class VideoFileInputOutputIT {
private final byte version0601 = 11;
private final byte version0102 = 12;

@BeforeClass
public void loadPresets() {
// See https://github.com/WestRidgeSystems/jmisb/issues/403
Loader.load(org.bytedeco.ffmpeg.global.swscale.class);
}

/** Video stream only test */
@Test
public void testSimple() {
Expand Down

0 comments on commit 544133f

Please sign in to comment.