|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.googlecode.mp4parser.authoring.builder.FragmentedMp4Builder
public class FragmentedMp4Builder
Creates a fragmented MP4 file.
Field Summary | |
---|---|
protected FragmentIntersectionFinder |
intersectionFinder
|
Constructor Summary | |
---|---|
FragmentedMp4Builder()
|
Method Summary | |
---|---|
IsoFile |
build(Movie movie)
Builds the actual IsoFile from the Movie. |
protected DataInformationBox |
createDinf(Movie movie,
Track track)
|
Box |
createFtyp(Movie movie)
|
protected Box |
createMdat(long startSample,
long endSample,
Track track,
int i)
|
protected Box |
createMdhd(Movie movie,
Track track)
|
protected Box |
createMdia(Track track,
Movie movie)
|
protected Box |
createMdiaHdlr(Track track,
Movie movie)
|
protected Box |
createMfhd(long startSample,
long endSample,
Track track,
int sequenceNumber)
|
protected Box |
createMfra(Movie movie,
IsoFile isoFile)
Creates a 'mfra' - movie fragment random access box for the given movie in the given isofile. |
protected Box |
createMinf(Track track,
Movie movie)
|
protected Box |
createMoof(long startSample,
long endSample,
Track track,
int sequenceNumber)
Creates a 'moof' box for a given sequence of samples. |
protected List<Box> |
createMoofMdat(Movie movie)
|
protected Box |
createMoov(Movie movie)
Creates a fully populated 'moov' box with all child boxes. |
protected Box |
createMvex(Movie movie)
Creates a 'mvex' - movie extends box and populates it with 'trex' boxes by calling createTrex(com.googlecode.mp4parser.authoring.Movie, com.googlecode.mp4parser.authoring.Track)
for each track to generate them |
protected Box |
createMvhd(Movie movie)
Creates a single 'mvhd' movie header box for a given movie. |
protected Box |
createStbl(Movie movie,
Track track)
|
protected Box |
createTfhd(long startSample,
long endSample,
Track track,
int sequenceNumber)
|
protected Box |
createTfra(Track track,
IsoFile isoFile)
Creates a 'tfra' - track fragment random access box for the given track with the isoFile. |
protected Box |
createTkhd(Movie movie,
Track track)
|
protected Box |
createTraf(long startSample,
long endSample,
Track track,
int sequenceNumber)
|
protected Box |
createTrak(Track track,
Movie movie)
|
protected Box |
createTrex(Movie movie,
Track track)
|
protected List<? extends Box> |
createTruns(long startSample,
long endSample,
Track track,
int sequenceNumber)
Creates one or more track run boxes for a given sequence. |
List<String> |
getAllowedHandlers()
|
protected long |
getDuration(Track track)
|
FragmentIntersectionFinder |
getFragmentIntersectionFinder()
|
protected List<ByteBuffer> |
getSamples(long startSample,
long endSample,
Track track,
int sequenceNumber)
Gets the all samples starting with startSample (one based -> one is the first) and
ending with endSample (exclusive). |
protected long[] |
getSampleSizes(long startSample,
long endSample,
Track track,
int sequenceNumber)
Gets the sizes of a sequence of samples- |
void |
setIntersectionFinder(FragmentIntersectionFinder intersectionFinder)
|
protected List<Track> |
sortTracksInSequence(List<Track> tracks,
int cycle,
Map<Track,long[]> intersectionMap)
Some formats require sorting of the fragments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FragmentIntersectionFinder intersectionFinder
Constructor Detail |
---|
public FragmentedMp4Builder()
Method Detail |
---|
public List<String> getAllowedHandlers()
public Box createFtyp(Movie movie)
protected List<Track> sortTracksInSequence(List<Track> tracks, int cycle, Map<Track,long[]> intersectionMap)
tracks
- the list of tracks to returned sortedcycle
- current fragment (sorting may vary between the fragments)intersectionMap
- a map from tracks to their fragments' first samples.
protected List<Box> createMoofMdat(Movie movie)
public IsoFile build(Movie movie)
build
in interface Mp4Builder
movie
- data source
protected Box createMdat(long startSample, long endSample, Track track, int i)
protected Box createTfhd(long startSample, long endSample, Track track, int sequenceNumber)
protected Box createMfhd(long startSample, long endSample, Track track, int sequenceNumber)
protected Box createTraf(long startSample, long endSample, Track track, int sequenceNumber)
protected List<ByteBuffer> getSamples(long startSample, long endSample, Track track, int sequenceNumber)
startSample
(one based -> one is the first) and
ending with endSample
(exclusive).
startSample
- low endpoint (inclusive) of the sample sequenceendSample
- high endpoint (exclusive) of the sample sequencetrack
- source of the samplessequenceNumber
- the fragment index of the requested list of samples
List<ByteBuffer>
of raw samplesprotected long[] getSampleSizes(long startSample, long endSample, Track track, int sequenceNumber)
startSample
- low endpoint (inclusive) of the sample sequenceendSample
- high endpoint (exclusive) of the sample sequencetrack
- source of the samplessequenceNumber
- the fragment index of the requested list of samples
protected List<? extends Box> createTruns(long startSample, long endSample, Track track, int sequenceNumber)
startSample
- low endpoint (inclusive) of the sample sequenceendSample
- high endpoint (exclusive) of the sample sequencetrack
- source of the samplessequenceNumber
- the fragment index of the requested list of samples
protected Box createMoof(long startSample, long endSample, Track track, int sequenceNumber)
startSample
- low endpoint (inclusive) of the sample sequenceendSample
- high endpoint (exclusive) of the sample sequencetrack
- source of the samplessequenceNumber
- the fragment index of the requested list of samples
protected Box createMvhd(Movie movie)
movie
- the concerned movie
protected Box createMoov(Movie movie)
movie
- the concerned movie
protected Box createTfra(Track track, IsoFile isoFile)
track
- the concerned trackisoFile
- the track is contained in
protected Box createMfra(Movie movie, IsoFile isoFile)
createTfra(com.googlecode.mp4parser.authoring.Track, com.coremedia.iso.IsoFile)
to generate the child boxes.
movie
- concerned movieisoFile
- concerned isofile
protected Box createTrex(Movie movie, Track track)
protected Box createMvex(Movie movie)
createTrex(com.googlecode.mp4parser.authoring.Movie, com.googlecode.mp4parser.authoring.Track)
for each track to generate them
movie
- the source movie
protected Box createTkhd(Movie movie, Track track)
protected Box createMdhd(Movie movie, Track track)
protected Box createStbl(Movie movie, Track track)
protected Box createMinf(Track track, Movie movie)
protected Box createMdiaHdlr(Track track, Movie movie)
protected Box createMdia(Track track, Movie movie)
protected Box createTrak(Track track, Movie movie)
protected DataInformationBox createDinf(Movie movie, Track track)
public FragmentIntersectionFinder getFragmentIntersectionFinder()
public void setIntersectionFinder(FragmentIntersectionFinder intersectionFinder)
protected long getDuration(Track track)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |