#include <mxflib/mxflib.h>
#include <stdio.h>
#include <iostream>
#include <stdarg.h>
Classes | |
struct | BodyWrapping |
Typedefs | |
typedef std::list< BodyWrapping > | BodyWrappingList |
typedef SmartPtr< EssenceTrackInfo > | EssenceTrackInfoPtr |
Smart pointer to an EssenceTrackInfo. | |
typedef std::list< EssenceTrackInfoPtr > | EssenceTrackInfoList |
List of Smart pointers to EssenceTrackInfo objects. | |
Functions | |
void | warning (const char *Fmt,...) |
Display a warning message. | |
void | error (const char *Fmt,...) |
Display an error message. | |
Int64 | TCtoFrames (UInt16 FrameRate, bool DropFrame, UInt16 Hours, UInt16 Mins, UInt16 Secs, UInt16 Frames) |
bool | ParseCommandLine (int &argc, char **argv) |
Parse the command line options. | |
int | Process (int OutFileNum, MXFFilePtr Out, EssenceParser::WrappingConfigList WrapCfgList, Rational EditRate, UMIDPtr *FPUMID) |
Process an output file. | |
void | ClearStream (ULPtr &theUL) |
void | SetStream (ULPtr &theUL) |
void | SetUniTrack (ULPtr &theUL) |
void | SetMultiTrack (ULPtr &theUL) |
int | main_process (int argc, char *argv[]) |
Do the main processing (less any pause before exit). | |
int | main (int argc, char *argv[]) |
Do the main processing and pause if required. | |
GCWriterPtr | AddGCWriter (std::map< int, GCWriterPtr > &Map, MXFFilePtr &File, int BodySID) |
Short term hack to allow per-BodySID GCWriters. | |
void | SetStreamIndex (BodyStreamPtr &ThisStream, bool isCBR) |
Set the index options for a given body stream. | |
void | SetStreamWrapType (BodyStreamPtr &ThisStream, WrappingOption::WrapType Type) |
Set the wrapping type for a stream. | |
Variables | |
UInt8 | ProductGUID_Data [16] = { 0x84, 0x66, 0x14, 0xf3, 0x27, 0x8d, 0xd3, 0x41, 0x86, 0xdc, 0xf0, 0x89, 0xad, 0xef, 0xd0, 0x53 } |
string | CompanyName = "freeMXF.org" |
string | ProductName = "mxfwrap file wrapper" |
string | ProductVersion = "Based on " + LibraryVersion() |
string | PlatformName = "MXFLib (" + OSName() + ")" |
int | Verbose = 0 |
Debug flag for KLVLib. | |
static bool | DebugMode = false |
Debug flag for MXFLib. | |
const bool | HaveCompiledDict = false |
MXFLIB_DICTIONARY_END typedef list< std::string > | DMFileList |
DM Dictionaries. | |
std::string | OrthodoxDict = "dict.xml" |
Default filename of orthodox Dictionary. | |
DMFileList | DMDicts |
DM Dictionaries. | |
DMFileList | DMMaterialInstances |
DM Instance data files for Material Package. | |
DMFileList | DMFileInstances |
DM Instance data files for File Package. | |
char | InFilenameSet [512] |
The set of input filenames. | |
char | InFilename [16][128] |
The list of input filenames. | |
int | InFileGangSize |
The number of ganged files to process at a time. | |
int | InFileGangCount |
The number of sets of ganged files to process. | |
char | OutFilenameSet [512] |
The set of output filenames. | |
char | OutFilename [16][128] |
The output filename. | |
int | OutFileCount |
The number of files to output. | |
FileHandle | InFile [16] |
File handles. | |
Int64 | Duration [16] |
Duration of each ganged section of essence. | |
bool | PutTCTrack = true |
If false suppresses the output or Timecode tracks. | |
bool | OPAtom = false |
Is OP-Atom mode being forced? | |
bool | OPAtom2Part = false |
Has a 2-partition OP-Atom file been requested (only works for VBR). | |
bool | UpdateHeader = false |
Is the header going to be updated after writing the footer. | |
bool | StreamMode = false |
Wrap in stream-mode. | |
bool | EditAlign = false |
Start new body partitions only at the start of a GOP. | |
bool | UseIndex = false |
Write complete index tables. | |
bool | SparseIndex = false |
Write sparse index tables (one entry per partition). | |
bool | SprinkledIndex = false |
Write segmented index tables (one set per partition). | |
bool | IsolatedIndex = false |
Don't write essence and index in same partition. | |
bool | VeryIsolatedIndex = false |
Don't write metadata and index in same partition. | |
int | SelectedWrappingOption = -1 |
Selected wrapping option number: -1 = auto, 0 = list choices (or use SelectedWrappingName). | |
std::string | SelectedWrappingOptionText |
Selected wrapping option name. | |
Position | LastEditUnit [128] |
Table of last edit units written in sparse index tables (per BodySID). | |
bool | FrameGroup = false |
Group all as a frame-wrapped group (in one essence container). | |
Rational | ForceEditRate |
Edit rate to try and force. | |
BodyWrapping::PartitionMode | BodyMode = BodyWrapping::Body_None |
The mode of body partition insertion. | |
UInt32 | BodyRate = 0 |
The rate of body partition insertion. | |
UInt32 | HeaderPadding = 0 |
The (minimum) number of bytes of padding to leave in the header. | |
UInt32 | KAGSize = 1 |
The KAG Size for this file. | |
ULPtr | OPUL |
The UL of the OP for this file. | |
UInt8 | OPAtom_Data [16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02, 0x0d, 0x01, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 } |
ULPtr | OPAtomUL = new UL(OPAtom_Data) |
UInt8 | OP1a_Data [16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00 } |
ULPtr | OP1aUL = new UL(OP1a_Data) |
UInt8 | OP1b_Data [16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x05, 0x00 } |
ULPtr | OP1bUL = new UL(OP1b_Data) |
UInt8 | OP2a_Data [16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x02, 0x01, 0x01, 0x00 } |
ULPtr | OP2aUL = new UL(OP2a_Data) |
UInt8 | OP2b_Data [16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x02, 0x02, 0x05, 0x00 } |
ULPtr | OP2bUL = new UL(OP2b_Data) |
bool | PauseBeforeExit = false |
Should we pause before exit? |
typedef std::list<BodyWrapping> BodyWrappingList |
typedef std::list<EssenceTrackInfoPtr> EssenceTrackInfoList [static] |
List of Smart pointers to EssenceTrackInfo objects.
typedef SmartPtr<EssenceTrackInfo> EssenceTrackInfoPtr [static] |
Smart pointer to an EssenceTrackInfo.
GCWriterPtr AddGCWriter | ( | std::map< int, GCWriterPtr > & | Map, | |
MXFFilePtr & | File, | |||
int | BodySID | |||
) |
Short term hack to allow per-BodySID GCWriters.
DRAGONS: This needs to be tidied a little when there is time!
void ClearStream | ( | ULPtr & | theUL | ) |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Do the main processing and pause if required.
int main_process | ( | int | argc, | |
char * | argv[] | |||
) |
Do the main processing (less any pause before exit).
bool ParseCommandLine | ( | int & | argc, | |
char ** | argv | |||
) |
Parse the command line options.
int Process | ( | int | OutFileNum, | |
MXFFilePtr | Out, | |||
EssenceParser::WrappingConfigList | WrappingList, | |||
Rational | EditRate, | |||
UMIDPtr * | FPUMID | |||
) |
Process an output file.
< List of all essence tracks
< BodyStream for each stream being built (master stream if frame-grouping)
< The current file package
< Timecode component in the file package
< Count of the number of MP or FP tracks in a complete gang (set once the first gang is written)
< Essence file index
The current descriptor
The sub-descriptor batch, if this is a multiple stream, else NULL
Iterator for scanning the sub-descriptor batch, if this is a multiple stream
The index number of the sub track within this multiple essence stream, zero for the first
Is this essense stream a multiplexed type
Body SID for this essence stream
Index SID for the index of this essence stream
Write the footer
void SetMultiTrack | ( | ULPtr & | theUL | ) |
void SetStream | ( | ULPtr & | theUL | ) |
void SetStreamIndex | ( | BodyStreamPtr & | ThisStream, | |
bool | isCBR | |||
) |
Set the index options for a given body stream.
void SetStreamWrapType | ( | BodyStreamPtr & | ThisStream, | |
WrappingOption::WrapType | Type | |||
) |
Set the wrapping type for a stream.
void SetUniTrack | ( | ULPtr & | theUL | ) |
Int64 TCtoFrames | ( | UInt16 | FrameRate, | |
bool | DropFrame, | |||
UInt16 | Hours, | |||
UInt16 | Mins, | |||
UInt16 | Secs, | |||
UInt16 | Frames | |||
) |
BodyWrapping::PartitionMode BodyMode = BodyWrapping::Body_None [static] |
The mode of body partition insertion.
string CompanyName = "freeMXF.org" |
bool DebugMode = false [static] |
Debug flag for MXFLib.
DMFileList DMDicts [static] |
DM Dictionaries.
DMFileList DMFileInstances [static] |
DM Instance data files for File Package.
MXFLIB_DICTIONARY_END typedef list<std::string> DMFileList |
DM Dictionaries.
DMFileList DMMaterialInstances [static] |
DM Instance data files for Material Package.
Int64 Duration[16] [static] |
Duration of each ganged section of essence.
bool EditAlign = false [static] |
Start new body partitions only at the start of a GOP.
GCStreamID EssenceID |
Essence stream ID.
Rational ForceEditRate [static] |
Edit rate to try and force.
File Package SourceClip.
bool FrameGroup = false [static] |
Group all as a frame-wrapped group (in one essence container).
const bool HaveCompiledDict = false |
UInt32 HeaderPadding = 0 [static] |
The (minimum) number of bytes of padding to leave in the header.
FileHandle InFile[16] [static] |
File handles.
int InFileGangCount [static] |
The number of sets of ganged files to process.
int InFileGangSize [static] |
The number of ganged files to process at a time.
char InFilename[16][128] [static] |
The list of input filenames.
char InFilenameSet[512] [static] |
The set of input filenames.
bool IsolatedIndex = false [static] |
Don't write essence and index in same partition.
Position LastEditUnit[128] [static] |
Table of last edit units written in sparse index tables (per BodySID).
Material Package SourceClip.
UInt8 OP1a_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00 } |
UInt8 OP1b_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x05, 0x00 } |
UInt8 OP2a_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x02, 0x01, 0x01, 0x00 } |
UInt8 OP2b_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0d, 0x01, 0x02, 0x01, 0x02, 0x02, 0x05, 0x00 } |
bool OPAtom = false [static] |
Is OP-Atom mode being forced?
bool OPAtom2Part = false [static] |
Has a 2-partition OP-Atom file been requested (only works for VBR).
UInt8 OPAtom_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02, 0x0d, 0x01, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 } |
ULPtr OPAtomUL = new UL(OPAtom_Data) |
std::string OrthodoxDict = "dict.xml" [static] |
Default filename of orthodox Dictionary.
int OutFileCount [static] |
The number of files to output.
char OutFilename[16][128] [static] |
The output filename.
char OutFilenameSet[512] [static] |
The set of output filenames.
bool PauseBeforeExit = false |
Should we pause before exit?
string PlatformName = "MXFLib (" + OSName() + ")" |
UInt8 ProductGUID_Data[16] = { 0x84, 0x66, 0x14, 0xf3, 0x27, 0x8d, 0xd3, 0x41, 0x86, 0xdc, 0xf0, 0x89, 0xad, 0xef, 0xd0, 0x53 } |
string ProductName = "mxfwrap file wrapper" |
string ProductVersion = "Based on " + LibraryVersion() |
bool PutTCTrack = true [static] |
If false suppresses the output or Timecode tracks.
int SelectedWrappingOption = -1 [static] |
Selected wrapping option number: -1 = auto, 0 = list choices (or use SelectedWrappingName).
std::string SelectedWrappingOptionText [static] |
Selected wrapping option name.
bool SparseIndex = false [static] |
Write sparse index tables (one entry per partition).
bool SprinkledIndex = false [static] |
Write segmented index tables (one set per partition).
bool StreamMode = false [static] |
Wrap in stream-mode.
bool UpdateHeader = false [static] |
Is the header going to be updated after writing the footer.
bool UseIndex = false [static] |
Write complete index tables.
int Verbose = 0 |
Debug flag for KLVLib.
bool VeryIsolatedIndex = false [static] |
Don't write metadata and index in same partition.