FileDocCategorySizeDatePackage
MovieCreator.javaAPI Docmp4parser 1.0-RC-172190Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.authoring.container.mp4

MovieCreator

public class MovieCreator extends Object
Shortcut to build a movie from an MP4 file.

Fields Summary
Constructors Summary
Methods Summary
public static com.googlecode.mp4parser.authoring.Moviebuild(java.nio.channels.FileChannel channel)
Creates Movie object from a FileChannel.

param
channel input channel
return
a representation of the movie
throws
IOException in case of I/O error during IsoFile creation

        return build((ReadableByteChannel) channel);
    
public static com.googlecode.mp4parser.authoring.Moviebuild(java.nio.channels.ReadableByteChannel channel)
Creates Movie object from a ReadableByteChannel.

param
channel input channel
return
a representation of the movie
throws
IOException in case of I/O error during IsoFile creation
deprecated
use {@link MovieCreator#build(FileChannel)} for memory efficient movie representation

        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;