summaryrefslogtreecommitdiffstats
path: root/isoparser
diff options
context:
space:
mode:
Diffstat (limited to 'isoparser')
-rw-r--r--isoparser/src/main/java/com/googlecode/mp4parser/authoring/Mp4TrackImpl.java1
-rw-r--r--isoparser/src/main/java/com/googlecode/mp4parser/authoring/TrackMetaData.java9
-rw-r--r--isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/DefaultMp4Builder.java1
3 files changed, 11 insertions, 0 deletions
diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/Mp4TrackImpl.java b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/Mp4TrackImpl.java
index 3bff1a5..7e4dbe1 100644
--- a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/Mp4TrackImpl.java
+++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/Mp4TrackImpl.java
@@ -167,6 +167,7 @@ public class Mp4TrackImpl extends AbstractTrack {
trackMetaData.setHeight(tkhd.getHeight());
trackMetaData.setWidth(tkhd.getWidth());
trackMetaData.setLayer(tkhd.getLayer());
+ trackMetaData.setMatrix(tkhd.getMatrix());
}
public List<ByteBuffer> getSamples() {
diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/TrackMetaData.java b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/TrackMetaData.java
index c262309..4454ba5 100644
--- a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/TrackMetaData.java
+++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/TrackMetaData.java
@@ -30,6 +30,7 @@ public class TrackMetaData implements Cloneable {
private float volume;
private long trackId = 1; // zero is not allowed
private int group = 0;
+ private long[] matrix = new long[]{0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000};
/**
@@ -79,6 +80,14 @@ public class TrackMetaData implements Cloneable {
this.width = width;
}
+ public long[] getMatrix() {
+ return matrix;
+ }
+
+ public void setMatrix(long[] m) {
+ this.matrix = m;
+ }
+
public double getHeight() {
return height;
}
diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/DefaultMp4Builder.java b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/DefaultMp4Builder.java
index 9bd1ca6..7c20a39 100644
--- a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/DefaultMp4Builder.java
+++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/DefaultMp4Builder.java
@@ -226,6 +226,7 @@ public class DefaultMp4Builder implements Mp4Builder {
tkhd.setModificationTime(DateHelper.convert(new Date()));
tkhd.setTrackId(track.getTrackMetaData().getTrackId());
tkhd.setVolume(track.getTrackMetaData().getVolume());
+ tkhd.setMatrix(track.getTrackMetaData().getMatrix());
if (tkhd.getCreationTime() >= 1l << 32 ||
tkhd.getModificationTime() >= 1l << 32 ||
tkhd.getDuration() >= 1l << 32) {