diff options
Diffstat (limited to 'isoparser/src/main/java/com/googlecode/mp4parser/authoring/container')
6 files changed, 189 insertions, 0 deletions
diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/all-wcprops b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/all-wcprops new file mode 100644 index 0000000..a7245be --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 92 +/svn/!svn/ver/418/trunk/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container +END diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/entries b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/entries new file mode 100644 index 0000000..bde4d0e --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +778 +http://mp4parser.googlecode.com/svn/trunk/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container +http://mp4parser.googlecode.com/svn + + + +2012-03-11T20:54:45.638478Z +418 +Sebastian.Annies@gmail.com + + + + + + + + + + + + + + +7decde4b-c250-0410-a0da-51896bc88be6 + +mp4 +dir + diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/all-wcprops b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/all-wcprops new file mode 100644 index 0000000..ec2a4f9 --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 96 +/svn/!svn/ver/418/trunk/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4 +END +MovieCreator.java +K 25 +svn:wc:ra_dav:version-url +V 114 +/svn/!svn/ver/418/trunk/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/MovieCreator.java +END diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/entries b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/entries new file mode 100644 index 0000000..d7d7f30 --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +778 +http://mp4parser.googlecode.com/svn/trunk/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4 +http://mp4parser.googlecode.com/svn + + + +2012-03-11T20:54:45.638478Z +418 +Sebastian.Annies@gmail.com + + + + + + + + + + + + + + +7decde4b-c250-0410-a0da-51896bc88be6 + +MovieCreator.java +file + + + + +2012-09-14T17:27:49.987212Z +ecb22de8d79473683de67e40f494641d +2012-03-11T20:54:45.638478Z +418 +Sebastian.Annies@gmail.com + + + + + + + + + + + + + + + + + + + + + +1404 + diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/text-base/MovieCreator.java.svn-base b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/text-base/MovieCreator.java.svn-base new file mode 100644 index 0000000..ed9d15f --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/.svn/text-base/MovieCreator.java.svn-base @@ -0,0 +1,40 @@ +/* + * Copyright 2012 Sebastian Annies, Hamburg + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.googlecode.mp4parser.authoring.container.mp4; + +import com.coremedia.iso.IsoFile; +import com.coremedia.iso.boxes.TrackBox; +import com.googlecode.mp4parser.authoring.Movie; +import com.googlecode.mp4parser.authoring.Mp4TrackImpl; + +import java.io.IOException; +import java.nio.channels.ReadableByteChannel; +import java.util.List; + +/** + * Shortcut to build a movie from an MP4 file. + */ +public class MovieCreator { + public static Movie build(ReadableByteChannel channel) throws IOException { + IsoFile isoFile = new IsoFile(channel); + Movie m = new Movie(); + List<TrackBox> trackBoxes = isoFile.getMovieBox().getBoxes(TrackBox.class); + for (TrackBox trackBox : trackBoxes) { + m.addTrack(new Mp4TrackImpl(trackBox)); + } + return m; + } +} diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/MovieCreator.java b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/MovieCreator.java new file mode 100644 index 0000000..ed9d15f --- /dev/null +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/container/mp4/MovieCreator.java @@ -0,0 +1,40 @@ +/* + * Copyright 2012 Sebastian Annies, Hamburg + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.googlecode.mp4parser.authoring.container.mp4; + +import com.coremedia.iso.IsoFile; +import com.coremedia.iso.boxes.TrackBox; +import com.googlecode.mp4parser.authoring.Movie; +import com.googlecode.mp4parser.authoring.Mp4TrackImpl; + +import java.io.IOException; +import java.nio.channels.ReadableByteChannel; +import java.util.List; + +/** + * Shortcut to build a movie from an MP4 file. + */ +public class MovieCreator { + public static Movie build(ReadableByteChannel channel) throws IOException { + IsoFile isoFile = new IsoFile(channel); + Movie m = new Movie(); + List<TrackBox> trackBoxes = isoFile.getMovieBox().getBoxes(TrackBox.class); + for (TrackBox trackBox : trackBoxes) { + m.addTrack(new Mp4TrackImpl(trackBox)); + } + return m; + } +} |