com.googlecode.mp4parser.authoring.builder
Class DefaultMp4Builder

java.lang.Object
  extended by com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder
All Implemented Interfaces:
Mp4Builder

public class DefaultMp4Builder
extends Object
implements Mp4Builder

Creates a plain MP4 file from a video. Plain as plain can be.


Constructor Summary
DefaultMp4Builder()
           
 
Method Summary
 IsoFile build(Movie movie)
          Builds the actual IsoFile from the Movie.
protected  Box createUdta(Movie movie)
          Override to create a user data box that may contain metadata.
static long gcd(long a, long b)
           
protected static long getDuration(Track track)
           
 FragmentIntersectionFinder getFragmentIntersectionFinder()
           
 long getTimescale(Movie movie)
           
protected  List<ByteBuffer> putSamples(Track track, List<ByteBuffer> samples)
           
protected  long[] putSampleSizes(Track track, long[] sizes)
           
 void setIntersectionFinder(FragmentIntersectionFinder intersectionFinder)
           
 List<ByteBuffer> unifyAdjacentBuffers(List<ByteBuffer> samples)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMp4Builder

public DefaultMp4Builder()
Method Detail

setIntersectionFinder

public void setIntersectionFinder(FragmentIntersectionFinder intersectionFinder)

build

public IsoFile build(Movie movie)
Builds the actual IsoFile from the Movie.

Specified by:
build in interface Mp4Builder
Parameters:
movie - data source
Returns:
the freshly built IsoFile

getFragmentIntersectionFinder

public FragmentIntersectionFinder getFragmentIntersectionFinder()

putSampleSizes

protected long[] putSampleSizes(Track track,
                                long[] sizes)

putSamples

protected List<ByteBuffer> putSamples(Track track,
                                      List<ByteBuffer> samples)

createUdta

protected Box createUdta(Movie movie)
Override to create a user data box that may contain metadata.

Returns:
a 'udta' box or null if none provided

getDuration

protected static long getDuration(Track track)

getTimescale

public long getTimescale(Movie movie)

gcd

public static long gcd(long a,
                       long b)

unifyAdjacentBuffers

public List<ByteBuffer> unifyAdjacentBuffers(List<ByteBuffer> samples)


Copyright © 2012. All Rights Reserved.