Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
target
isoparser/aac-sample.mp4
isoparser/ac3-sample.mp4
/muxer/m2.mp4
/muxer/output2.mp4
/streaming/output.mp4

.classpath
.project
.settings

2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down
76 changes: 16 additions & 60 deletions isoparser/pom.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mp4parser</groupId>
<artifactId>isoparser</artifactId>
<packaging>jar</packaging>
<name>ISO Parser</name>
<description>A generic parser and writer for all ISO 14496 based files (MP4, Quicktime, DCF, PDCF, ...)
</description>
<url>https://github.com/sannies/mp4parser</url>
<version>1.9.57-SNAPSHOT</version>

<parent>
<artifactId>mp4parser-project</artifactId>
<groupId>org.mp4parser</groupId>
<version>1.9.57-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<resources>
Expand All @@ -24,7 +19,6 @@
<filtering>true</filtering>
</resource>
</resources>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -41,7 +35,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand All @@ -62,78 +55,62 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.14.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.9.7</version>
</dependency>

</dependencies>
<configuration>
<complianceLevel>9</complianceLevel>
<source>9</source>
<target>9</target>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
<additionalCompilerArgs>
<arg>--module-path</arg>
<arg>${project.build.directory}/alternateLocation/slf4-api.jar</arg>
<arg>${project.build.directory}/alternateLocation/slf4j-api.jar</arg>
</additionalCompilerArgs>

</configuration>
</plugin>

</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.9.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.8.0-beta4</version>

</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.8.0-beta4</version>

<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>provided</scope>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
<scope>test</scope>
</dependency>
</dependencies>


<ciManagement>
<system>jenkins</system>
<url>https://sannies.ci.cloudbees.com/job/IsoParser/</url>
Expand All @@ -150,25 +127,4 @@
<system>github</system>
<url>https://github.com/sannies/mp4parser/issues</url>
</issueManagement>

<developers>
<developer>
<id>sannies</id>
<email>Sebastian.Annies@gmail.com</email>
</developer>
</developers>

<scm>
<url>https://github.com/sannies/mp4parser</url>
<tag>mp4parser-project-1.9.43</tag>
</scm>

<licenses>
<license>
<name>Apache Software License - Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

package com.coremedia.drm.packager.isoparser;

import junit.framework.TestCase;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mp4parser.IsoFile;
import org.mp4parser.support.BoxComparator;
import org.mp4parser.tools.ByteBufferByteChannel;
Expand All @@ -28,12 +29,12 @@
/**
* Tests ISO Roundtrip.
*/
public class RoundTripTest extends TestCase {
class RoundTripTest {

String defaultTestFileDir;

@Override
protected void setUp() throws Exception {
super.setUp();
@BeforeEach
void setUp() {
defaultTestFileDir = this.getClass().getProtectionDomain().getCodeSource().getLocation().getFile();
/* Logger.getLogger("").setLevel(Level.ALL);
Handler[] handlers = Logger.getLogger("").getHandlers();
Expand All @@ -42,48 +43,58 @@ protected void setUp() throws Exception {
}*/
}

/* public void testRoundDeleteMe() throws Exception {
/*
@Test
void testRoundDeleteMe() throws Exception {
testRoundTrip_1("/suckerpunch-distantplanet_h1080p.mov");
}*/
public void testRoundTrip_TinyExamples_Old() throws Exception {

@Test
void testRoundTrip_TinyExamples_Old() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/Tiny Sample - OLD.mp4");
}

public void testRoundTrip_TinyExamples_Metaxed() throws Exception {
@Test
void testRoundTrip_TinyExamples_Metaxed() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/Tiny Sample - NEW - Metaxed.mp4");
}

public void testRoundTrip_TinyExamples_Untouched() throws Exception {
@Test
void testRoundTrip_TinyExamples_Untouched() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/Tiny Sample - NEW - Untouched.mp4");
}


public void testRoundTrip_1a() throws Exception {
@Test
void testRoundTrip_1a() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/multiTrack.3gp");
}

public void testRoundTrip_1b() throws Exception {
@Test
void testRoundTrip_1b() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/MOV00006.3gp");
}

public void testRoundTrip_1c() throws Exception {
@Test
void testRoundTrip_1c() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/Beethoven - Bagatelle op.119 no.11 i.m4a");
}

public void testRoundTrip_1d() throws Exception {
@Test
void testRoundTrip_1d() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/test.m4p");
}

public void testRoundTrip_1e() throws Exception {
@Test
void testRoundTrip_1e() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/test-pod.m4a");
}

public void testRoundTrip_QuickTimeFormat() throws Exception {
@Test
void testRoundTrip_QuickTimeFormat() throws Exception {
testRoundTrip_1(defaultTestFileDir + "/QuickTimeFormat.mp4");
}


public void testRoundTrip_1(String originalFile) throws Exception {
void testRoundTrip_1(String originalFile) throws Exception {

long start1 = System.currentTimeMillis();
long start2 = System.currentTimeMillis();
Expand Down Expand Up @@ -116,9 +127,5 @@ public void testRoundTrip_1(String originalFile) throws Exception {
copyViaIsoFileReparsed.close();
// as windows cannot delete file when something is memory mapped and the garbage collector
// doesn't necessarily free the Buffers quickly enough we cannot delete the file here (we could but only for linux)


}


}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.googlecode.mp4parser.boxes;


import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mp4parser.IsoFile;
import org.mp4parser.boxes.iso23001.part7.AbstractTrackEncryptionBox;
import org.mp4parser.tools.UUIDConverter;
Expand Down Expand Up @@ -31,11 +31,11 @@ public void testRoundTrip() throws IOException {
fc.close();

IsoFile iso = new IsoFile(new FileInputStream(f).getChannel());
Assert.assertTrue(iso.getBoxes().get(0) instanceof AbstractTrackEncryptionBox);
Assertions.assertInstanceOf(AbstractTrackEncryptionBox.class, iso.getBoxes().get(0));
AbstractTrackEncryptionBox tenc2 = (AbstractTrackEncryptionBox) iso.getBoxes().get(0);
Assert.assertEquals(0, tenc2.getFlags());
Assert.assertTrue(tenc.equals(tenc2));
Assert.assertTrue(tenc2.equals(tenc));
Assertions.assertEquals(0, tenc2.getFlags());
Assertions.assertEquals(tenc, tenc2);
Assertions.assertEquals(tenc2, tenc);
iso.close();

}
Expand Down
Loading