public class FragmentedMp4Builder extends Object implements Mp4Builder
| Modifier and Type | Field and Description |
|---|---|
protected Fragmenter |
fragmenter |
| 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 ParsableBox |
createEdts(Track track,
Movie movie) |
protected int |
createFragment(List<Box> moofsMdats,
Track track,
long startSample,
long endSample,
int sequence) |
ParsableBox |
createFtyp(Movie movie) |
protected Box |
createMdat(long startSample,
long endSample,
Track track,
int i) |
protected ParsableBox |
createMdhd(Movie movie,
Track track) |
protected ParsableBox |
createMdia(Track track,
Movie movie) |
protected ParsableBox |
createMdiaHdlr(Track track,
Movie movie) |
protected void |
createMfhd(long startSample,
long endSample,
Track track,
int sequenceNumber,
MovieFragmentBox parent) |
protected ParsableBox |
createMfra(Movie movie,
Container isoFile)
Creates a 'mfra' - movie fragment random access box for the given movie in the given
isofile.
|
protected ParsableBox |
createMinf(Track track,
Movie movie) |
protected ParsableBox |
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 ParsableBox |
createMoov(Movie movie)
Creates a fully populated 'moov' box with all child boxes.
|
protected ParsableBox |
createMvex(Movie movie)
Creates a 'mvex' - movie extends box and populates it with 'trex' boxes
by calling
createTrex(Movie, Track)
for each track to generate them |
protected ParsableBox |
createMvhd(Movie movie)
Creates a single 'mvhd' movie header box for a given movie.
|
protected void |
createSaio(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent,
MovieFragmentBox moof) |
protected void |
createSaiz(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent) |
protected void |
createSenc(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent) |
protected ParsableBox |
createStbl(Movie movie,
Track track) |
protected void |
createStsd(Track track,
SampleTableBox stbl) |
protected void |
createTfdt(long startSample,
Track track,
TrackFragmentBox parent) |
protected void |
createTfhd(long startSample,
long endSample,
Track track,
int sequenceNumber,
TrackFragmentBox parent) |
protected Box |
createTfra(Track track,
Container isoFile)
Creates a 'tfra' - track fragment random access box for the given track with the isoFile.
|
protected ParsableBox |
createTkhd(Movie movie,
Track track) |
protected void |
createTraf(long startSample,
long endSample,
Track track,
int sequenceNumber,
MovieFragmentBox parent) |
protected ParsableBox |
createTrak(Track track,
Movie movie) |
protected ParsableBox |
createTrex(Movie movie,
Track track) |
protected void |
createTrun(long startSample,
long endSample,
Track track,
int sequenceNumber,
TrackFragmentBox parent)
Creates one or more track run boxes for a given sequence.
|
Date |
getDate() |
Fragmenter |
getFragmenter() |
protected List<Sample> |
getSamples(long startSample,
long endSample,
Track track)
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 |
setFragmenter(Fragmenter fragmenter) |
protected Fragmenter fragmenter
public Date getDate()
public ParsableBox createFtyp(Movie movie)
protected int createFragment(List<Box> moofsMdats, Track track, long startSample, long endSample, int sequence)
public Container build(Movie movie)
build in interface Mp4Buildermovie - data sourceprotected void createTfhd(long startSample,
long endSample,
Track track,
int sequenceNumber,
TrackFragmentBox parent)
protected void createMfhd(long startSample,
long endSample,
Track track,
int sequenceNumber,
MovieFragmentBox parent)
protected void createTraf(long startSample,
long endSample,
Track track,
int sequenceNumber,
MovieFragmentBox parent)
protected void createSenc(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent)
protected void createSaio(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent,
MovieFragmentBox moof)
protected void createSaiz(long startSample,
long endSample,
CencEncryptedTrack track,
int sequenceNumber,
TrackFragmentBox parent)
protected List<Sample> getSamples(long startSample, long endSample, Track track)
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 samplesList<Sample> 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 void createTfdt(long startSample,
Track track,
TrackFragmentBox parent)
protected void createTrun(long startSample,
long endSample,
Track track,
int sequenceNumber,
TrackFragmentBox parent)
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 samplesparent - the created box must be added to this boxprotected ParsableBox 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 ParsableBox createMvhd(Movie movie)
movie - the concerned movieprotected ParsableBox createMoov(Movie movie)
movie - the concerned movieprotected Box createTfra(Track track, Container isoFile)
track - the concerned trackisoFile - the track is contained inprotected ParsableBox createMfra(Movie movie, Container isoFile)
createTfra(Track, Container)
to generate the child boxes.movie - concerned movieisoFile - concerned isofileprotected ParsableBox createTrex(Movie movie, Track track)
protected ParsableBox createMvex(Movie movie)
createTrex(Movie, Track)
for each track to generate themmovie - the source movieprotected ParsableBox createTkhd(Movie movie, Track track)
protected ParsableBox createMdhd(Movie movie, Track track)
protected ParsableBox createStbl(Movie movie, Track track)
protected void createStsd(Track track, SampleTableBox stbl)
protected ParsableBox createMinf(Track track, Movie movie)
protected ParsableBox createMdiaHdlr(Track track, Movie movie)
protected ParsableBox createMdia(Track track, Movie movie)
protected ParsableBox createTrak(Track track, Movie movie)
protected ParsableBox createEdts(Track track, Movie movie)
protected DataInformationBox createDinf(Movie movie, Track track)
public Fragmenter getFragmenter()
public void setFragmenter(Fragmenter fragmenter)
Copyright © 2019. All rights reserved.