public class FragmentedMp4Builder extends Object implements Mp4Builder
Modifier and Type | Field and Description |
---|---|
protected FragmentIntersectionFinder |
intersectionFinder |
Constructor and Description |
---|
FragmentedMp4Builder() |
Modifier and Type | Method and Description |
---|---|
Container |
build(Movie movie)
Builds the actual IsoFile from the Movie.
|
protected DataInformationBox |
createDinf(Movie movie,
Track track) |
protected Box |
createEdts(Track track,
Movie movie) |
protected int |
createFragment(List<Box> moofsMdats,
Track track,
long[] startSamples,
int cycle,
int sequence) |
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,
Container 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 |
createPdin(Movie movie)
Progressive Download Box required as per iso2 brand
|
protected Box |
createStbl(Movie movie,
Track track) |
protected void |
createStsd(Track track,
SampleTableBox stbl) |
protected TrackFragmentBaseMediaDecodeTimeBox |
createTfdt(long startSample,
Track track) |
protected Box |
createTfhd(long startSample,
long endSample,
Track track,
int sequenceNumber) |
protected Box |
createTfra(Track track,
Container 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 TrackRunBox |
createTrun(long startSample,
long endSample,
Track track,
int sequenceNumber)
Creates one or more track run boxes for a given sequence.
|
List<String> |
getAllowedHandlers() |
Date |
getDate() |
FragmentIntersectionFinder |
getFragmentIntersectionFinder() |
protected List<Sample> |
getSamples(long startSample,
long endSample,
Track track,
int sequenceNumber)
Gets 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)
Sorts fragments by start time.
|
protected FragmentIntersectionFinder intersectionFinder
public Date getDate()
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 Box createPdin(Movie movie)
protected int createFragment(List<Box> moofsMdats, Track track, long[] startSamples, int cycle, int sequence)
public Container build(Movie movie)
build
in interface Mp4Builder
movie
- data sourceprotected 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<Sample> 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 samplesList<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 samplesprotected TrackFragmentBaseMediaDecodeTimeBox createTfdt(long startSample, Track track)
protected TrackRunBox createTrun(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 samplesprotected 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 samplesprotected Box createMvhd(Movie movie)
movie
- the concerned movieprotected Box createMoov(Movie movie)
movie
- the concerned movieprotected Box createTfra(Track track, Container isoFile)
track
- the concerned trackisoFile
- the track is contained inprotected Box createMfra(Movie movie, Container isoFile)
createTfra(com.googlecode.mp4parser.authoring.Track, Container)
to generate the child boxes.movie
- concerned movieisoFile
- concerned isofileprotected Box createMvex(Movie movie)
createTrex(com.googlecode.mp4parser.authoring.Movie, com.googlecode.mp4parser.authoring.Track)
for each track to generate themmovie
- the source movieprotected void createStsd(Track track, SampleTableBox stbl)
protected DataInformationBox createDinf(Movie movie, Track track)
public FragmentIntersectionFinder getFragmentIntersectionFinder()
public void setIntersectionFinder(FragmentIntersectionFinder intersectionFinder)
Copyright © 2014. All rights reserved.