public class MXFFactory extends Object
Factory for reading and creating MXF files.
To read an MXF file, start by calling readPartitions(String) and use
the MXFFile returned to access the data in the file.
The ability to dump a description of what an MXF file contains is provided
by the dumpFile(String) static method. Alternatively, run this class as a
Java application.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
logging |
| Constructor and Description |
|---|
MXFFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dumpFile(String mxfFileName)
Create a textual dump of some of the information in the MXF file specified by file name.
|
static MXFFile |
emptyFile()
Create an empty MXF file that is to be built up from scratch.
|
static void |
main(String[] args)
Dump a description of the contents of the MXF file with the given filename to the system out
stream.
|
static DeltaEntry |
makeDeltaEntry(byte posTableIndex,
byte slice,
int elementDelta)
Create a new delta entry for an index
table segment using fully specified component values.
|
static DeltaEntry |
makeDeltaEntry(int elementDelta)
Create a new delta entry for an index
table segment using the element delta and default values.
|
static MXFFile |
readPartitions(String fileName)
Read and return access to an MXF file with the given file name, building the partition tables
in the process.
|
public static final boolean logging
public static final MXFFile readPartitions(String fileName) throws NullPointerException
Read and return access to an MXF file with the given file name, building the partition tables in the process. If an error occurs when reading the file, access to the file is still returned for reasons of application-specific diagnosis.
fileName - Name of an MXF file to read.NullPointerException - Cannot open an MXF file using a null file name.public static final String dumpFile(String mxfFileName) throws NullPointerException, IOException
Create a textual dump of some of the information in the MXF file specified by file name. The dump includes:
mxfFileName - Name of the MXF file to produce dump information for.NullPointerException - Cannot dump an MXF file from a null file name.IOException - Could not open the referenced MXF file for reading.public static final MXFFile emptyFile()
Create an empty MXF file that is to be built up from scratch. The file is not
open at this point and must be opened using MXFFile.open(String, boolean)
before writing any data.
MXFFile.open(String, boolean)public static final DeltaEntry makeDeltaEntry(byte posTableIndex, byte slice, int elementDelta) throws IllegalArgumentException
Create a new delta entry for an index table segment using fully specified component values.
posTableIndex - If and how the element is subject to temporal reordering. See
DeltaEntry.setPosTableIndex(byte).slice - Slice number for the slice containing this delta entry.elementDelta - Offset measured in bytes from the start of the start of the indexed
element described by this delta entry and the start of the current slice.IllegalArgumentException - One or more of the given values is out of range.IndexTableSegment.setDeltaEntryArray(DeltaEntry[])public static final DeltaEntry makeDeltaEntry(int elementDelta) throws IllegalArgumentException
Create a new delta entry for an index table segment using the element delta and default values.
elementDelta - Offset measured in bytes from the start of the start of the indexed
element described by this delta entry and the start of the current slice.IllegalArgumentException - The value of an element delta offset cannot be negative.IndexTableSegment.setDeltaEntryArray(DeltaEntry[]),
IndexTableSegment.setDeltaEntries(int[])public static final void main(String[] args) throws Exception
Dump a description of the contents of the MXF file with the given filename to the system out
stream. The output is as described for dumpFile(String).
args - Name of the MXF file to dump.Exception - Exception thrown during the dump process.dumpFile(String)(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.