Professional Documents
Culture Documents
MXFTK en
MXFTK en
3 Documentation
Contents
Chapter 1
MXFTk
OpenCube Technologies SAS
E-mail contact@opencubetech.com
MXFTk Support: support_mxftk@opencubetech.com
Internet http://www.opencubetech.com
User Guide version 9.0 of MXFTk Application Programming Interface version 2.3
(draft version).
Copyright 2010 OpenCube Technologies SAS.
Software and user guides described in this document are protected by Copyright.
No reproduction, distribution or use in whole or in part of any content is permitted without prior
authorization of OpenCube Technologies SAS. Any use, for any purpose, not allowed in the terms
of the license is strictly forbidden.
OpenCube Technologies SAS uses reasonable eorts to include accurate, complete and current in-
formation in this document, however, OpenCube Technologies SAS does not warrant that the con-
tent herein is accurate, complete, current, or free of technical or typographical errors. OpenCube
Technologies SAS reserves the right to make changes and updates to any information contained
within this document without prior notice.
OpenCube Technologies SAS shall not be responsible for any errors or omissions contained in this
document, and in particular OpenCube Technologies SAS shall not be liable for special, indirect,
consequential, or incidental damages, or damages for lost prots, loss of revenue, or loss of use,
arising out of or related to the information contained in this document, whether such damages
arise in contract, negligence, tort, under statute, in equity, at law or otherwise.
[AMT Avid Media Toolkit is an SDK licensed from Avid Technology, Inc]
All other trademarks and copyrights are the properties of their respective owners.
1.1 Preliminaries
1.1.1 MXF File Format
MXF (standing for Material eXchange Format) is a le format aiming to improve data and meta-
data exchange. The targeted objective is the interoperability between content creation mainframes,
work stations and peripherals.
This wrapper le format was designed to make use of current and forthcoming data formats. Hence,
it not only allows exchange of contents in MPEG, DV or else but also improves interoperability
between editing systems. In the mean time, it also permits conveyance of metadata following
standardized schemes.
1.1.2 MXFTk
MXFTk is a C++ library for Linux, Mac OS X and Windows operating systems that enables
creation and reading of MXF les following the MXF norm from the SMPTE. The use of this
library is performed thanks to a set of classes and methods that constitutes an API (Application
Programming Interface). The main objective of MXFTk is to let developers manipulate MXF
les at will without prior knowledge of the complex mechanisms of this format. Nonetheless, a
basic understanding of the MXF le structure is mandatory to build and use these les. API
users referring to the MXF File Format glossary [377M] will nd denitions specic to the MXF
terminology. In order to get a rst insight over these requisites, it is advised to read the MXF
Engineering Guideline [EG41]. Metadata management also requires prociency with metadata
schemes covered by the SMPTE MXF Descriptive Metadata Engineering Guideline [EG42] and
the SMPTE MXF Descriptive Metadata Scheme [380M].
The MXF le format manipulates two distinguished types of metadata: structural and descriptive.
Structural metadata builds the architecture of an MXF le: it describes the structure and the
ordering of the le content. On the other hand, descriptive metadata corresponds to the metadata
set by the user (DMS1 or else).
The API MXFTk is built so that the descriptive metadata is freely and fully lled by the API
user while the structural metadata remains entirely controlled by the API. Therefore the API task
lies in the conversion of C++ objects into structural metadata and vice-versa.
MXFTk
Op1a to Op3c les Read/Write/Partial Restore
Avid OpAtom les Read/Write
SONY XDCam les SD/HD Read/Write/Partial Restore
SONY eVTR les Read/Write/Partial Restore
Panasonic P2 les Read/Write/Partial Restore
Omneon Mediagrid les Read/Write/Partial Restore
Thomson K2/Innity les Read/Write/Partial Restore
External References Supported
IMX, MPEG Long-GOP, AVC/H.264, Supported
AVC-Intra, DV, DVCPro
Uncompressed Images, JPEG2K, Supported
VC-3(DnxHD)
BWF, AES, 8-channel AES, A-law Supported
Active/Passive Streaming Supported
DCI Package Creation and AES Encryption Supported
Descriptive Metadata Read/Write/Update
Timecode Read/Write/Update
Random Access Supported
Partitioning Supported
Index Tables Supported
Reverse Play Supported
Avid Media Toolkit (AMT) Windows 32-bit only
Platforms Windows, Linux, Macintosh PPC & i386
les.
Tracks.
An MXF le includes a given number of materials: more precisely, it holds at least one output
material and one embedded material. Hence, the simplest les embed no more than one audiovisual
material (for instance a DV clip) that is also the output material (it is played as is; no editing
of the source is performed). More intricate les may perform an edition by cutting and mixing
several audiovisual sources. It is even conceivable to create MXF les containing a large number
of materials and oering various output editions.
A material represents data. Four kinds of materials can be manipulated with the API MXFTk : au-
diovisual material (concrete_material ), metadata material , time positioning material (timecode_-
material ) and editing material (generic_material ). For instance, lets consider a material embody-
ing a multimedia le (an MPEG clip) containing both video and audio data to be played for a
given duration. In order to identify its content, the material carries an enumeration of tracks (in
our simple case, there will be one audio track and one video track in the material).
As stated just before, tracks represent the content of the materials. Each of them holds a specic
type of data (audio, video, etc.) as well as its time positioning and duration. The tracks of
a generic_material can even contain references to concrete_materials allowing editing of the
audiovisual sources. This would be the case of ageneric_material aiming to play sequentially two
concrete_material . The two resulting
video clips; each clip would be stored in the video track of a
materials would then be referenced one after the other by the output generic_material s tracks to
get the desired le play out.
MXF les complexity is depicted by their Operational Pattern (also called OP in the MXF termi-
nology). Nine operational patterns ranging from the simplest (Op1a) to the trickiest (Op3c) can
be distinguished as stated by the following table. Their precise and exhaustive description can
be found in the documents [EG41] and [377M]. Another particular operational pattern is called
OpAtom. MXF les following this pattern contain a single embedded audiovisual material but
still allow complex editing by referencing material from other OpAtom les.
Complexity
single play-list edit
Single OP1a OP2a OP3a
Material Ganged OP1b OP2b OP3b
Alternate OP1c OP2c OP3c
Op1a: the simplest and commonest operational pattern containing a single concrete_material
which is played as is by the unique generic_material . Files produced by the eVTR from
Sony are an extension of the Op1a .
Op2a: there is a single generic_material consisting in several concrete_materials played
sequentially.
Op3a: generic_material
there is a single consisting in playing sequentially some clips cut
from the concrete_materials .
Op1b: there is a single generic_material playing simultaneously the concrete_materials .
Op2b: this operational pattern extends the Op1b just as the Op2a was extending the Op1a:
it connects sequentially concrete_materials played simultaneously.
Op3b: this operational pattern extends the Op2b just as the Op3a was extending the Op2a:
it connects sequentially clips cut from concrete_materials played simultaneously.
Op1c: there is no restriction on the number of generic_materials . However, each of them
plays simultaneously one or more concrete_materials .
Op2c: there is no restriction on the number of generic_materials . However at least one of
them corresponds to an Op2b material package.
Op3c: the mostintricate operational pattern. It has no restriction on the number of generic_-
materials . However, at least one of them corresponds to an Op3b generic_material.
OpAtom: this operational pattern source package which consists in a sin-
embeds a single
gle source (only video or audio). However, the generic_material may allow building com-
plex editing (Op1a, Op1b, Op2a, andOp2b ) by referencing concrete_materials from other
OpAtom les. This pattern is heavily supported by manufacturers such as Panasonic.
MXFTk will let you read and write Op1a-3c and OpAtom les.
The reading of an MXF le begins with the instantiation of an mxf_le object with the complete
path to the le to unwrap. There are several opening modes optimized depending on the task you
want to perform with the MXF le (read metadata only, access to the essence, random access to
the essence). This creation of the mxf_le object automatically launches the decoding process.
Upon completion the number of output materials ( generic_material ) and embedded materials
(concrete_material ) can be retrieved from that object. These materials can be questioned to nd
out which decoders are required to decipher the materials tracks content. Finally, the API grants
access to the binary data through reading methods. This scheme can be repeated whenever the
user wishes to read or play the audiovisual stream of a le.
Similarly, the descriptive metadata can be read as follows. The rst step consists in checking
the availability of metadata tracks in each material (this would be an I_track object which type
istimeline_metadata , event_metadata or static_metadata ). In the next step, the metadata_-
materials held by dm_segments are retrieved from these metadata tracks. To end with, each
metadata_material includes a metadata object conveying the descriptive metadata. The metadata
object is the root of an arborescence structure whose nodes contain properties (I_property). Each
property can be read separately. MXFTk also provide methods to directly output the metadata
in an XML le or buer.
Depending on the intricacy of the le to be written, the user chooses the operational pattern
that best matches its purpose. For instance, no editing will be allowed in a straightforward Op1a
pattern while imbricate materials and a wide range of le play outs will become possible in an
Op3c pattern. Once chosen, the appropriate object deriving from mxf_le can be instantiated
(an op1a_le for instance). Then, for each multimedia source (essence in the MXF terminology)
to embed in the le, a concrete_material must be created. These materials must be appended to
the mxf_le just built using the API methods available for this operational pattern. Newt it is
also possible to congure several properties of the le such as partitioning, index table creation,
header metadata repetition, etc. Finally the function I_mxf_le::ush() will launch the creation
process.
Descriptive metadata can be used to annotate output or embedded materials, either in their
entirety or only during a limited time scope. MXFTk leaves the option to perform an edition
of the descriptive metadata, stating for instance the new actors appearing while playing a video
clip. The descriptive metadata creation process is subdivided in several steps. First of all a new
metadata track must be created. Depending on the properties of the metadata to be added, the
user must opt for the most appropriate kind of metadata track. If the metadata annotates the
content of the material in a time-linear fashion, then a timeline_metadata track is required. On
the other hand, if the metadata documents the material with a set of non-adjacent or overlapping
events, then an event_metadata track suits. Finally, if the metadata does not contain time
references and documents the materials tracks as a whole, the user should pick a static_metadata
track.
Lets consider the simple case where MXFTk user wishes to annotate the output material of an
Op1a MXF le. To do so, he will be required to go through the following steps:
Create a metadata tree I_metadata from a valid XML le or step-by-step using the API
methods.
When updating an MXF le the user may change the timecode and add or remove descriptive
metadata. In order to do so, an mxf_le interface is created, opening the MXF le to be updated.
Using the appropriate interfaces I_timecode_material and I_metadata_material you get access
to the function performing timecode and metadata update. Note that the changes made to the
le will only be performed when closing it using the function UpdateAndFreeMxfFileInterface.
Warning! If you update an MXF le from a given manufacturer, there is no guarantee that it
will remain compatible with the manufacturers device.
MXF le format provides mechanisms to perform partial restore of MXF les. MXFTk lets you
perform this task in a single call to a C function. You simply need to specify the source MXF le
and the time span you wish to retrieve thanks to the timecode in and out values. The API will
create a new object mxf_le ready to be ushed on disk or streamed in a networked environment.
Please refer to the function NewPartialRestoreMxfFileInterface() from I_mxf_le class reference
for a complete overview.
In some cases, you will need to decode or create MXF les without any embedded audiovisual
material. The source video and audio data will be stored in separate les either as raw media les
or as several MXF les. In that case, it will require a little bit more of processing.
When decoding an MXF le containing external references, the location of the referenced
les can be retrieved thanks to the function I_essence_type::external_references(). After
checking the validity of the references, they can be loaded using I_concrete_track::set_-
external_ref_le() Then, the mxf_le object can be manipulated seamlessly as if the au-
diovisual material was embedded in the le.
When creating an MXF le containing external references to raw media les, the function
NewExtConcreteMaterialInterface() will be called in place of NewConcreteMaterialInter-
face() but the creation process will remain similar.
When creating an MXF le containing external references to other MXF les, I_op1a_le
to I_op3c_le interfaces provide specic interface to append an external concrete_material
but the creation process will also remain similar.
When performing the partial restore of an MXF le containing external references, the
referenced raw or MXF les will not be involved in the process. It will create a single new
le referencing only the selected time span but the referenced les will remain untouched. If
the referenced MXF les need to be partly restored as well, a partial restore process should
be launched on each of them individually rst. Then the concrete_material from each newly
created le can be assembled in a new MXF le.
The C++ classes of the API are pure virtual classes (interfaces) that can not be instantiated with
a "new". For that reason, memory allocation and deallocation are handled by "C" style functions
whose name usually starts with "New" or "Free". In terms of implementation on the applica-
tion side, the consequence is that you will exclusively manipulate pointers on MXFTk interfaces.
For optimal memory management reasons, any object allocated by the API must be freed using
MXFTk memory deallocation methods. Neither explicit nor implicit calls to constructors and
destructors via new , delete or even dynamic_cast should occur on MXFTk objects. Failure to
meet these requirements will invariably result in memory leaks and/or crashes in your code. For
the same reasons, MXFTk will never destroy objects or buers that were allocated on the librarys
client side; you will always remain responsible for the deletion of the memory you allocated.
Header les documentation clearly species the deletion responsibility for each parameter and
returned value.
The class I_mxf_error helps managing, detecting and identifying MXFTk internal errors. It can
be useful to notice, for instance, wrong le paths or unrecognized property labels. When an error
arises, the API pushes it on an error stack that can be questioned thanks to an error manager
I_mxf_error_handler. Raised errors are sorted depending on their gravity and also return an
error identication helping to perform an advanced error processing. Finally, the error handler
includes support for internationalization by letting you specify the current active language for
error messages. MXFTk comes along with an English American dictionary but you may translate
the error messages in any language if required. See MXFTk Error management section for more
details
MXFTk user is encouraged to get used to MXFTk functionalities with the help of the numerous
examples accompanying the installation. These programs explore the most common scenarios: an
MXF le wrapper, an MXF File Unwrapper, an MXF to XML converter, an OpAtom wrapper, an
OpAtom unwrapper, an MXF le wrapper with import of XML metadata, an MXF le wrapper
with timecode redenition, an MXF le wrapper in streaming mode, an MXF le unwrapper in
streaming mode, etc. These examples are also particularly useful to apprehend MXFTk error
management.
See also:
Warnings and Errors
MXFTk interfaces do not contain dependencies on the C runtime library. In other words, the
dynamically linked library mxf_tk.dll should compile with the runtime library of your choice
(either static, multithreaded or dll multithreaded). Moreover, to address the maximum number of
compilers, import libraries following both the COFF and OMF name mangling rules can be found
in the lib directory of your installation. You should use the COFF library with Microsoft and
Metrowerks compilers while the OMF library is meant to be used with Borland compilers. Your
installation directory includes some projects ready to be compiled with Microsoft Visual C++ and
Borland C Builder.
Unicode UTF16 characters are manipulated thanks to the wchar_t data type within MXFTk
. However, you must be aware that depending on the platform the size of this data type is
dierent. On the Windows platform sizeof(wchar_t)= 2 while on the Linux and Mac platform
sizeof(wchar_t)= 4 . When writing portable code, you should not assume that the size of the
Unicode wchar_t characters returned by MXFTk will always be 2-byte long.
Insert your MXFTk installation CD in your player. Go to the directory MXFTk and ex-
ecute the shell command "install_mxftk_linux.run [installation_directory]" and "install_-
dcpcreator_linux.run [installation_directory]" if you also wish to use the DCP functions.
If the installation directory is not specifed MXFTk and DCPCreator will be installed in
/usr/local.
prex_path/bin
prex_path/lib/libmxf_tk.so.2.3.0
prex_path/lib/libmxf_tk.so.2.3
prex_path/lib/libmxf_tk.so.2
prex_path/lib/libmxf_tk.so
prex_path/include/mxf_tk
prex_path/share/mxftk
prex_path/bin
prex_path/lib/libdcpcreator.so.1.0.0
prex_path/lib/libdcpcreator.so.1.0
prex_path/lib/libdcpcreator.so.1
prex_path/lib/libdcpcreator.so
prex_path/include/dcpcreator
prex_path/share/dcpcreator
The libraries require one environment variable to work properly (MXF_HOME). MXF_-
HOME should point to the installation directory (for instance "prex_path") and LD_-
LIBRARY_PATH is the directory search list used by your linker. You may have to update
it to include $MXF_HOME/lib. It is possible to run MXFTk without setting the MXF_-
HOME environment variable, for more information on this possibility please refer to the
chapter "Deployment Procedure".
You will need a valid license key le in order to use MXFTk . You can get a license key
by registering to www.mxftk.com and then you simply need to load the license le you will
receive with OpenCubes license keys manager application. This product is part of your
installation package.
After completing the previous steps, if you browse down to MXFTk/linux/bin, you will
nd a le called opencube.mxftk.license.lcs containing the licensing information for your
distribution of the API. It usually includes the name of your company and should always
remain in the bin folder.
Please be aware that if you wish to move the library libmxf_tk.so to another folder, you
must necessarily move the license le and update your environment variable accordingly.
Insert your MXFTk installation CD in your player and execute MXFTk and DCPCreator
MacOSX packages.
Two new frameworks will be installed in the directory "/Library/Frameworks". The names
of the framework are mxf_tk.framework and DCPCreator.framework.
In the installation directory you will nd all the binary and header les required to use the
API. The directory "dic" contains the default XML schema (dictionary) loaded while using
the API. Finally you will be able to get an electronic version of this user guide browsing
down to the directory "doc".
The libraries require one environment variable to work properly (MXF_HOME). MXF_-
HOME should point to your installation directory. If required, it is possible to run MXFTk
without setting the MXF_HOME environment variable, for more information on this pos-
sibility please refer to the chapter "Deployment Procedure".
You will need a valid license key le in order to use MXFTk . You can get a license key
by registering to www.mxftk.com and then you simply need to load the license le you will
receive with OpenCubes license keys manager.
After completing the previous steps, you will nd in your installation directory a le called
opencube.mxftk.license.lcs containing the licensing information for your distribution of the
API. It usually includes the name of your company if you and should always remain in the
bin folder.
Note that during the installation, antivirus software may warn you about the activity of
shell commands. These commands are required to perform the installation and you should
ignore the antivirus warnings.
Insert your MXFTk installation CD in your player. The installation procedure should start
automatically. If not simply launch Setup.exe.
Follow the installation procedure. The application "KeyManager" will be installed. You will
be able to launch the installation of MXFTk from the application KeyManager.
In the installation directory you will nd all the binary and header les required to use the
API. The directory "dic" contains the default XML schema (dictionary) loaded while using
the API. Finally, you will be able to get an electronic version of this user guide by browsing
down to the directory "doc".
The library requires one environment variable to work properly (MXF_HOME). MXF_-
HOME should point to the installation directory (for instance /Projects/Dlls/MXFTk).
You can check that this variable was correctly set during the installation. It is possible to
run MXFTk without setting the MXF_HOME environment variable, for more information
on this possibility please refer to the chapter "Deployment Procedure".
Additionally, the path to mxftk.dll should be appended to your variable PATH to permit
dynamic linkage at runtime. This task is also automatically performed during the installa-
tion.
You will need a valid license key le in order to use MXFTk . You can get a license key
by registering to www.mxftk.com and then you simply need to load the license le you will
receive with OpenCubes license keys manager.
The directory MXFTk\lib contains two import libraries respectively in the COFF and OMF
format. You should use the COFF library if you compile with Microsoft Visual or Metrowerks
CodeWarrior compilers. Alternatively, the OMF library targets users of Borland C Builder
compilers.
The following exhaustive list summarizes the les from your MXFTk installation that are
mandatory for a correct behavior of MFTk. All these les should be included while deploying
MXFTk :
prex_path/bin/opencube.mxftk.license.lcs.
MXF_HOME should be set during the installation and should point to the directory con-
taining your installation of MXFTk . In your program, you will need to call the function
InitMXF_TK().
OR
MXF_HOME is not set during the installation. In your program you will need to call
InitMXF_TK2(). The parameter for this function should be the path to the directory
containing your installation of MXFTk .
mxf_tk.framework/Headers
mxf_tk.framework/Versions/A/Resources/doc
mxf_tk.framework/Versions/A/Resources/examples
mxf_tk.framework/Versions/A/Resources/dic
mxf_tk.framework/Versions/A/include
mxf_tk.framework/Versions/A/Headers
MXF_HOME should be set during the installation and should point to the directory con-
taining your installation of MXFTk . In your program, you will need to call the function
InitMXF_TK().
OR
MXF_HOME is not set during the installation. In your program you will need to call
InitMXF_TK2(). The parameter for this function should be the path to the directory
containing your installation of MXFTk .
The following exhaustive list summarizes the les from your MXFTk installation that are
mandatory for a correct behaviour of MXFTk . All these les should be included while
deploying MXFTk :
mxf_tk.dll
opencube.mxftk.license.lcs
MXF_HOME should be set during the installation and should point to the directory con-
taining your installation of MXFTk . In your program, you will need to call the function
InitMXF_TK().
OR
MXF_HOME is not set during the installation. In your program you will need to call
InitMXF_TK2(). The parameter for this function should be the path to the directory
containing your installation of MXFTk .
Refer to MXFTk Error management reference to see how to manage errors with MXFtk.
The errors, warnings and notices are listed in the Warnings and Errors page.
Concrete Material
15
Concrete material and tracks enable the manipulation of audiovisual data. They grant access to
the "binary" video or audio streams of each track thanks to read functions. Concrete materials
have a UMID (SMPTE Unique Material Identier, see [330M]). MXFTk user can set its value
after creating the material or leave the default one automatically set by the API.
See also:
I_concrete_material, I_umid
Metadata Material
17
Metadata material enables the manipulation of descriptive metadata either built by MXFTk user
or read from an MXF le. In some cases, this structure is also used to read specic structural
metadata (such as descriptors from a concrete material or identication sets). Metadata (I_-
metadata) carries a set of properties. A property I_property is dened by a label_c, normalized
and validated thanks to a dictionary, and a value I_value. A label is a char∗ string and a value
is a memory pointer of a given type that can contain metadata (when the pointer is referencing
an I_metadata interface). Using this mechanism of metadata objects referencing other metadata
objects a tree structure can be easily built. Only MXFTk Advanced version will let you attach
descriptive metadata to your MXF les.
See also:
I_metadata, I_metadata_material
The class I_mxf_error helps managing, detecting and identifying MXFTk internal errors. It can
be useful to notice, for instance, wrong le paths or unrecognized property labels. When an error
arises, the API pushes it on an error stack that can be questioned thanks to an error manager
I_mxf_error_handler. Raised errors are sorted depending on their gravity and also return an
error identication helping to perform an advanced error processing. Finally, the error handler
includes support for internationalization by letting you specify the current active language for
error messages. MXFTk comes along with an us-en dictionary but you may translate the error
messages in any language if required.
MXFTk user is encouraged to get used to MXFTk functionalities with the help of the numerous
examples accompanying the installation. These programs explore the most common scenarios: an
MXF le wrapper, an MXF File Unwrapper, an MXF to XML converter, an OpAtom wrapper, an
OpAtom unwrapper, an MXF le wrapper with import of XML metadata, an MXF le wrapper
with timecode redenition, an MXF le wrapper in streaming mode, an MXF le unwrapper in
streaming mode, etc. These examples are also particularly useful to apprehend MXFTk error
management.
See also:
The error_list section and <mxf_tk/errors.hpp> for a complete list of errors and warnings.
Essence Descriptors
21
The following classes can be used to create the complete essence descriptors. Most of the time,
you will not need to implement this function because MXFTk can build them automatically by
analyzing the source les to be wrapped. However, in certain cases, this information can not be
retrieved from the source stream. In that case, the user should build these classes in order to
create a valid MXF le. In this manual we will not go through the denitions of all the properties
set in the descriptors but we invite the reader to refer to the corresponding norms for a complete
reference.
MXF Files
23
This API release supports Op1a, Op1b, Op1c, Op2a, Op2b, Opc2c, Op3a, Op3b, Op3c and
OpAtom les. Currently MXFTk relies on C++ classes representing MXF les. Their utility is
determined by the task to be performed:
I_evtr_le, to write MXF les following the same attributes as those generated by the
SONY eVTR device.
I_xdcam_imx_le to write D10 MXF les following the same attributes as those generated
by the SONY XDCam camcorder.
I_xdcam_dv_le to write DVCam+AES MXF les following the same attributes as those
generated by the SONY XDCam camcorder.
I_xdcam_hd_le to write MPEG Long-GOP HD + AES MXF les following the same
attributes as those generated vy the SONY XDCam HD camcorder.
I_opatom_le, to read and write OpAtom MXF les. Furthermore two functions called
NewP2Shot() and NewP2ShotFromStream() generate DVCPro+AES3 MXF les following
the same attributes as those generated by the Panasonic P2 camcorder.
I_avid_opatom_le to create Avid native OpAtom les (IMX, DV, DVCPro, DnxHD).
Furthermore use WaitEndNewAMTAvidOpAtomShot() or NewAMTAvidOpAtomShotFrom-
Stream() to generate Avid OpAtom les using AVID Media Toolkit (AMT).
Timecode Material
25
Timecode material allows the denition of the timecode used while playing an I_generic_material
or an I_concrete_material. When added to an I_generic_material it corresponds to the le "play
out" and must be continuous (no timecode redenition while playing). When added to an I_-
concrete_material it corresponds to the le "play in" of the data embedded in the le and can be
discontinuous. MXFTk generates default timecode materials so that the user does not necessarily
need to dene them. Only MXFTk Advanced version will let you redene the timecode of your
MXF les.
See also:
I_timecode, I_timecode_material
Material
9.1 Edit Units 27
Two families of materials can be distinguished. On one side, we can nd the concrete materials
and on the other one the virtual materials. Concrete materials grant access to the audiovisual
data (a clip in a given format) whereas virtual materials provide tools to manage the edition of
the concrete materials, as well as their metadata and timecode.
Concrete materials:
I_concrete_material
Virtual materials:
I_metadata_material
I_timecode_material
I_generic_material
As seen in the preliminaries of this user guide, a material contains a given number of tracks.
These tracks are used to spot the nature of the data held by this material (video, audio, data
or metadata). In the following sections, we will rst go through the classes I_generic_material
and I_track (representing editing information), then we will examine the concrete material classes
I_concrete_material and I_concrete_track (representing audiovisual material) and nally we
will conclude with the metadata material I_metadata_material and timecode specication I_-
timecode_material.
References
29
SMPTE 436M: MXF Mappings for VBI Lines and Ancillary Data Packets,
Streaming
31
The following classes should be used when manipulating MXF les in a streaming environment
(IEEE 1394 port, videotape recorder, etc.):
I_essence_stream_task
I_crypted_essence_stream_task
I_input_metadata_stream_task
I_output_mxf_stream_task
I_input_mxf_stream_task
I_input_partial_mxf_stream_task
All these classes are pure virtual classes that the user must implement. They work as a set of func-
tions that MXFTk will call whenever he needs some information or data from the corresponding
streaming device. Therefore, MXFTk user is entitled to implement these classes to feed MXFTk
with data whenever it needs to.
MXFTk lets you stream the input audiovisual data, the descriptive metadata and the MXF les be-
ing generated or read. When wrapping an MXF le you may even receive the audiovisual data and
the descriptive metadata from several streams while outputting the MXF stream on the y. The
MXFTk user is strongly invited to refer to the examples "active_stream_wrapper", "passive_-
stream_wrapper", "mxf_stream_unwrapper", "op1a_stream_wrapper" and "p2_wrapper". It
is also best to feel comfortable with MXF le wrapping/unwrapping in a non-streaming environ-
ment before going through this chapter.
Added: Speed up opening times and seeking times for MXF les, in particular XDCAM-HD.
Fixed: Import of Avid OpAtom in Avid NLE (via the AMA or Import menu)
Fixed: MPEG essence with no start code extension leads to MXFTk miswrapping (2 frames
wrapped per KLV)
Fixed: Omneon partial restore loses some DMS1 linked KLV data
Fixed: Duration can be forced to be updated when wrapping a le in "process while record"
context
Fixed: bit_rate() of I_essence_type on mpeg2 le is not returning MPEG Descriptor meta-
data value
Fixed: Multi-partitionned les (except Not Sony XDCAM HD) partial restored les get
empty body partitions
Fixed: Invalid stream oset values for the index tables of partitioned MXF les
Changed: Adapted Essence Container Label process for better reading/writing of Doremi
les
Changed: AVID OpAtom Material Package no longer cut when "_" is found
Fixed: Avid opAtom DNxHD mxf le reading in streaming mode are not recognized
Fixed: Activeblocking XDCAM IMX / D10 wrapped les duration is not known
Fixed: xdcam_wrapping AES 4 mono 48khz 16bit tracks in active blocking mode wrapping
is not working
Fixed: Memory Exception when reading big les (more than 11GB)
Fixed: Failed to unwrap MXF le where the video ller is not referenced in the index table
Fixed: Crash when unwrapping MXF that does not have identication eld.
Fixed: Crash when unwrapping avid opatom imx30 le in stream mode.
Added: Improved support of P2 format (sequences recorded with pulldown and native
720p@24p/25p/30p).
Added: Support of timecode from system items when reading or creating an MXF le.
Added: support for Avid TRMG 2.97 les with AES audio track number.
Fixed: The essence_extractor sample program was trying to load Avid OpAtom external
references while it should not.
Fixed: Innite loop while decoding certain avours of Avid OpAtom les.
Fixed: Invalid index tables when wrappping multiple essences with partitioning.
Fixed: Wrong duration for MXF les containing D10 essence with a discontinuous timecode
of unknown duration.
Fixed: Crash when wrapping BWF les with the same UMID.
Added: D10 MXF les can now be wrapped/unwrapped using WAVE audio instead of 8-
channel AES.
Added: Mono and stereo Wave les can now be wrapped as AES audio.
Added: new function to the I_property class helping the creation of metadata trees.
Changed: Improved le update (changes are now directly applied to the source).
Changed: Panasonic P2 les can now be created with streamed essence sources.
Added: Introduction of active and passive mode while wrapping MXF les in a streaming
environment.
Added: Mono and stereo AES3 sources embedded in an MXF le can now be extracted in
WAVE format.
Added: Wrapping of SONY XDCam DV and Panasonic P2 les can now be performed with
AES3 or WAV sources.
Changed: Improved support of SONY XDCam les (possibility to retrieve the embedded
XML le). See function I_mxf_le::get_embedded_xml().
Fixed: Clip wrapping of les larger than 2GB is now enabled.
Changed: Improved Error Management with error identication, classication and error
messages internationalization.
Added: Random access to audiovisual data from the generic material (material package)
and concrete material (top level source package) (Advanced version only).
Added: Access to data from a given timecode value (Advanced version only).
Added: New essences now fully supported: AES and MPEG 2 Transport Stream and Pro-
gram Stream.
Deprecated List
41
Member opencube::MXFTK_NAMESPACE::I_mxf_le::ush_thread_cancel()
This method has been deprecated and replaced by cancel().
Member mxf_opening_mode
Member METADATA_AND_RANDOM_ACCESS .
Module Index
14.1 Modules
Here is a list of all modules:
Class Index
I_dm_segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_dm_source_clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_essence_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_crypted_essence_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_metadata_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_partial_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_object
concrete_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
crypted_locator_element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
crypted_locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
error_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
generic_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_essence_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_generic_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_concrete_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_metadata_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_error_handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_evtr_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_dv_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_hd_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_imx_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_proxy_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
15.1 Class Hierarchy 44
I_op3a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op3b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op3c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_opatom_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_avid_opatom_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_dcp1_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_le_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_anc_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_vbi_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_cdci_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_mpeg2_video_descriptor . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_rgba_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_sound_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_wave_audio_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_aes3_audio_essence_descriptor . . . . . . . . . . . . . . . . . . . . ??
I_mxf_subdescriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_jpeg2000_picture_subdescriptor . . . . . . . . . . . . . . . . . . . . . . . ??
I_opatom_assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_system_item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_concrete_track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_umid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_umid64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
metadata_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
mxf_le_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
ordered_timecode_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
ordered_track_item_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
properties_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
track_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_output_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_source_clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
mxf_parameter_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
Class Index
concrete_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
crypted_locator_element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
crypted_locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
error_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
generic_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_avid_opatom_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_concrete_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_concrete_track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_crypted_essence_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_dcp1_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_dm_segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_dm_source_clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_essence_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_essence_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_evtr_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_generic_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_metadata_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_input_partial_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_metadata_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_aes3_audio_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_anc_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_cdci_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_error_handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_le_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_generic_sound_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_jpeg2000_picture_subdescriptor . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_mpeg2_video_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
16.1 Class List 46
I_mxf_rgba_picture_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_subdescriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_vbi_data_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_mxf_wave_audio_essence_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op1c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op2c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op3a_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op3b_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_op3c_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_opatom_assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_opatom_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_output_mxf_stream_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_source_clip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_system_item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_timecode_material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_umid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_umid64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_dv_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_hd_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_imx_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
I_xdcam_proxy_le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
metadata_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
mxf_le_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
mxf_parameter_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
ordered_timecode_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
ordered_track_item_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
properties_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
track_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??
Module Documentation
Warning:
MXFTk currently supports AMT only on Windows 32-bit.
Warning:
You must still call WaitEndNewAMTAvidOpAtomShot() to terminate correctly the thread.
17.1 AMT Avid OpAtom 48
Parameters:
← id Identier returned by NewAMTAvidOpAtomShotFromStream() or NewAMTAvi-
dOpAtomShot()
Returns:
true if successful.
Warning:
MXFTk currently supports AMT only on Windows 32-bit.
Indicate whether the AMTAvidOpAtom process with the specied identier is running ot not.
Parameters:
← id Identier returned by NewAMTAvidOpAtomShotFromStream() or NewAMTAvi-
dOpAtomShot()
Returns:
true if the conversion is processing, false if the conversion is not started or nished.
Warning:
MXFTk currently supports AMT only on Windows 32-bit.
This function produce a directory with Avid OpAtom le created by the AMT (Avid Media
ToolKit). AMT is an SDK licensed from Avid Technology, Inc. These les are compliant with the
AVID products (NewsCutter, Interplay, Assist).
Parameters:
← loc Listing the input les to be MXF wrapped (this should be one video track in DV, IMX
or DNxHD Format and some mono audio tracks in WAV format).
← edit_rate Denes the video edit rate of the sequence. This is used by DNxHD. This is
optional, pass NULL to let the MXFTK generate a default value.
← multi_res Indicate whether the le must be prepared for multi resolution or not.
Returns:
an value identifying the process that can later on be passed to WaitEndNewAMTAvi-
dOpAtomShot(), CancelNewAMTAvidOpAtomShot() and ProgressNewAMTAvi-
dOpAtomShot(). Returns NULL if failed.
Warning:
You should call WaitEndNewAMTAvidOpAtomShot() after calling this function to make sure
the process is completed.
MXFTk currently supports AMT only on Windows 32-bit.
Parameters:
← tasks Array of the streaming interface you should derive to provide an implementation
to control your input streaming device. It should handle one video track (DV, IMX,
DNxHD) and some mono channels audio tracks (WAV).
← edit_rate Denes the video edit rate of the sequence. This is used by DNxHD. This is
optional, pass NULL to let the MXFTK generate a default value.
← multi_res Indicate whether the le must be prepared for multi resolution or not.
Returns:
an value identifying the process that can later on be passed to WaitEndNewAMTAvi-
dOpAtomShot(), CancelNewAMTAvidOpAtomShot() and ProgressNewAMTAvi-
dOpAtomShot(). Returns NULL if failed.
Warning:
You should call WaitEndNewAMTAvidOpAtomShot() after calling this function to make sure
the process is completed.
MXFTk currently supports AMT only on Windows 32-bit.
Parameters:
← id Identier returned by NewAMTAvidOpAtomShotFromStream() or NewAMTAvi-
dOpAtomShot()
Returns:
A value between 0.0 and 1.0. A negative value would indicate that the progress could not be
computed.
Warning:
MXFTk currently supports AMT only on Windows 32-bit.
Parameters:
← id Identier returned by NewAMTAvidOpAtomShotFromStream() or NewAMTAvi-
dOpAtomShot()
Returns:
true if successful.
Warning:
MXFTk currently supports AMT only on Windows 32-bit.
Functions
mxf_tk_API bool FreeAvidOpAtomFileInterface (I_avid_opatom_le ∗∗le)
mxf_tk_API bool NewAvidOpAtomFileInterface (I_avid_opatom_le ∗∗le, const char
∗path)
mxf_tk_API bool NewAvidOpAtomStreamInterface (I_avid_opatom_le ∗∗le, I_-
output_mxf_stream_task ∗task)
Parameters:
↔ le A I_opatom_le∗ pointer to the object to be freed.
Returns:
true if the function operated successfully.
Parameters:
→ le Pointer to the newly allocated object
← path Path to the avid le to be written.
Returns:
true if the function operated successfully.
Note:
Call to ush() will eectively cause the creation of the le.
Parameters:
→ le A I_avid_opatom_le∗ pointer to the newly allocated object
task Class derived by the MXFTk user to provide its own implementation to feed the stream-
ing device while output data is built by MXFTk.
Returns:
true if the function operated successfully.
Note:
Call to ush() will eectively cause the on-disk writing of the le(s).
17.3 I_concrete_material
Classes
class I_concrete_material
Denes
mxf_tk_API bool FreeConcreteMaterialInterface(I_concrete_material ∗∗i_mat)
mxf_tk_API bool NewConcreteMaterialInterface(I_concrete_material ∗∗material, loca-
tors ∗locators, wrapping wrapping_mode=std_wrapping, rational ∗edit_rate=NULL, bool
ignore_audio_from_dv=false)
mxf_tk_API bool NewCryptedMaterialInterface(I_concrete_material ∗∗material,
crypted_locators ∗locators, wrapping wrapping_mode=frame_wrapping, rational ∗edit_-
rate=NULL, bool ignore_audio_from_dv=false)
mxf_tk_API bool NewExtConcreteMaterialInterface(I_concrete_material ∗∗material,
const char ∗path, rational ∗edit_rate=NULL, bool ignore_audio_from_dv=false, int64_t
∗duration=NULL)
mxf_tk_API bool NewStreamMaterialInterface(I_concrete_material ∗∗material, I_-
essence_stream_task ∗task, wrapping wrapping_mode=std_wrapping, rational ∗edit_-
rate=NULL, bool ignore_audio_from_dv=false)
Enumerations
enum wrapping {
Parameters:
↔ i_mat The I_concrete_material to release.
Warning:
User must not free a concrete material already attached to an I_mxf_le.
Returns:
true if successful, false otherwise.
Parameters:
→ material A I_concrete_material∗∗ pointer to the newly allocated object
← locators List of source les (DV, MPEG, etc.)(see notes)
← wrapping_mode The desired wrapping of the essence.
← edit_rate Sets the default edit rate value to be used when this information cannot be
retrieved from the essence (e.g. Uncompressed Images).
Returns:
false if the allocation failed
Note:
In order to designate a series of images the following syntax should be set in the path of the
locator #[d, f, l, s] where:
C:/images/myle0010.jp2
C:/images/myle0012.jp2
C:/images/myle0014.jp2
...
C:/images/myle0498.jp2
C:/images/myle0500.jp2
Retrieves a concrete material interface. This function is the same the same than NewConcreteM-
aterialInterface() but uses crypted_locators instead of locators.
Parameters:
→ material A I_concrete_material∗ pointer to the newly allocated object
← locators List of complete paths (and crypt keys) to the audio or video source les to be
embedded and crypted in this concrete material.
Returns:
false if the allocation failed
Retrieves a concrete material interface that will point on an externally referenced media le.
Parameters:
→ material A pointer to the newly allocated object.
← path Path to the external media le to be referenced.
← edit_rate Sets the default edit rate value to be used when this information
← ignore_audio_from_dv If set to true DV sources with embedded audio will.
← duration If not null, use the specied value as the duration. This prevents parsing the
whole essence to nd out its duration and therefore saves most of the time when creating
an external reference. The value may be -1, in which case the duration will be marked
as unknown.
Returns:
false if the allocation failed
Parameters:
→ material A I_stream_material∗ pointer to the newly allocated object.
← task An I_essence_stream_task (or I_crypted_essence_stream_task) pointer to pro-
vide control over the audiovisual stream.
← edit_rate A pointer to a rational used to set the default edit rate value to be used when
this information cannot be retrieved from the essence (e.g. Uncompressed Images).
← ignore_audio_from_dv Set to true to force MXFTk to ignore the audio from the DV
streams that will be wrapped. In that case, no audio track will be created for the DV
streams.
Note:
This function should be used when wrapping an MXF le on the y as the audiovisual material
is received from a streaming media.
Returns:
false if the allocation failed.
Enumerator:
std_wrapping The default wrapping (frame or clip wrapping depending on the essence).
clip_wrapping Clip wrapping.
frame_wrapping Frame wrapping.
line_wrapping Line wrapping.
Warning:
MXFTk currently does not support line wrapping.
Note:
: eVTR wrapping is a specic kind of frame wrapping.
xdcam_wrapping XDCam wrapping: you must create your materials with this wrapping
in order to attach them to an I_xdcam_dv_le, I_xdcam_imx_le or I_xdcam_-
proxy_le.
Note:
: XDCam wrapping is a specic kind of frame wrapping.
p2_wrapping P2 wrapping: you must create your materials with this wrapping in order
to attach them to a Panasonic P2 le.
Note:
: P2 wrapping is a specic kind of clip wrapping.
k2_wrapping K2 wrapping to build les similar to the ones produced by a Thomson Grass
Valley K2 server.
Note:
: K2 wrapping is a specic kind of frame wrapping.
avid_opatom_wrapping AVID OpAtom wrapping to build les similar to the ones pro-
duced by an AVID server.
Note:
: AVID OpAtom wrapping is a specic kind of clip wrapping.
opzero_wrapping OpZero wrapping: you must create your materials with this wrapping
in order to attach them to an I_op1a_le built with the OpZero constructor.
Note:
: OpZero wrapping is clip-wrapping when the MXF le contains only audio. It is
frame-wrapping when there is video.
dcp_wrapping DCP SMPTE wrapping: you must create your materials with this wrap-
ping in order to attach them to an I_dcp1_le.
See also:
DCP SMPTE wrapping is a specic kind of frame wrapping.
dcp1_wrapping DCP Interop wrapping: you must create your materials with this wrap-
ping in order to attach them to an I_dcp1_le.
See also:
dcp_wrapping
DCP Interop wrapping is a specic kind of frame wrapping.
See also:
dcp_wrapping
DCP 3D Interop is a specic kind of frame wrapping.
17.4 I_dcp1_le
Classes
class I_dcp1_le
Denes
mxf_tk_API bool FreeDcp1FileInterface(I_dcp1_le ∗∗)
mxf_tk_API bool NewDcp1FileInterface(I_dcp1_le ∗∗, const char ∗lename)
mxf_tk_API bool NewDcp1StreamInterface(I_dcp1_le ∗∗, I_output_mxf_stream_task
∗task)
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_dcp1_le interface in streaming mode. This function must be called
when writing an OpAtom le on a linear streaming device (e.g. a videotape recorder, an IEEE1394
port, etc.). Call to ush() will eectively cause the creation of the le.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
Parameters:
task Class derived by the MXFTk user to provide its own implementation to feed the stream-
ing device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
Enumerations
enum gravity { MXF_NONE = 0, MXF_CAUTION, MXF_WARNING, MXF_FATAL }
Functions
mxf_tk_API bool GetMxfErrorHandlerInterface (I_mxf_error_handler ∗∗handler)
static bool raised ()
template<typename T >
static bool write_all (std::basic_ostream< T > &)
See also:
The MXFTk Error Handling section for more details.
Enumerator:
MXF_NONE The error could not be identied.
MXF_CAUTION This is the lowest gravity. This generally means that the user tries to
undertake an illegal operation on the MXF le or that an unexpected event occurred.
This error does not stop MXFTk from working correctly and the validity of the MXF
les being manipulated should not be aected by this error. For instance, this gravity
of error will be set if you are trying to reach an invalid timecode.
MXF_WARNING This is a serious error. The validity of the le being manipulated is
at least partially altered and future manipulations of the le may lead to unexpected
behaviour. However, it is likely that the overall behaviour of MXFTk will remain correct
while reading or writing other MXF les. For instance, this gravity of error will be set
if you are trying to read an invalid MXF le.
MXF_FATAL This is the highest gravity. The MXFTk will not be able to continue to
work properly, at least with the le being manipulated. For instance, this gravity of
error will be set if the toolkit cannot nd a valid license key.
Parameters:
→ handler A pointer to he address of the created I_mxf_error_handler.
Note:
This object is created upon loading of the dynamic library and will be shared by all the pro-
cesses. This function does not allocate a new handler and the pointer returned is automatically
deleted upon unloading of the dynamic library.
Default language is set to English - United States (dictionary lename: mxf-en-US.dic). The
user does not need to Free this interface.
Returns:
true if any error was printed out, false otherwise
Denes
mxf_tk_API bool FreeMxfAes3AudioEssenceDescriptorInterface(I_mxf_aes3_audio_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfAncDataEssenceDescriptorInterface(I_mxf_anc_data_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfCDCIPictureEssenceDescriptorInterface(I_mxf_cdci_-
picture_essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfFileDescriptorInterface(I_mxf_le_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfGenericDataEssenceDescriptorInterface(I_mxf_generic_data_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfGenericPictureEssenceDescriptorInterface(I_mxf_generic_-
picture_essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfGenericSoundEssenceDescriptorInterface(I_mxf_generic_-
sound_essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfJpeg2000PictureSubdescriptorInterface(I_mxf_jpeg2000_-
picture_subdescriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfMpeg2VideoDescriptorInterface(I_mxf_mpeg2_video_-
descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfRGBAPictureEssenceDescriptorInterface(I_mxf_rgba_-
picture_essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfVbiDataEssenceDescriptorInterface(I_mxf_vbi_data_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool FreeMxfWaveAudioEssenceDescriptorInterface(I_mxf_wave_audio_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool NewMxfAes3AudioEssenceDescriptorInterface(I_mxf_aes3_audio_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool NewMxfAncDataEssenceDescriptorInterface(I_mxf_anc_data_-
essence_descriptor ∗∗descriptor)
mxf_tk_API bool NewMxfCDCIPictureEssenceDescriptorInterface(I_mxf_cdci_-
picture_essence_descriptor ∗∗descriptor)
mxf_tk_API bool NewMxfFileDescriptorInterface(I_mxf_le_descriptor ∗∗descriptor)
Enumerations
enum subdescriptor_t
Parameters:
← descriptor An I_mxf_aes3_audio_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_anc_data_essence_descriptor∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_cdci_picture_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_le_descriptor∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_generic_data_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_generic_picture_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_generic_sound_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_jpeg2000_picture_subdescriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_mpeg2_video_descriptor∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_rgba_picture_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_vbi_data_essence_descriptor∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
Parameters:
← descriptor An I_mxf_wave_audio_essence_descriptor∗ pointer to the object to be
freed.
Returns:
false if the deallocation failed.
Parameters:
→ descriptor An I_mxf_aes3_audio_essence_descriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_anc_data_essence_descriptor∗ pointer to the newly allocated ob-
ject.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_cdci_picture_essence_descriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_le_descriptor∗ pointer to the newly allocated object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_generic_data_essence_descriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_generic_picture_essence_descriptor∗ pointer to the newly allo-
cated object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_generic_sound_essence_descriptor∗ pointer to the newly allo-
cated object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_jpeg2000_picture_subdescriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_mpeg2_video_descriptor∗ pointer to the newly allocated object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_rgba_picture_essence_descriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_vbi_data_essence_descriptor∗ pointer to the newly allocated ob-
ject.
Returns:
false if the allocation failed.
Parameters:
→ descriptor An I_mxf_wave_audio_essence_descriptor∗ pointer to the newly allocated
object.
Returns:
false if the allocation failed.
17.7 I_MXF_le
Classes
class I_mxf_le
struct mxf_parameter_t
Denes
mxf_tk_API bool FreeMxfFileInterface(I_mxf_le ∗∗mxf_le)
mxf_tk_API bool NewMxfFileInterface(I_mxf_le ∗∗mxf_le, const char ∗path, uint32_t
ags=0, mxf_parameter_t ∗parameters=NULL)
mxf_tk_API bool NewMxfStreamInterface(I_mxf_le ∗∗mxf_le, I_input_mxf_-
stream_task ∗task, uint32_t ags=0, mxf_parameter_t ∗parameters=NULL)
mxf_tk_API bool NewPartialRestoreMxfFileInterface(I_mxf_le ∗∗mxf_le, const char
∗path, I_timecode ∗tc_in, I_timecode ∗tc_out)
mxf_tk_API bool NewPartialRestoreMxfStreamInterface(I_mxf_le ∗∗mxf_le, I_-
input_partial_mxf_stream_task ∗task, I_timecode ∗tc_in, I_timecode ∗tc_out)
mxf_tk_API bool UpdateAndFreeMxfFileInterface(I_mxf_le ∗∗mxf_le)
Enumerations
enum mxf_ag_t { FLAG_METADATA_ONLY = 0x0001, FLAG_INCOMPLETE_-
METADATA = 0x0002, FLAG_IGNORE_INDEX_TABLES = 0x0010, FLAG_LOAD_-
INDEX_TABLES_AT_STARTUP = 0x0020 }
enum mxf_opening_mode { METADATA_ONLY, CLOSED_COMPLETE_METADATA
= FLAG_METADATA_ONLY, METADATA_AND_LINEAR_PLAYOUT = FLAG_-
IGNORE_INDEX_TABLES, METADATA_AND_RANDOM_ACCESS = 0 }
enum mxf_parameter {
Frees an I_mxf_le interface. If the le you provide is an OpAtom le that was parallelized,
serialized or synchronized, calling this function will free all the associated OpAtom les so that
you need to call this function only once.
Parameters:
← mxf_le An I_mxf_le∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
Parameters:
→ mxf_le An I_mxf_le∗ pointer to the newly allocated object.
← path Path to the mxf le to be read.
← ags This is an OR'd combination of mxf_ag_t used to control the MXF le behavior.
changed depending on the task to undertake with the le:
Returns:
false if the allocation failed.
Retrieves a pointer on an I_mxf_le interface. This function must be called when reading an
MXF le received from a linear streaming device (e.g. a videotape recorder, an IEEE1394 port,
etc.). The I_input_mxf_stream_task is a class derived by MXFTk user to provide its own
implementation to retrieve data from the stream. The key functions while opening an I_mxf_le
with this constructor are end_of_stream() and write(). Returns false if the allocation failed.
Parameters:
→ mxf_le A I_mxf_le∗ pointer to the newly allocated object.
← task A I_input_mxf_stream_task pointer to the user's class that will feed this stream.
← ags This is an OR'd combination of mxf_ag_t used to control the MXF le behavior.
← parameters List of initial parameters.
Returns:
false if the allocation failed.
Retrieves a pointer to an I_mxf_le interface and perform a partial restore on the specied MXF
le. It will retrieve the video, sound and data located between the timecode in tc_in(included) and
timecode out tc_out (also included). These timecode values correspond to the timecode material
of the I_generic_material of the le. It is not possible to perform a partial restore according
to the timecode material of the I_concrete_material. Note that if the time span dened by the
timecode values is not valid an error will be raised. Possible errors may include an inappropriate
frame rate, an invalid drop frame property, etc. Furthermore, if the MXF le contains several
I_generic_material (several material packages), they will be all partially restored according to
the same timecode values. MXFTk will do its best to ensure that the restored le follow the same
properties as the original le. It will keep the properties of partitioning, index tables, kag_size,
etc.
Parameters:
→ mxf_le An I_mxf_le∗ pointer to the newly allocated object.
← path Complete path to the MXF le to be partially restored.
← tc_in The beginning timecode value.
← tc_out The ending timecode value.
Note:
This function will create the MXF le in memory, in order to ush it you will need to use one
of the ush() functions of I_mxf_le interface.
Returns:
false if an error occurred.
Parameters:
→ mxf_le An I_mxf_le pointer to the newly allocated object.
← task An I_input_mxf_stream_task pointer to the user's class that will feed this stream.
← tc_in The beginning timecode value.
← tc_out The ending timecode value.
Note:
I_timecode pointers should be destroyed by the API user.
See also:
NewPartialRestoreMxfFileInterface()
Parameters:
← mxf_le An I_mxf_le∗ pointer to the object to be freed.
Returns:
false if the deallocation failed.
List of possible ags to control the behavior of an MXF le, depending on what it is intended to
do.
See also:
NewMxfFileInterface(), NewMxfStreamInterface()
Enumerator:
FLAG_METADATA_ONLY When this ag is set, only metadata will be available for
reading. This does no allow extraction of media stored in the le.
The MXF opening mode is used to optimize the opening of an MXF le depending on what you
want to do with this le.
See also:
mxf_ag_t, NewMxfFileInterface(), NewMxfStreamInterface()
Deprecated
Enumerator:
METADATA_ONLY This mode is the fastest opening mode but you will only get the
rst header metadata found while decoding the le. Depending on the le, this header
metadata may be open and/or incomplete. The metadata you get should be taken with
"caution". You cannot extract media from the le with this mode.
Enumerator:
KAG_SIZE The KAG size. Its value is an integer giving the size in bytes (default "512").
This can be used to align KLV items on a spacing grid.
REVERSE_PLAY This parameter activates the creation of reverse play KLVs. Its value
is "True" or "False".
SYSTEM_ITEM This parameter activates the creation of system items when generating
the MXF le. Its value is "True" or "False" (default "False").
Warning:
If the le was dierent from what was earlier expected, the duration in the footer
partition can be inconsistent with the one in the header partition.
17.8 P2 OpAtom
Classes
class I_opatom_assembler
class I_opatom_le
Enumerations
enum p2_format {
p2_480i_24p_2_3_3_2_pulldown_dviec, p2_480i_24p_2_3_3_2_pulldown_-
dvcpro25, p2_480i_24p_2_3_3_2_pulldown_dvcpro50, p2_576i_50i_dviec, p2_-
576i_50i_dvcpro25,
p2_720p_30p_2_2_pulldown_dvcpro100, p2_720p_24p_2_3_pulldown_dvcpro100,
p2_720p_30p_native_dvcpro100, p2_720p_24p_native_dvcpro100, p2_720p_50p_-
dvcpro100,
Functions
mxf_tk_API bool BuildP2XML (const char ∗path, p2_format format)
mxf_tk_API bool BuildP2XMLBuer (I_mxf_le ∗le, const char ∗clip_name, size_t
∗buer_size, unsigned char ∗buer, p2_format format)
mxf_tk_API bool CancelNewP2Shot (uint32_t id)
mxf_tk_API bool FreeOpAtomAssemblerInterface (I_opatom_assembler ∗∗)
mxf_tk_API bool FreeOpAtomFileInterface (I_opatom_le ∗∗)
mxf_tk_API p2_format GetP2Format (const char ∗xml_lename)
mxf_tk_API bool NewDCPOpAtomFileInterface (I_opatom_le ∗∗, const char ∗)
mxf_tk_API bool NewDCPOpAtomStreamInterface (I_opatom_le ∗∗, I_output_mxf_-
stream_task ∗)
Enumerator:
p2_unknown Unknown P2 format. Use this when the format is unknown, the toolkit will
try its best to resolve it.
Note:
This P2 XML clip le is stored in the Clip directory. You do not need to call this function if
you already have the XML le. The rst use of this function is to rebuild the XML clip le
after performing a partial restore on a set of P2 les.
Warning:
The P2 le provided should be in the "Contents/Video" directory structure and all its asso-
ciated audio les should be in ntents/Audio as well.
Parameters:
← path This should contain the complete path to this P2 le and it should be in its P2
directory structure (Contents/Video) and all its associated audio les must be in their
directory (Contents/Audio).
← format This parameter should be set to build an XML le corresponding to the P2 format
selected
Returns:
true if the function operated successfully.
See also:
p2_format, BuildP2XMLBuer
Build the P2 XML clip from the specied le. The P2 XML buer should be ushed in the Clip
directory.
Parameters:
← le The P2 MXF le (already linked to its associated P2 les thanks to opatom_-
assembler)
Returns:
true if the function operated successfully.
Note:
This function is similar to BuildP2XML however it is convenient when you do not have access
to the on-disk P2 les.
See also:
p2_format, BuildP2XML
Warning:
id You must still call WaitEndNewP2Shot() to terminate correctly the thread.
Parameters:
← id The process ID
Returns:
the P2 format from an XML le (in the Clip directory)
Parameters:
← xml_lename The lename of the XML le.
Retrieves an I_opatom_le interface whose ush will be performed in streaming mode. I_-
opatom_le∗∗ pointer to the newly allocated object DCP is a constraint to OpAtom. You won't be
able to change the parameters of the le. The streaming interface you provide SHALL implement
the interfaces in order to seek in the output MXF stream. const char∗ path to the mxf le to be
written. Call to ush() will eectively cause the on-disk writing of the le(s).
Retrieves an I_opatom_le interface whose ush will be performed in streaming mode. I_-
opatom_le∗∗ pointer to the newly allocated object const char∗ path to the mxf le to be written.
Call to ush() will eectively cause the on-disk writing of the le(s).
Parameters:
← inputs The list of input les to be MXF wrapped (the rst le must be the video (DVCPro,
AVC-Intra), followed by 2 or 4 AES les).
Returns:
A unique identier associated with this shot. This value can be used as parameter to WaitEnd-
NewP2Shot(), CancelNewP2Shot() and ProgressNewP2Shot(). It is zero when this function
failed.
Warning:
You should call WaitEndNewP2Shot() after calling this function to make sure the process is
completed.
This function lets you ll a P2 "Contents" directory with MXF P2 les similar to the ones the
P2 Camcorder would produce. The rst ve parameters are the streaming interface you should
derive to provide an implementation to control your input streaming device. It should handle
video stream (DVCPro, AVC-Intra) and 2 or 4 AES streams. If only 2 AES streams are being
manipulated then the fourth and fth I_essence_stream_task∗ should be set to NULL.
Parameters:
← video The video stream (DVCPro, AVC-Intra).
← audio1 AES audio stream #1.
← audio2 AES audio stream #2.
← audio3 AES audio stream #3.
← audio4 AES audio stream #4.
← path The complete path toward the output "Contents" directory
← basename The basename for this shot (that will be used name the MXF les). It should
be EXACTLY 6 characters long (+ not counted)
Returns:
A unique identier associated with this shot. This value can be used as parameter to Wai-
tEndNewP2Shot, CancelNewP2Shot and ProgressNewP2Shot. It is zero when this function
failed.
Note:
In ACTIVE MODE, use P2WaitingStream(), P2WriteStream() and P2EndOfStream() to nd
out which task is expected to be writing next.
Warning:
You should call WaitEndNewP2Shot() after calling this function to make sure the process is
completed.
This function must be called once all the essence data of the stream has been written for the P2
creation process with the specied id.
Warning:
This function is only called in ACTIVE mode.
Parameters:
← id The process ID
← task The task of the stream being written to. This is the task returned by
P2WaitingStream(). Pass NULL to terminate all all stream tasks.
← stream_id The id of the stream being written to. This is the stream id returned by
P2WaitingStream().
Parameters:
← id The process ID
← task The task of the waiting stream if it exists.
See also:
I_mxf_le::waiting_stream
Write the essence data out in ACTIVE mode for the P2 creation process with the specied id.
Parameters:
← id The process ID.
← task The task of the stream being written to.
← stream_id The id of the stream being written to. This is the stream id returned by
P2WaitingStream().
Returns:
The number of bytes actually written.
Parameters:
← id The process ID
Returns:
a value ranging from 0.0 to 1.0 when successful, a negative value when the progress could not
be computed
Parameters:
← id The process ID
17.9 Material
Classes
class I_dm_segment
class I_dm_source_clip
class I_source_clip
Functions
mxf_tk_API I_dm_segment ∗ dm_segment_cast (I_track_item ∗)
mxf_tk_API I_dm_source_clip ∗ dm_source_clip_cast (I_track_item ∗)
mxf_tk_API I_source_clip ∗ source_clip_cast (I_track_item ∗)
On a timeline track (picture, sound, data), only editing information is allowed. Still, a
dierence remains if the track is found in an I_generic_material or in an I_concrete_-
material. In a concrete material the binary data stream is stored, while in a generic material
the concrete materials' tracks are referenced and assembled all together to build an edition.
Editions are represented by a combination of track items. As a result, a timeline track shall
only contain I_source_clip objects. They are adjacent to each other in order to build a
fully time-linear track representing a video, sound or data play out. I_source_clip may not
overlap and for the entire duration of the track, one and only one I_source_clip should be
active at a given edit unit.
On an event_metadata track, only metadata describing events occurring as the le is played
is allowed. Consequently, this kind of track shall only contain I_dm_segment. Furthermore,
positioning constraints disappear, these "segments" may overlap and "slices" of the track
may remain empty.
On a static_metadata track, only metadata applying to the entire duration of the linked
essence tracks is allowed. Consequently, this kind of track shall only contain I_dm_segment.
Additionally, these "segments" do not carry time constraints.
MXFTk user does not require a strong knowledge of these properties. The API ensures the
consistency of each material and track. However, the user is responsible for the choice of the
appropriate track to be created when adding metadata. Therefore, it is recommended to keep in
mind the dierences between timeline_metadata, event_metadata and static_metadata tracks.
The I_track_item class and its three possible derivations are described hereafter. The type of an
I_track_item instance can be determined by performing a dynamic cast thanks to the following
functions (for stability reasons, no direct calls to dynamic_cast shall be performed on MXFTk
interfaces). Failure to do so would systematically lead to MXFTk's data structures corruption.
Returns:
NULL when trying to cast in the wrong type.
Warning:
Do not use dynamic_cast on a track_item pointer in your code! Failure to do so may result
in crash.
Returns:
NULL when trying to cast in the wrong type.
Warning:
Do not use dynamic_cast on a track_item pointer in your code! Failure to do so may result
in crash.
Returns:
NULL when trying to cast in the wrong type.
Warning:
Do not use dynamic_cast on a track_item pointer in your code! Failure to do so may result
in crash.
Denes
mxf_tk_API bool FreeRationalInterface(rational ∗∗)
mxf_tk_API bool NewRationalInterface(rational ∗∗r, uint32_t numerator, uint32_t de-
nominator)
Enumerations
enum mxftk_option_ag { MXFTK_NO_OPTION = 0x0000, MXFTK_OPTION_AVID
= 0x0001, MXFTK_OPTION_AVID_AMT = 0x0002 }
Functions
mxf_tk_API bool CloseMXF_TK (void)
mxf_tk_API void ExtractAes8ToWave (bool)
mxf_tk_API void ExtractAesToWave (bool)
mxf_tk_API void ExtractCustomByKLV (bool)
mxf_tk_API void ForceRF64 (bool)
mxf_tk_API void FreeCharArray (char ∗∗array, uint8_t size)
mxf_tk_API bool FreeCryptedLocatorElementInterface (crypted_locator_element
∗∗element)
mxf_tk_API bool FreeCryptedLocatorInterface (crypted_locators ∗∗locator)
mxf_tk_API bool FreeLocatorInterface (locators ∗∗location_list)
mxf_tk_API bool FreeMxfFileListInterface (mxf_le_list ∗∗le_list)
mxf_tk_API bool FreeTrackListInterface (track_list ∗∗tracks)
mxf_tk_API bool GetEmptyCryptedLocatorInterface (crypted_locators ∗∗locator)
mxf_tk_API bool GetEmptyLocatorInterface (locators ∗∗location_list)
mxf_tk_API bool GetEmptyMxfFileListInterface (mxf_le_list ∗∗le_list)
mxf_tk_API bool GetEmptyTrackListInterface (track_list ∗∗tracks)
mxf_tk_API uint32_t GetOptions ()
mxf_tk_API const char ∗ GetVersion (void)
Returns:
false is the deallocation failed.
Parameters:
→ r A rational ∗ pointer to the allocated object.
← numerator Denes the numerator value.
← denominator Denes the denominator value.
Returns:
false is the allocation failed.
List of all possible MFTk option ags. This is used for Avid OP Atom management.
See also:
GetOptions
Enumerator:
MXFTK_NO_OPTION If this ag is set, there is no support of Avid OpAtom.
MXFTK_OPTION_AVID If this ag is set, Avid OpAtom is supported using the
default OpenCube implementation.
Close MXF_TK after any process. This function must be the last one to be called after us-
ing MXF_TK interfaces. Each call to this method must match a call to InitMXF_TK() or
to InitMXF_TK2(). Only the last call matching call will actually have an eect and unitialize
MXFTk.
Returns:
true is the function succeeded.
Denes the MXFTk behavior for 8-channel AES3 audio tracks. When set to true, the 8-channel
AES (D10) sources embedded in an MXF le will be extracted as 8-channel WAVE. Default value
is false.
Denes the MXFTk behavior for AES3 audio tracks. When set to true, the AES3 (mono or stereo)
sources embedded in an MXF le will be extracted as WAVE. Default value is false.
Use this function to set the essence extraction behavior when performing MXF unwrapping of
custom wrapped MXF les (i.e. XDCam proxy). When set to false (default) the essence is
extracted edit unit by edit unit. When set to true, the extraction is performed KLV by KLV and
each KLV will contain several edit units. The KLV mode is likely to improve performances.
Denes the MXFTk behavior for WAVE audio tracks. When set to true, the WAVE (mono or
stereo) sources embedded in an MXF le will be extracted as RF64 WAVE les. Default value is
false.
Parameters:
← array The array to delete.
← size The size of the array to delete.
Parameters:
↔ element The crypted_locator_element to release.
Returns:
false if the deallocation failed.
Parameters:
↔ locator The locator list to release.
Returns:
false if the deallocation failed.
Parameters:
↔ location_list The allocated location list to free.
Returns:
false is the deallocation failed.
Parameters:
↔ le_list An I_mxf_le_list ∗ pointer to the empty list.
Returns:
false is the deallocation failed.
Parameters:
↔ tracks A track_list ∗ point to the track_list to free.
Returns:
false is the deallocation failed.
Retrieves an empty list of crypted locators. Locators of crypted elements can be added to this list
using the function crypted_locators::add().
Parameters:
→ locator The empty locator list allocated.
Returns:
false if the allocation failed.
Parameters:
→ location_list The allocated location list.
Returns:
false is the allocation failed.
Parameters:
→ le_list An I_mxf_le_list ∗ pointer to the empty list.
Returns:
false is the allocation failed.
Parameters:
→ tracks A track_list ∗ point to the allocated track_list.
Returns:
false is the allocation failed.
Returns:
This is OR's combination of mxftk_option_ag ags.
Returns:
a string containing the version number. The returned value is owned by MXFTk and shall
not be deleted.
This function initializes the API MXFTk. Any binary making use of the library should always
call it rst of all. It prepares the API to be ready to perform future tasks. This function will
also validate your license key and the environment variable MXF_HOME should be correctly set
before calling this function. Refer to the Installation Procedure section for more information.
Warning:
This function should ALWAYS be the rst one to be called before using MXF_TK interfaces.
Failure to do so will cause erratic results.
Note:
This method may be called several times. Successive calls have no eect and will succeed.
Each calls to this function must be match by a call to CloseMXF_TK().
Returns:
true is the function succeeded.
See also:
InitMXF_TK()
Note:
This method may be called several times. Successive calls have no eect and will succeed.
Each calls to this function must be match by a call to CloseMXF_TK().
Parameters:
← path The complete path toward the directory containing the MXFTk library.
Returns:
true is the function succeeded.
Parameters:
→ element The allocated crypted_locator_element.
← path The complete path toward the le to be wrapped.
← oset The plain-text oset.
← public_key The public cryptographic key
← cipher_key The private cipher key to be used for the encryption of this source le
Returns:
false if the allocation failed.
Note:
cipher_key is the key used to crypt data, this key is not stored in mxf le. Lengths of both
cryptographic_key_id and cipher_key are 16 bytes.
Set internal buers size. Call this function to override the default settings and reduce/increase
memory usage.
Returns:
true is the function succeeded.
This function species a new metadata dictionary (XML scheme) to be used in the following calls
of the API. The default dictionary is set upon calling of InitMXF_TK() or InitMXF_TK2() so
you will need to call this function only if you wish to make use of an alternate scheme.
Parameters:
← path The complete path to the XML dictionary.
Returns:
true is the function succeeded.
Denes the MXFTk behavior for WAVE audio tracks. When set to true, the WAVE (mono or
stereo) sources embedded in an MXF le will be wrapped as AES audio data. Default value is
false.
Denes the MXFTk behavior for WAVE audio tracks. When set to true, the WAVE (up to
8 channels) sources embedded in an MXF le will be wrapped as 8-channel AES audio data.
Default value is false.
Class Documentation
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_concrete_material ∗ pointer to the element.
Returns:
The number of elements.
Return the plain text oset. The frames wrapped within an MXF le are not necessarily entirely
crypted. The beginning of the frame might remain not crypted and the end crypted. The plaintext
oset (measured in bytes) corresponds to the start of the crypted data within a frame.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_mxf_error ∗ pointer to the element.
Returns:
The number of elements.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_generic_material ∗ pointer to the element.
Returns:
The number of elements.
I_mxf_file
I_opatom_file
I_avid_opatom_file
I_mxf_file
I_opatom_file
I_avid_opatom_file
I_generic_material
I_concrete_material
I_generic_material
I_concrete_material
Related Functions
(Note that these are not member functions.)
See also:
The Concrete Material section for more details.
Computes the duration of this concrete material. After calling this function, the tracks will have
a correct duration. You can use this function when wrapping MXF les and when you need to
know the duration before ushing the MXF le.
Note:
Use this function if you need to know the duration of your material before attaching it to
an MXF le. It will force the computation of the duration of the tracks from this material.
However, be aware that this task may be time-consuming. This function must be called before
attaching the material to an instance of I_mxf_le. This function will be inactive when the
input is a stream or while reading MXF les.
Returns:
the computed duration.
Warning:
This function will operate in streaming mode only!
States that an audiovisual data stream is now closed. This function will be operative only if this
material was created using NewStreamMaterialInterface(). After end_of_stream(), future calls
to the write() function on this stream will not operate. Calls to this function should be performed
only within the function I_essence_stream_task::data_request() to notify to MXFTk that no
more data is to be received from the stream.
Parameters:
← id The unique identier of the current stream, also parameter of the function I_essence_-
stream_task::data_request().
Note:
This function must be called once all the essence data of the stream has been written.
Returns:
true if successful.
Note:
This works for MXF le reading and writing.
Make sure the essence for this material is loaded. The essence is only loaded once, implicitly,
usually when rst accessed. This function needs to be called only once.
Returns:
true is successful, false otherwise.
Call this function to attach a system item to the current concrete material. This function is only
available when creating an MXF le. The system item will be deleted upon deletion of the concrete
material interface.
Parameters:
← item A system item pointer to attach
Warning:
It will be used only if the parameter "SYSTEM_ITEM" from the mxf le is set to "True".
The system item will be freed upon deletion of the concrete material.
18.7.2.7 virtual size_t write (unsigned int id, const uint8_t ∗ buer, size_t
buer_size) [pure virtual]
Warning:
This function will operate in streaming mode only!
This function will be operative only if this material was created using NewStreamMaterialInter-
face(). Calls to this function should be performed only within the function I_essence_stream_-
task::data_request. Supplies the current material with a buer originating from an audiovisual
data stream.
Parameters:
← id A unique identier of the current stream, also parameter of the function I_essence_-
stream_task::data_request()
Returns:
the amount of data that could be eectively written. Failure to write all the data usually
means that the internal buer is full and that you are writing faster than MXFTk can read
during a ush operation. Another reason can be that you try to write more than the actual
size of the buer. Concrete material was created using NewStreamMaterialInterface()!
I_track
I_concrete_track
I_track
I_concrete_track
Returns the size in bytes of the current edit unit. This function can be used to set the size of the
buer passed to the function read_eu().
Returns:
0 if all the data for this edit unit has been read or if an error occurred.
Return a meaningful name to represent this track essence. This returns NULL when no meaninful
name can be given.
Return the le extension most commonly associated with this track essence. This returns NULL
when no le extension can be given.
Returns:
true if successful, false otherwise.
Call this function to know if the concrete track is protected by an key. This will notably be the
case when manipulating les following the standard of the Digital Cinema Initiative.
Returns:
the 16-byte long public key protecting the track, otherwise return NULL if the track's content
is not encrypted.
Note:
You need to provide the corresponding cipher key in order to be able to read the content of
this track.
Returns the current edit unit relative to the origin of the track. The real position within the
embedded audiovisual data is actually the sum of the track's origin with this edit unit. For
instance on a video track, if the origin is 5 and the current edit unit 10, when calling read_eu(),
the 15th frame will be read. The legal edit units range is [-track_origin, track_origin+track_-
duration-1].
Returns:
INT64_ERROR if an error occurred.
Returns the current oset in bytes from the beginning of the le.
Returns:
UINT64_ERROR if an error occurred.
Retrieves a list of I_metadata describing the nature and the properties of the track's content.
Usually the list will contain a single item. These properties are specic to each essence type
and can be checked with the MXF File Format glossary [377M]. The descriptors grant access to
properties such as the size or the aspect ratio of images from a video track. Some of the information
found in the descriptors will be redundant with the one provided by get_essence_type().
Returns:
the descriptors of the essence stream of this track. Returns NULL if not found or if an error
occurred. Returned I_metadata interface shouldn't be destroyed by MXF_TK user.
Retrieves an I_essence_type interface describing the type of essence embedded in this concrete
track. MXFTk user can use this function to gure out if the track contains DV, MPEG, D10, etc.
data. When possible it also states if it is a NTSC or PAL source.
Returns:
a structure helping to identify the concrete track's content. The returned pointer must not
be deleted.
Returns a string identifying the original source (the path to the le used to build this track) of the
track's content. This function is only useful when building concrete material from several source
les. The call to this function lets you know which of these les the current track embeds.
Returns:
the locator of the essence stream of this track. The returned pointer must not be deleted.
Returns NULL if an error occurred.
Parameters:
eu The edit unit to locate.
klv_position If the edit unit is valid, the position of the KLV that contains it in the MXF
le.
oset_in_klv If the edit unit is valid, its oset within the KLV. This is meaningful for
clip-wrapped le. For frame-wrapped le, this is zero.
size The size of the edit unit. This is zero when the size is not known yet. This is generally
the case in frame wrapping: the size is known when the edit unit is read.
Returns:
true if the specied edit unit is a valid edit unit, false otherwise.
Fills a buer with the binary audiovisual data contained in this track at the current edit unit.
This function will ll the buer only when reading an MXF le (not while creating one)!
Parameters:
← buer The buer into which the edit unit data will be written.
← buer_size The size of the buer provided
Returns:
How many bytes were eectively read from the track. The current edit unit can be entirely
read through successive calls to this function until it returns a nil value.
Seeks the track content in an absolute way, jumping to a given edit unit.
Parameters:
edit_unit the position along the track. This value will be added to the origin of this track.
Therefore a track with an origin = 5 and a duration = 25 can be accessed with a position
ranging from -5 to 20.
Returns:
true if successful, false otherwise.
Puts the reading pointer of the track on the next edit unit.
Returns:
true if successful, false otherwise.
Puts the reading pointer of the track on the previous edit unit.
Returns:
true if successful, false otherwise.
Puts the reading pointer of the track on the specied timecode value. Timecode information
can be retrieved from the I_timecode_material of the I_concrete_material containing this I_-
concrete_track.
Note:
We recommend usage of timecode for playout synchronization of dierent tracks.
Returns:
true if successful, false otherwise.
Call this function to set the private 16-byte long cipher key corresponding to the public crypto-
graphic key protecting this track. If the key is correct, you will now be able to read the content
of this track.
Note:
This function has no eect on decrypted track
Sets the path to the external reference for this concrete track. Call this function to load the
referenced le when reading an MXF le with external references.
Indicate whether the track concatenates still images, e.g. JPEG2000 or VC-3 (image format vs.
video format).
I_essence_stream_task
I_crypted_essence_stream_task
I_generic_material
I_concrete_material
_conc_mat
I_essence_stream_task
I_crypted_essence_stream_task
wrapping it on-the-y in an MXF le) and should be crypted. MXFTk user is entitled to derive
this class in order to provide an implementation for his streaming device.
Indicate whether the stream with the specied identier must be encrypted or not.
Parameters:
← stream_id The stream identier.
Returns the cipher key. The cipher key is used to crypt data but is not stored in the MXF le.
Decoding is possible by giving the same cipher to the decoder. Cipher key is retrieved from the
cryptographic key id and is provided by the key manager.
Parameters:
← stream_id The stream identier.
Parameters:
← stream_id The stream identier.
Returns the plaintext oset for the stream with the specied identier. This is the oset of the
crypted data within a frame.
Parameters:
← stream_id The stream identier.
I_mxf_file
I_opatom_file
I_dcp1_file
I_mxf_file
I_opatom_file
I_dcp1_file
Related Functions
(Note that these are not member functions.)
Returns a list of picture, sound or data tracks from the material containing the current metadata
track. Metadata from this I_dm_source_clip documents the tracks from this list.
Retrieves the duration of this I_dm_segment (measured in edit units of the track containing this
metadata segment). The sum of the duration of each metadata source clip and metadata segment
denes the total duration of the track. An edit unit is the time unit for the current track. Please
refer to [377M] for further information. The edit rate is the number of edit units per second.
Note that the track containing this metadata source clip may have an edit rate dierent from the
referenced track.
Returns:
-1 if the duration if unknown.
Returns the timecode corresponding to the last edit unit of this metadata segment. This is a
timecode relative to the track containing this metadata segment.
Returns:
NULL if this timecode could not be retrieved.
Returns the I_metadata_material containing the descriptive metadata tree and the time posi-
tioning information for this I_dm_segment.
Returns the timecode corresponding to the rst edit unit of this metadata segment. This is a
timecode relative to the track containing this metadata segment.
Returns:
NULL if this timecode could not be retrieved.
Returns a list of picture, sound or data tracks from the material containing the current metadata
track. Metadata from this I_dm_source_clip documents the tracks from this list.
Retrieves the duration of this I_dm_source_clip (measured in edit units of the track containing
this dm source clip). The sum of the duration of each metadata source clip and metadata segment
denes the total duration of the track. An edit unit is the time unit for the current track. Please
refer to [377M] for further information. The edit rate is the number of edit units per second.
Note that the track containing this metadata source clip may have an edit rate dierent from the
referenced track. Returns -1 if the duration if unknown.
Warning:
If the track containing this source clip has an edit rate dierent from the edit rate of the
referenced track; then start_position + duration != end_position.
Returns the oset of the last edit unit to be read on the referenced track. The oset is relative to
the origin of the referenced track.
Returns:
INT64_ERROR if this information could not be retrieved.
Returns the timecode corresponding to the last edit unit of this metadata source clip. This is a
timecode relative to the track containing this metadata source clip (not relative to the referenced
track).
Returns:
NULL if this timecode could not be retrieved.
Returns a pointer (reference) to the material containing the I_track referenced by get_-
referenced_track().
Returns:
NULL if no material is being referenced or if the material is not in the le. The returned
material can be cast into an I_generic_material if this source clip is in an I_generic_material.
Returns the Unique Material Identier of the referenced material. This function is particularly
useful when get_referenced_track() returns NULL. If the UMID is not nil, it generally means that
the referenced material is stored in another MXF le (this can notably be the case when reading
OpAtom les). Retrieving the UMID of the missing material may help to locate it a database
environment.
Returns a pointer (reference) to the material containing the I_track referenced by get_-
referenced_track().
Returns:
NULL if no material is being referenced or if the material is not in the le. The returned
material can be cast into an I_generic_material if this source clip is in an I_generic_material.
Returns the oset of the rst edit unit to be read on the referenced track. The oset is relative
to the origin of the referenced track.
Returns:
INT64_ERROR if this information could not be retrieved.
Returns the timecode corresponding to the rst edit unit of this metadata source clip. This is a
timecode relative to the track containing this metadata source clip (not relative to the referenced
track).
Returns:
NULL if this timecode could not be retrieved.
I_essence_stream_task
I_crypted_essence_stream_task
I_generic_material
I_concrete_material
_conc_mat
I_essence_stream_task
Constructor
Destructor.
This function is called whenever MXFTk requests data from the stream.
Note:
THIS FUNCTION WILL BE CALLED ONLY IF PASSIVE MODE IS SELECTED.
Parameters:
← stream_id The stream identier (comprised between 0 and get_total_number_of_-
streams() -1 ). It is used to keep a reference on the stream during successive calls
to data_request().
← buer The buer where the data sent to MXFTk should be written.
← buer_size How many bytes are required (and hence ideally this is also the size of the
buer passed.
Returns:
How many bytes have been written in the buer. Return 0 when no more data is to be
received.
Note:
Users of previous MXFTk versions should be careful as it is no longer required to call the
I_concrete_material::write() function to feed MXFTk. This function will be called regularly
upon ushing of the MXF le to notify the user that the ushing process is in wait of data
from the streaming device. A correct implementation should stop the current process using
a mutex as long as the requested data is not available from the stream. Once ready, the data
should be written in the buer provided.
Set the duration of the stream with the specied identier. Return -1 if it cannot be determined.
Parameters:
← stream_id The stream identier.
This function is called before launching the streaming process. Return true if you choose to perform
the streaming task for the specied track in the blocking mode. This mode will be eective only
if you also set the active streaming mode thanks to the function get_passive_mode().
BLOCKING MODE: MXFTk performs no copy of the buer sent by the user. User should
call I_concrete_material::write() in order to feed MXFTk with data. It will return from
the function only once the data has been entirely written. Because there is no buering, the
data must be sent in the exact way it will be wrapped. This means the buers should be
sent frame by frame, one after the other in the order they will be wrapped. The user may
use the function I_mxf_le::waiting_stream() in order to have a guideline to gure out the
order in which it should send the data.
BUFFERING MODE: The data sent to MXFTk is immediately copied and buerized for
later processing. This mode is more convenient to use for the user has it does not need to
care about the order and size of buers he sends to MXFTk. However it may be less ecient
as it requires extra copies of buer.
This function is called before launching the streaming process. The user may use this function
in order to build the audio essence descriptor corresponding to the stream id provided. Most of
the time, you will not need to implement this function as MXFTk is capable to build descriptors
by analyzing the content of the data you will send. However when wrapping essences from which
descriptors cannot be constructed directly from the essence content (Uncompressed raw les, PCM
data without header, etc) user will need to build the descriptors
Parameters:
← stream_id The stream identier.
← descriptor The audio descriptor for the specied stream.
This function is called before launching the streaming process. It gives the opportunity to set the
size of MXFTk's internal buer used to store the data received from the stream. You may dene
a dierent size for each stream id. Depending on your system, changing the buer's size may help
to improve your performances. It is always better to increase the size of the buers in order to
handle throughput variations. This function will be called only once for each stream id, the size
cannot be changed during the streaming process.
Parameters:
← stream_id The stream identier.
Returns:
The size (in bytes) of the buer that MxfTk will use to handle read and write operations on
the stream.
Note:
For performance reason, it is better to set a buer size at least as big as the biggest buer
you will provide during the streaming process.
Warning:
do not reimplement!
This function is called before launching the streaming process. The user may use this function
in order to build the data essence descriptor corresponding to the stream id provided. Most of
the time, you will not need to implement this function as MXFTk is capable to build descriptors
by analyzing the content of the data you will send. However when wrapping essences from which
descriptors cannot be constructed directly from the essence content (Uncompressed raw les, PCM
data without header, etc) user will need to build the descriptors
Parameters:
← stream_id The stream identier.
← descriptor The data descriptor for the specied stream.
You must implement this function if one of the input streams is an MPEG Program Stream or
Transport Stream.
Parameters:
← stream_id Identies the stream.
← sub_mpeg_es_id Identies the "elementary streams" from the MPEG PS or TS. Its
value ranges from 0 to the number of sub-streams set in get_stream_info. There is no
relation between this id and the id of the MPEG ES stored in the MPEG stream.
← source The type of the essence for the specied stream. It can only be ess_mpeg_es or
ess_aes3.
Note:
This function must be implemented if you implemented get_stream_info and some of the
streams include an MPEG Transport Stream or MPEG Program Stream.
PASSIVE MODE: MXFTk calls the function data_request() whenever it requires some data.
You must provide an implementation of the function data_request() in that case and you
should call I_concrete_material::write() only within this function. MXFTk controls the
wrapping and you may send data only when it noties you to do so.
ACTIVE MODE: You can send data to MXFTk whenever you want still using the function
I_concrete_material::write(). You do not need to implement the function data_request()
in that case and you must send the data after calling I_mxf_le::ush().
Returns:
true if you choose to perform the streaming task in passive mode or false if you choose active
mode.
You must implement this function. For performance reasons, MXFTk needs you to specify the
nature of the stream you will send. This function lets you do so.
Parameters:
← stream_id The stream identier.
← source The type of the essence for the specied stream (DV, MPEG, etc... refer to I_-
essence_type for a complete list of possible types).
→ is_video Indicates whether this is a video or an audio stream. However in the case of a
DV stream it is used to know if the audio from the DV should appear as a track in the
MXF le. If set to true, the audio from the DV will be ignored.
→ nb_mpeg_essences Only used when the input stream is a MPEG Program or Transport
Stream. It is used to indicate how many MPEG Elementary Streams they embed.
This function is called before launching the streaming process. It is used to set the total number
of streams that will be embedded on the I_concrete_material being created (just as several les
may be required to build a concrete material).
This function is called before launching the streaming process. The user may use this function
in order to build the video essence descriptor corresponding to the stream id provided. Most of
the time, you will not need to implement this function as MXFTk is capable to build descriptors
by analyzing the content of the data you will send. However when wrapping essences from which
descriptors cannot be constructed directly from the essence content (Uncompressed raw les, PCM
data without header, etc) user will need to build the descriptors to create a valid MXF le.
Parameters:
← stream_id The stream identier.
← descriptor The video descriptor for the specied stream.
Warning:
do not reimplement!
Set the total size in bytes of the stream with the specied identier that will be wrapped. Return
0 if it cannot be determined.
Parameters:
← stream_id The stream identier.
See also:
essence_source.
Returns the aspect ratio of this essence if this information can be retrieved (e.g. 16/9 or 4/3).
Returns:
NULL if the aspect ratio is not dened for this kind of essence or if this information could
not be retrieved. The returned pointer should not be deleted.
Returns:
0 if the bit rate is not dened for this kind of essence or if this information could not be
retrieved.
Returns:
0 if not applicable.
Returns:
0 if the width is not dened for this kind of essence or if this information could not be retrieved.
Returns:
0 if the width is not dened for this kind of essence or if this information could not be retrieved.
Returns the electro spatial formulation if applicable (audio track). Please refer to SMPTE 377M
for further information.
18.14.2.7 virtual locators∗ external_references (bool & url) const [pure virtual]
Returns the list of external references for the concrete track referenced by this essence type ob-
ject.
Parameters:
→ url Indicate whether the returned locators are URLs or not (just textual information).
Returns:
locators if essence is externally referenced. The returned pointer should not be freed.
Returns the frame layout (interlaced, progressive, etc.) if applicable (video track). Please refer to
SMPTE 377M for further information.
Returns the essence format when this data can be retrieved. PAL, NTSC, interlaced, etc.
Returns the sampling rate of this essence if this information can be retrieved (audio track).
Returns:
NULL if the sampling rate is not dened for this kind of essence or if this information could
not be retrieved. Returned pointer should not be deleted.
Returns:
0 if the width is not dened for this kind of essence or if this information could not be retrieved.
Returns:
0 if the width is not dened for this kind of essence or if this information could not be retrieved.
Sets the new location of the externally referenced les. This function is particularly useful for
updating a le when doing a partial restore of an MXF le with external references or when
updating an MXF le with external references that moved.
Parameters:
← url Indicate if the locators are URLs or just textual information.
Returns:
true if successful, false otherwise.
I_mxf_file
I_op1a_file
I_evtr_file
I_mxf_file
I_op1a_file
I_evtr_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Note:
The concrete material that will be added to the evtr le should have been wrapped using the
evtr wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling ush().
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_evtr_le interface. This function must be called when writing an
eVTR le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Note:
The concrete material that will be added to the evtr le should have been wrapped using the
evtr wrapping mode.
Parameters:
← task This is a class derived by MXFTk user to provide its own implementation to feed
the streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_generic_material
See also:
The Material section for more details.
Returns:
true if successful, false otherwise.
Returns:
true if successful, false otherwise.
Parameters:
→ name_size The length of the returned wide string (in bytes).
Returns:
The name as a Unicode UTF16 string. The returned buer must not de deleted. Return
NULL if the material is unnamed.
Note:
On the Linux platform, the size of a wchar_t is 4 bytes. Hence, only 2 bytes of the wchar_t
are eectively used when reading UTF16 strings.
Retrieves an I_timecode_material interface dening the play out timecode of this material.
Returns:
NULL if an error occured. The returned pointer must not be deleted.
Gets the value of the Unique Material IDentier uniquely identifying the current material. The
purpose of this UMID is explained in the I_umid class reference.
Returns:
The UMID. The returned pointer must be deleted using the function FreeUmidInterface().
Returns NULL if an error occured.
Gets the list of descriptive metadata tracks from this material. Each track can be a timeline_-
metadata, an event_metadata or a static_metadata track. Returned tracks can be edited but
must not be destroyed. The list can be freed at any time using free_tracks(). The tracks may be
edited. Returns NULL if an error occured.
Parameters:
type The type of this track, e.g. timeline_metadata, an event_metadata or a static_-
metadata
Returns:
NULL if an error occurred. The returned track will be destroyed upon deletion of the material.
Parameters:
task A class derived by MXFTk user to provide its own implementation to feed MXFTk with
metadata as it is received from the streaming device.
Returns:
NULL if an error occurred. The returned track will be destroyed upon deletion of the material.
Parameters:
← name The string in Unicode UTF16. This pointer can be destroyed after calling this
function.
Returns:
true if successful, false otherwise.
Sets a new timecode material. The previous one (if any) will be automatically destroyed. Within
an I_generic_material, the timecode material must dene a continuous timecode (in other words
there should not be several timecode redenitions within the timecode material) as the output of
an MXF le is meant to be linear. Nonetheless, the timecode material of an I_concrete_material
can be discontinuous. The new I_timecode_material will be freed upon destruction of the current
material.
Returns:
true if successful, false otherwise.
Sets a new Unique Material IDentier for the current material. Older one will be automatically
destroyed. A copy of the UMID is performed upon calling of this function so that the user remains
responsible for the deletion of the I_umid pointer using FreeUmidInterface().
Returns:
true if successful, false otherwise.
Returns a list of tracks representing the audiovisual content. Within an I_generic_material these
tracks dene the le play out. In an I_concrete_material, the I_track should be directly cast into
I_concrete_track∗. Hence, these tracks will hold the embedded audiovisual binary data. Items
of the list must not be destroyed. The list can be freed at any time using free_tracks().
Returns:
NULL if an error occured.
Returns a string categorizing the current material ("Generic Material", "Concrete Material",
"Metadata Material" or "Timecode Material").
Returns:
NULL if an error occured. The returned pointer must not be destroyed.
Destructor.
This function is called by MXFTk whenever some descriptive metadata can be written in the MXF
le being created. It is called when a new partition is created. Therefore, it is mandatory to un-
derstand that the "key" parameters to use eciently this function are HEADER_REPETITION
and PREFERRED_PARTITION_DURATION that can be set thanks to the function I_mxf_-
le:set_parameter(). The larger the partition size, the less often this function update() will be
called. On the contrary, the smaller the partition size, the more often the user will have the oppor-
tunity to update the le. However, increasing the number of partitions in your le may severely
impact the overall performances.
Parameters:
← material The material to be updated.
← track The track to be updated.
← position The current position (in edit units) of this descriptive metadata track. It is
perfectly valid not to add metadata or update the descriptive metadata and to simply
return from this function.
Destructor.
This function is called whenever MXFTk requests data from the MXF stream in order to continue
the unwrapping process. Calls to I_mxf_le::write should be performed once the data is ready. If
the streaming device is not ready, then the current process should be stopped as long as necessary.
When no more data is to be received, an explicit call to I_mxf_le::end_of_stream must be
performed.
Parameters:
bytes_to_read How many bytes the internal buer is waiting for.
This function is called by MXFTk to notify that some data is ready to be read on specic source
clip from the specied track in the specied material.
Parameters:
bytes_to_read The number of bytes to be read (size of the edit unit to be read). The data
can be read with a single call to the function I_source_clip::read_eu. Seek functions
of the source clip should not be used. If your system is not ready to read this data, the
current process should be stopped as long as necessary.
Return the size (in bytes) of the buer that MxfTk will use to handle read and write operations on
the stream. This function is called before launching the streaming process. It gives the opportunity
to set the size of MXFTk's internal buer used to store the data received from the MXF stream.
Depending on your system, changing the buer's size may help to improve performance. This
function will be called only once, the size cannot be changed during the streaming process.
MXFTk calls this function whenever a new header metadata is being decoded.
Parameters:
oset The oset in the stream to reach the beginning of the partition containing this header
metadata.
Parameters:
↔ stop Setting this value to true will force the streaming process to stop immediately.
Returns:
The timecode to reach (relative to the timecode material of the parameter I_generic_-
material) or NULL if the unwrapping process should continue linearly from the current time-
code. It is not possible to seek a timecode that has not been reached so far.
You should implement this function to let MXFTk knows if it is allowed to perform seek operations
on this stream. Allowing seek operations may speed up the decoding process. If the function
returns true, then you must provide your implementation of seekpos_request() and stream_-
size(). The return value of this function cannot be changed during the MXF decoding process.
Note that the update of an MXF le in a streaming environment can only be performed if the
stream is seekable. Hence in that case, this function should return true and you must implement
seekpos_request().
User should implement this function only if the MXF streaming device has the capability to
seek. During a linear streaming process, MXFTk will not call this function. This will occur only
following and explicit seeking request from the user (thanks to the function seek_timecode()).
Parameters:
position The absolute position where the streaming device should seek.
Returns:
The requested position.
Note:
If you choose not to implement this function, seek_timecode() should always return NULL.
This function will be called by MXFTk to retrieve the total size of the stream. Specifying the size
of the stream may speed up the decoding process.
Returns:
0 if this value cannot be evaluated. The correct size of the stream must be retunred when
seekable.
You need to implement this function only if you are performing an update of the MXF le. MXFTk
will call this function regularly while updating the le. This function will be called by MXFTk
when you call the function mxf_le::ush()
Parameters:
← data Data to be written at the current location of the stream
← data_size The size of the data in bytes.
Parameters:
closed If true, the overall structure will not change (no more tracks or materials will be added
or removed for instance) but some values are probably still missing (this is notably the
case for the duration of the tracks).
complete If true, no more updates will occur, the I_mxf_le is entirely valid.
bytes_read The number of bytes read from the MXF streaming device so far.
Returns:
true if you wish to stop the decoding process. This is useful if you are not interested in the
essence and want to stop the process as soon as you found a valid header metadata.
Destructor.
This function is called whenever MXFTk requests data from the MXF stream in order to continue
the partial restore process. If the streaming device is not ready, the current process should be
stopped as long as necessary. When no more data is to be received, an explicit call to I_mxf_-
le::end_of_stream must be performed.
Parameters:
bytes_to_read How many bytes the internal buer is waiting for. Calls to I_mxf_le::write
should be performed once the data is ready.
This function is called before launching the streaming process. It gives the opportunity to set the
size of MXFTk's internal buer used to store the data received from the MXF stream. Depending
on your system, changing the buer's size may help to improve your performances. This function
will be called only once, the size cannot be changed during the streaming process.
You should implement this function to let MXFTk knows if it is allowed to perform seek operations
on this stream. Allowing seek operations is likely to speed up the partial restore process. If
the function returns true, then you must provide your implementation of seekpos_request() and
stream_size(). The return value of this function cannot be changed during the MXF decoding
process.
User should implement this function only if the MXF streaming device has the capability to
seek.
Parameters:
← position The absolute position where the streaming device should seek.
Returns:
This should be the requested position.
This function will be called by MXFTk to retrieve the total size of the stream. If this value cannot
be evaluated, the function should always return 0. Specifying the size of the stream is likely to
speed up the partial restore process. You must return the correct size of the stream if you set it
to be seekable.
Related Functions
(Note that these are not member functions.)
Parameters:
data The pointer to the data. The data is copied by this object, it may be freed after this
method returned.
Adds a property to the current metadata. The content of the property will be copied; therefore
the I_property pointer can be freed after calling this function.
Warning:
if the current metadata already contains a property with the same label it will be destroyed
and replaced by the new one. However, in the case of a property which type is MXF_-
ARRAY_STRONG_REF or MXF_ARRAY_WEAK_REF, the I_metadata interfaces of
the property will be added to those already stored in the current metadata. This mechanism
helps building a tree step-by-step without destroying previously created sub-trees.
Returns:
true if successful, false otherwise.
Returns:
true if successful, false otherwise.
Returns a list referencing all the properties that can be added to the current metadata according
to the dictionary. This function can be used to rapidly retrieve all the possible properties for the
current node of the tree.
Returns:
a copy of the all the properties allowed for this metadata according to the dictionary. This
data MUST be deleted using free_properties(). Returns NULL if an error occured.
Returns:
an empty label ("") if an error occured.
Returns a list referencing all the properties from the current metadata. This is a read-only
structure, meaning that modifying the list or its content will not modify the properties stored
within the current metadata.
Returns:
a copy of the properties of this metadata. The list MUST be deleted using free_properties().
Returns NULL if an error occured.
18.20.2.7 virtual bool output_xml (const char ∗ lename) const [pure virtual]
Outputs an XML representation of the current metadata tree. The XML le will be written at
specied location.
Returns:
true if successful, false otherwise.
Parameters:
← property The property to remove. It is not destroyed; it MUST be freed by MXFTk user.
Warning:
The label of the property is compared to the label of the properties stored within the current
metadata. If a label is matching then the internal property will be entirely destroyed. However
if the property's type is MXF_ARRAY_STRONG_REF or MXF_ARRAY_WEAK_REF
then only referenced I_metadata interfaces will be deleted. This mechanism helps destroying
only some branches of the metadata tree.
Returns:
true if successful, false otherwise.
Frees the specied metadata interface. Branches referenced by this metadata will also be deleted
(freeing the root metadata will delete the entire tree.
Returns:
true if successful, false otherwise.
Parameters:
← label The label identifying the metadata. This label must strictly follow the dictionary
naming convention (domain:property_name) such as "DMS1:SceneFramework" or even
"le_format:Preface" when dealing with structural metadata. The label_c object can
be destroyed after calling this function.
Returns:
true if the allocation succeeded, false otherwise.
Parameters:
← lename The complete path to an XML le describing a metadata tree.
Returns:
true if the allocation succeeded, false otherwise.
Warning:
The XML scheme must eectively match an arborescence structure: no more than one meta-
data can be a root. Failure to do so will invalidate the loading of the tree or lead to hectic
behaviour.
I_generic_material
I_metadata_material
I_generic_material
I_metadata_material
Related Functions
(Note that these are not member functions.)
metadata (such as descriptors from a concrete material or identication sets). Metadata (I_-
metadata) carries a set of properties. A property I_property is dened by a label_c, normalized
and validated thanks to a dictionary, and a value I_value. A label is a char∗ string and a value
is a memory pointer of a given type that can contain metadata (when the pointer is referencing
an I_metadata interface). Using this mechanism of metadata objects referencing other metadata
objects a tree structure can be easily built. Only MXFTk Advanced version will let you attach
descriptive metadata to your MXF les.
See also:
The Metadata Material section for mode details.
Parameters:
→ size The length of the returned string.
Returns:
NULL if an error occured. Returned pointer should not be freed.
Gets the duration of this material in edit units. A negative value means that the duration is
unknown or not applicable (in an m_static metadata material).
Returns:
0x7f if an error occured
Retrieves a reference to the metadata tree embedded in this material (usually root of a frame-
work).
Returns:
a pointer to the metadata tree. It MUST not be deleted but can be edited. Returns NULL
if an error occured.
Returns:
m_error if an error occured.
Gets the oset relative to the origin of the metadata track that contains (or will contain) this
metadata material. A negative value means that this oset is unknown or not applicable (in an
m_static metadata material).
Returns:
0x7f if an error occured.
Note:
User should not free a material already appended to an I_track.
Returns:
true if the deallocation was successful, false otherwise.
Parameters:
← type The type of this metadata.
← metadata The metadata tree to be embedded.
← oset The oset of the targeted metadata track, measured in edit units. Pass -1 to have
MXFTk compute it automatically when possible. Ignored if the type is m_timeline or
m_static.
← duration The duration of the targeted metadata track, measured in edit units. Pass -1 to
have MXFTk compute it automatically when possible. Ignored if the type is m_static.
← comment A string meant to comment this new metadata material. It can be NULL and
can be deleted after calling this function.
Returns:
true if the allocation was successful, false otherwise.
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor
I_mxf_aes3_audio_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor
I_mxf_aes3_audio_essence_descriptor
set_aux_bits_mode
set_block_start_oset
set_channel_status_mode
set_emphasis
set_xed_channel_status_data
set_xed_user_data
set_user_data_mode
Related Functions
(Note that these are not member functions.)
set_aux_bits_mode
set_block_start_oset
set_emphasis
set_xed_user_data
set_user_data_mode
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
I_mxf_anc_data_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
I_mxf_anc_data_essence_descriptor
Related Functions
(Note that these are not member functions.)
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_cdci_picture_essence_descriptor
I_mxf_mpeg2_video_descriptor
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_cdci_picture_essence_descriptor
set_alpha_sample_depth
set_black_ref_level
set_color_range
set_color_siting
set_component_depth
set_horizontal_subsampling
set_padding_bits
set_reversed_byte_order
set_vertical_subsampling
set_white_ref_level
Related Functions
(Note that these are not member functions.)
set_alpha_sample_depth
set_black_ref_level
set_color_range
set_color_siting
set_component_depth
set_horizontal_subsampling
set_padding_bits
set_reversed_byte_order
set_vertical_subsampling
set_white_ref_level
Public Types
enum id
See also:
The MXFTk Error Handling section for more details.
Returns:
NULL if the error message could not be found.
Returns the unique identier of the error as stored in the error dictionary.
Note:
Details on how to properly use it and build a try...catch-like mechanism can be found in the
examples of your installation directory.
See also:
The MXFTk Error Handling section for more details.
Removes all the errors from the stack. The stack will be empty after calling this function, ready
to enlist future errors.
Returns:
true if successful, false otherwise.
Parameters:
← id The thread ID
Returns:
true if successful, false otherwise.
Frees the list of errors returned by get_errors(). It only frees the list, errors remain in the stack.
To remove errors from the stack, use clear() instead.
Parameters:
← elist The error list pointer to free
Returns:
true if successful, false otherwise.
Returns:
an empty list if the stack is empty and a NULL pointer if the list of errors could not be
retrieved.
Set the dictionary le for the error messages. The default dictionary is in English but if you wish
to internationalize your application, you may need to dene dictionaries for other languages.
Error dictionaries must be saved in Unicode UTF16 and their syntax is pretty straightforward:
there should be one error per line and each line must start with the error id bracketed between
two '#' followed by the error message bracketed between '< >'. For instance:
#1002# <Cannot proceed: Trying to add metadata to a picture, sound or data track>
Parameters:
← lename The path toward the dictionary.
See also:
The error_list section for the complete list of errors.
Warning:
The dictionary le should not be larger than 64Kbytes (32K UTF16 characters).
Returns:
true if successful, false otherwise.
Returns:
true if any error was printed out, false otherwise
I_evtr_file
I_xdcam_dv_file
I_op1a_file I_xdcam_hd_file
I_op1b_file I_xdcam_imx_file
I_op1c_file I_xdcam_proxy_file
I_op2a_file
I_op2b_file
I_mxf_file
I_op2c_file
I_op3a_file
I_op3b_file
I_op3c_file
I_avid_opatom_file
I_opatom_file
I_dcp1_file
Related Functions
(Note that these are not member functions.)
Add an audiovisual originating from another MXF le to be externally referenced. When calling
this function the referenced MXF le will be added to the list of external references for this MXF
le. This MXF le will contain a copy of the concrete material but will not embed the audiovisual
material contained in this material. The number of I_concrete_material objects that can be
added to an MXF le depends on its Operational Pattern (see individual subclass for specic
constraints, e.g. I_op1a_le or I_op2a_le). The current material (get_current_generic_-
material) is updated after each call to this function.
Note:
This method is not available when the MXF le is being read.
Parameters:
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the MXF le
will be created.
Returns:
true if successful, false otherwise.
Add an audiovisual material to embed in the MXF le. The number of I_concrete_material
objects that can be added to an MXF le depends on its Operational Pattern (see individual
subclass for specic constraints, e.g. I_op1a_le or I_op2a_le). The current material (get_-
current_generic_material) is updated after each call to this function.
Note:
This method is not available when the MXF le is being read.
Returns:
true if successful, false otherwise.
Calls this function to cancel the current le process. If streaming, this stops the streaming pro-
cess. This also cancels the ush thread currently running, if any. In the last case, the cancellation
is asynchronous so you must still call wait_end_ush_thread()to terminate properly the pro-
cess.
Returns:
true if successful.
Returns the embedded materials of this le. These materials contain essence data to be read. (In
MXF terms, Top Level Source Package)
Note:
The list can be freed at any time using free_concrete_list().
Returns:
NULL if an error occurred.
This function will operate in mxf input streaming mode only! This function must be called once
the mxf stream is closed.
Returns:
true if successful, false otherwise.
If this I_mxf_le was opened for writing, the call to this function will cause the creation of the
mxf le (on the disk or on a stream). A thread will be created so the ush will not be completed
when returning for this function. You should call mxf_le::wait_end_ush_thread and wait for
its termination.
Warning:
TO PREVIOUS VERSIONS USERS:
This function is now threaded! Read carefully to what is written above.
Returns:
true if successful.
Creates the mxf le. This ush lets you specify the name of the mxf le being generated.
Returns:
true if successful.
See also:
ush()
Creates the mxf le. This ush lets you specify the streaming task that will handle the output
stream. MxfTk user should provide its own implemetation of I_output_mxf_stream_task.
Returns:
true if successful.
See also:
ush()
Deprecated
This method has been deprecated and replaced by cancel().
Returns:
The id of the ush thread
This function returns the current progress of the process: 0.0 -> beginning / 1.0 -> end. / <0 ->
progress cannot be computed.
Warning:
You should not free the I_mxf_le interface as long as the process is not completed.
Returns:
true if successful.
Parameters:
← c_list A pointer to the concrete_list to free.
Returns:
true if successful
Parameters:
← g_list A pointer to the generic_list to free.
Returns:
true if successful.
See also:
get_identications()
Returns:
true if successful.
Return the generic material that was created when calling add_material(), add_external_-
material(), set_material().
Returns:
the generic material. Returns NULL when no material was called.
Returns the Preface set's metadata. Version, embedded essences and descriptive metadata types
are properties of this preface descriptor.
See also:
MXF File Format glossary [377M] for a complete overview of its properties.
get_identications()
Returns:
NULL if an error occurred.
Parameters:
← parameter The parameter identier to retrieve.
See also:
set_parameter()
Returns:
NULL if an error occurred or the string "unknown" if this parameter can not be retrieved.
Returns:
NULL if an error occurred.
Indicate whether the le contains at least one external essences or not.
Returns the low level materials of this le (usually none) In MXF terms (Low Level Source Package)
These packages are provided for expert end-users and do not contain essence data.
Note:
The list can be freed at any time using free_generic_list(). Returns NULL if an error occurred.
Returns the XML le embedded within the MXF le (if any). This function is used to retrieve
the XML data found in SONY XDCam les. Most of MXF les do not embed this kind of data;
therefore in most cases this function will be inoperative.
Parameters:
← path Path to the output XML le.
Returns:
true if successful.
Returns the XML le embedded within the MXF le (if any). This function is used to retrieve
the XML data found in SONY XDCam les. Most of MXF les do not embed this kind of data;
therefore in most cases this function will be inoperative.
Parameters:
→ size The buer size.
Returns:
A pointer to the buer if successful.
Returns a list of output materials in this le. Gives information on le playout by referencing
data from embedded materials (in MXF terms, Material Package)
Note:
These materials do not embed audiovisual material but instead they reference the I_-
concrete_material returned by embedded_material(). The list can be freed at any time
using free_generic_list()
Returns:
NULL if an error occurred.
18.27.2.25 virtual bool output_xml (const char ∗ path) const [pure virtual]
Dumps the content of the current le's header metadata in an XML le (it includes both descriptive
and structural metadata)
Parameters:
← path Path to the output XML le.
Returns:
true if successful.
Dumps the content of the current le's header metadata in a buer in XML format and sets its
size. The XML buer includes both descriptive and structural metadata.
Parameters:
→ size The buer size.
Returns:
A pointer to the buer if successful.
Set an audiovisual material originating from another MXF le to be externally referenced. This
is a helper for single-material MXF le.
See also:
add_external_material
Note:
This method is not available when the MXF le is being read.
Parameters:
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the MXF le
will be created.
Returns:
true if successful, false otherwise
See also:
add_material
Note:
This method is not available when the MXF le is being read.
Returns:
true if successful, false otherwise
Parameters:
← parameter The parameter whose value changes.
← value The value to assign to the given parameter.
Returns:
true if successful.
This function will return when the ush thread has nished.
Returns:
false if the process was canceled, true otherwise.
When performing an MXF wrapping in active blocking streaming mode, you may use this function
in order to retrieve the task and stream id that the user should send to MXFTk in order to continue
the wrapping process. Do not use this function in active non blocking streaming mode.
Parameters:
→ task Set to the waiting stream task.
→ id Set to the waiting stream id of this stream task.
Returns:
false if no stream is waiting or if mode is dierent.
18.27.2.32 virtual size_t write (const uint8_t ∗ buer, size_t buer_size) [pure
virtual]
Parameters:
← buer The data to be written.
← buer_size The size of the data to be written.
Warning:
This function will operate in mxf input streaming mode only! This object must have been
created using NewMxfStreamInterface()!
Returns:
the amount of data that could be eectively written. Failure to write all usually means that
the internal buer is full and that you are writing faster than MxfTk can read during the le
decoding. Another reason can be that you try to add more than the actual size of the buer.
I_mxf_anc_data_essence_descriptor
I_mxf_generic_data_essence_descriptor I_mxf_vbi_data_essence_descriptor
I_mxf_cdci_picture_essence_descriptor I_mxf_mpeg2_video_descriptor
I_mxf_file_descriptor I_mxf_generic_picture_essence_descriptor
I_mxf_rgba_picture_essence_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor I_mxf_aes3_audio_essence_descriptor
set_container_duration
set_sample_rate
Related Functions
(Note that these are not member functions.)
add_subdescriptor
set_codec_ul
set_container_duration
set_essence_container_ul
set_sample_rate
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
I_mxf_anc_data_essence_descriptor I_mxf_vbi_data_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
Related Functions
(Note that these are not member functions.)
set_data_essence_coding_ul
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_cdci_picture_essence_descriptor I_mxf_rgba_picture_essence_descriptor
I_mxf_mpeg2_video_descriptor
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
set_active_format_descriptor
set_alpha_transparency
set_aspect_ratio
set_display_f2_oset
set_display_height
set_display_width
set_display_x_oset
set_display_y_oset
set_eld_dominance
set_frame_layout
set_image_alignment_oset
set_image_end_oset
set_image_start_oset
set_sampled_height
set_sampled_width
set_sampled_x_oset
set_sampled_y_oset
set_signal_standard
set_stored_f2_oset
set_stored_height
set_stored_width
set_video_line_map
Related Functions
(Note that these are not member functions.)
set_active_format_descriptor
set_alpha_transparency
set_aspect_ratio
set_capture_gamma_ul
set_display_f2_oset
set_display_height
set_display_width
set_display_x_oset
set_display_y_oset
set_eld_dominance
set_frame_layout
set_image_alignment_oset
set_image_end_oset
set_image_start_oset
set_picture_essence_coding_ul
set_sampled_height
set_sampled_width
set_sampled_x_oset
set_sampled_y_oset
set_signal_standard
set_stored_f2_oset
set_stored_height
set_stored_width
set_video_line_map
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor
I_mxf_aes3_audio_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
set_audio_ref_level
set_audio_sampling_rate
set_channel_count
set_dial_norm
set_electro_spatial_formulation
set_locked_unlocked
set_quantization_bits
Related Functions
(Note that these are not member functions.)
set_audio_ref_level
set_audio_sampling_rate
set_channel_count
set_dial_norm
set_electro_spatial_formulation
set_locked_unlocked
set_quantization_bits
set_sound_essence_compression_ul
I_mxf_subdescriptor
I_mxf_jpeg2000_picture_subdescriptor
I_mxf_subdescriptor
I_mxf_jpeg2000_picture_subdescriptor
add_picture_component_sizing
set_c_siz
set_coding_style_default
set_quantization_default
set_r_siz
set_x_siz
set_xo_siz
set_xt_siz
set_xto_siz
set_y_siz
set_yo_siz
set_yt_siz
set_yto_siz
Related Functions
(Note that these are not member functions.)
set_c_siz
set_coding_style_default
set_quantization_default
set_r_siz
set_x_siz
set_xo_siz
set_xt_siz
set_xto_siz
set_y_siz
set_yo_siz
set_yt_siz
set_yto_siz
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_cdci_picture_essence_descriptor
I_mxf_mpeg2_video_descriptor
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_cdci_picture_essence_descriptor
I_mxf_mpeg2_video_descriptor
set_b_picture_count
set_bit_rate
set_closed_gop
set_coded_content_type
set_constant_b_frames
set_identical_gop
set_low_delay
set_max_gop
set_prole_and_level
set_single_sequence
Related Functions
(Note that these are not member functions.)
set_b_picture_count
set_bit_rate
set_closed_gop
set_coded_content_type
set_constant_b_frames
set_identical_gop
set_low_delay
set_max_gop
set_prole_and_level
set_single_sequence
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_rgba_picture_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_picture_essence_descriptor
I_mxf_rgba_picture_essence_descriptor
set_alpha_max_ref
set_alpha_min_ref
set_component_max_ref
set_component_min_ref
set_palette
set_palette_layout
set_pixel_layout
set_scanning_direction
Related Functions
(Note that these are not member functions.)
set_alpha_max_ref
set_alpha_min_ref
set_component_max_ref
set_component_min_ref
set_palette
set_palette_layout
set_pixel_layout
set_scanning_direction
I_mxf_subdescriptor
I_mxf_jpeg2000_picture_subdescriptor
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
I_mxf_vbi_data_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_data_essence_descriptor
I_mxf_vbi_data_essence_descriptor
Related Functions
(Note that these are not member functions.)
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor
I_mxf_aes3_audio_essence_descriptor
I_mxf_file_descriptor
I_mxf_generic_sound_essence_descriptor
I_mxf_wave_audio_essence_descriptor
set_avg_bps
set_block_align
set_peak_channels
set_peak_envelope_block_size
set_peak_envelope_data
set_peak_envelope_format
set_peak_envelope_timestamp
set_peak_envelope_version
set_peak_frames
set_peak_of_peaks_position
set_points_per_peak_value
set_sequence_oset
Related Functions
(Note that these are not member functions.)
set_avg_bps
set_block_align
set_channel_assignment_ul
set_peak_channels
set_peak_envelope_block_size
set_peak_envelope_data
set_peak_envelope_format
set_peak_envelope_timestamp
set_peak_envelope_version
set_peak_frames
set_peak_of_peaks_position
set_points_per_peak_value
set_sequence_oset
I_mxf_file
I_op1a_file
I_mxf_file
I_op1a_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op1a_le interface. This function must be called when writing an
Op1a le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
Retrieves a pointer on an I_op1a_le interface. OpZero les are a specialization of Op1a les
containing a single video or audio track as well as partitioning properties adjusted to enable play
while record. These les are usually recognized by Omneon servers. Note that the concrete
material that will be added to the op1a (opzero) le should have been wrapped using the opzero
wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op1a_le interface. This function must be called when writing an
Op1a le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.). OpZero
les are a specialization of Op1a les containing a single video or audio track as well as partitioning
properties adjusted to enable play while record. These les are usually recognized by Omneon
servers. Note that the concrete material that will be added to the op1a (opzero) le should have
been wrapped using the opzero wrapping mode.
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
I_mxf_file
I_op1b_file
I_mxf_file
I_op1b_file
Related Functions
(Note that these are not member functions.)
∗∗)
mxf_tk_API bool FreeOp1bFileInterface(I_op1b_le
∗∗, const char ∗lename)
mxf_tk_API bool NewOp1bFileInterface(I_op1b_le
mxf_tk_API bool NewOp1bStreamInterface(I_op1b_le ∗∗, I_output_mxf_stream_task
∗task)
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op1b_le interface. This function must be called when writing an
Op1b le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op1c_file
I_mxf_file
I_op1c_file
Related Functions
(Note that these are not member functions.)
tracks that will be played simultaneously. It can be seen as a collection of Op1b les.
Adds the specied concrete track of an audiovisual material originating from another MXF le
to be externally referenced. When calling this function the referenced MXF le will be added to
the list of external references for this Op1c le. The Op1c le will contain a copy of the concrete
material but will not embed the audiovisual material contained in this material. The current
output material will be updated after each call to this function.
Parameters:
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the Op1c le
will be created
Adds the specied concrete track of an audiovisual material that will be embedded in the Op1c
le. The current output material will be updated after each call to this function.
Returns:
true if successful, false otherwise.
Creates a new generic material that will be added to the list of output material. All the following
calls to add_material_track() and add_external_material_track() will add an output track to
the newly created generic material.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op1c_le interface. This function must be called when writing an
Op1c le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op2a_file
I_mxf_file
I_op2a_file
Related Functions
(Note that these are not member functions.)
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op2a_le interface. This function must be called when writing an
Op2a le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op2b_file
I_mxf_file
I_op2b_file
Related Functions
(Note that these are not member functions.)
∗∗)
mxf_tk_API bool FreeOp2bFileInterface(I_op2b_le
∗∗, const char ∗lename)
mxf_tk_API bool NewOp2bFileInterface(I_op2b_le
mxf_tk_API bool NewOp2bStreamInterface(I_op2b_le ∗∗, I_output_mxf_stream_task
∗task)
Notify to MXFTk that the next concrete material added to this le will be in a new set of ganged
material. For instance, in order to create the following Op2b le where A, B, C, D, E and F
designate concrete material you should perform the following calls:
Output Material:
MXFTk calls:
new_multiplexed_material()
add_material(concrete_material, A)
add_material(concrete_material, D)
new_multiplexed_material()
add_material(concrete_material, B)
add_material(concrete_material, E)
new_multiplexed_material()
add_material(concrete_material, C)
add_material(concrete_material, F)
Note:
Each multiplexed concrete material should have the same duration.
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op2b_le interface. This function must be called when writing an
Op2b le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op2c_file
I_mxf_file
I_op2c_file
Related Functions
(Note that these are not member functions.)
Adds an audiovisual material originating from another MXF le to be externally referenced. When
calling this function the referenced MXF le will be added to the list of external references for
this Op2b le. The Op2b le will contain a copy of the concrete material but will not embed the
audiovisual material contained in this material. There is no limit to the number of I_concrete_-
material that can be added to an Op2b le. The current output material will be updated after
each call to this function.
Parameters:
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the Op1a le
will be created.
Returns:
true if successful, false otherwise.
Adds the concrete track of an audiovisual material that will be embedded in the Op2c le. The
current output material will be updated after each call to this function.
Returns:
true if successful, false otherwise.
Creates a new generic material that will be added to the list of output material. All the following
calls to add_material_track() and add_external_material_track() will add an output track to
the newly created generic material.
Returns:
true if successful, false otherwise.
Notify to MXFTk that the next concrete material added to this le will be in a new set of ganged
material. For instance, in order to create the following Op2b le where A, B, C, D, E and F
designate concrete material you should perform the following calls:
Output Material:
MXFTk calls:
new_multiplexed_material()
add_material(concrete_material, A)
add_material(concrete_material, D)
new_multiplexed_material()
add_material(concrete_material, B)
add_material(concrete_material, E)
new_multiplexed_material()
add_material(concrete_material, C)
add_material(concrete_material, F)
Note:
Each multiplexed concrete material should have the same duration.
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op2c_le interface. This function must be called when writing an
Op2c le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op3a_file
I_mxf_file
I_op3a_file
Related Functions
(Note that these are not member functions.)
Adds an audiovisual originating from another MXF le to be externally referenced. When calling
this function the referenced MXF le will be added to the list of external references for this Op3a
le. The Op3a le will contain a copy of the concrete material but will not embed the audiovisual
material contained in this material. There is no limit to the number of I_concrete_material that
can be added to an Op3a le. The current output material will be updated after each call to this
function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the Op1a le
will be created.
Returns:
true if successful, false otherwise.
Adds an audiovisual material to embed in the Op3a le. There is no limit to the number of
I_concrete_material that can be added to an Op3a le. The current output material will be
updated after each call to this function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
Returns:
true if successful, false otherwise.
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op3a_le interface. This function must be called when writing an
Op3a le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op3b_file
I_mxf_file
I_op3b_file
Related Functions
(Note that these are not member functions.)
Adds the concrete track of an audiovisual material originating from another MXF le to be exter-
nally referenced. When calling this function the referenced MXF le will be added to the list of
external references for this Op3b le. The Op3b le will contain a copy of the concrete material
but will not embed the audiovisual material contained in this material. There is no limit to the
number of I_concrete_material that can be added to an Op3b le. The current output material
will be updated after each call to this function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the Op1a le
will be created.
Returns:
true if successful, false otherwise.
Adds the concrete track of an audiovisual material to embed in the Op3b le. It is added to the
current set of multiplexed material. There is no limit to the number of I_concrete_material that
can be added to an Op3b le. The current output material will be updated after each call to this
function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
Returns:
true if successful, false otherwise.
Noties MXFTk that a new track should be created for the current generic material. The next
portions of concrete material's tracks will be added to this new track. For instance, in order to
create the following Op3b le where A, B, C, D, E and F designate concrete material tracks you
should perform the following calls:
Output Material:
MXFTk calls:
new_generic_material_track()
new_generic_material_track()
Note:
the concrete tracks don't need to come from the same concrete material.
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
lename The complete path toward the MXF le to be written upon calling of the ush()
function.
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_op3b_le interface. This function must be called when writing an
Op3b le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op3c_file
I_mxf_file
I_op3c_file
Related Functions
(Note that these are not member functions.)
Adds the concrete track of an audiovisual material originating from another MXF le to be exter-
nally referenced. When calling this function the referenced MXF le will be added to the list of
external references for this Op3c le. The Op3c le will contain a copy of the concrete material
but will not embed the audiovisual material contained in this material. There is no limit to the
number of I_concrete_material that can be added to an Op3c le. The current output material
will be updated after each call to this function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
lename The path toward the referenced MXF le. It can be relative or absolute. However,
you should make sure that the path is correct relatively to the place where the Op1a le
will be created.
Returns:
true if successful, false otherwise.
Adds the concrete track of an audiovisual material to embed in the Op3c le. It is added to the
current set of multiplexed material. There is no limit to the number of I_concrete_material that
can be added to an Op3c le. The current output material will be updated after each call to this
function.
Parameters:
tc_in The start timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the beginning of the concrete material.
tc_out The end timecode of the concrete material's tracks that will be appended to the
generic material. It should be expressed relatively to the time code track of the concrete
material. All the tracks from the concrete material will be considered. If NULL, the
media playout will be from the end of the concrete material.
Returns:
true if successful, false otherwise.
Creates a new generic material that will be added to the list of output material. All the following
calls to new_generic_material_track() will add an output track to the newly created generic
material.
Returns:
true if successful, false otherwise.
Noties MXFTk that a new track should be created for the current generic material. The next
portions of concrete material's tracks will be added to this new track. For instance, in order to
create the following Op3c le where A, B, C, D, E and F designate concrete material tracks you
should perform the following calls:
Output Material:
MXFTk calls:
new_generic_material_track()
new_generic_material_track()
Note:
the concrete tracks don't need to come from the same concrete material.
You should call this function to tell MXFTk if the concrete material added to the le can be
continuously decoded. "Continuous decoding" means that no special processing is required at the
junction of the concrete material being played. The following examples of les do not allow a
continuous decoding:
Two MPEG Long GOP sources cut so that a MPEG decoder will not be able to decode some
of the frames.
Returns:
true if successful, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Retrieves a pointer on an I_op3c_le interface. This function must be called when writing an
Op3c le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Parameters:
task This is a class derived by MXFTk user to provide its own implementation to feed the
streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
This function parallelizes many op_atom les so that their embedded essence are meant to be
played together.
Parameters:
← list A mxf_le_list pointer
Warning:
The user should provide a list of I_opatom_le that share the same editing. The call to this
function will ensure the correct linkage between I_concrete_material of each OpAtom le. It
enables the I_generic_material of each le to access seamlessly all the I_concrete_material
as if they were in the same le. For instance let's assume we have two OpAtom_1b les and
that the I_generic_material from le1 uses the video track stored in the I_concrete_material
of le2. Before synchronization, the le1 has no reference on the le2 and therefore its I_-
generic_material can not playback the video. However after synchronizing both les, the
same I_generic_material from le1 will become able to playback the video. You may refer to
the example "opatom_unwrapper" that provides a sample code for synchronizing any editing
of OpAtom les. Trying to synchronize les that are not related will cause an error.
Returns:
true if successful
See also:
mxf_le_list, serialize
This function parallelizes two op_atom les so that their embedded essence are meant to be played
together. This is an associative function -> if le1 is parallelized with le2 and le1 is parallelized
with le3 then le2 and le3 are automatically parallelized.
Parameters:
← le_1 A pointer the the rst I_opatom_le to parallelize
Returns:
true if successful
This function serializes two op_atom les so that their embedded essence will be played consecu-
tively on the same track.
Parameters:
← le_1 A pointer the the rst I_opatom_le to serialize
Returns:
true if successful
See also:
mxf_le_list, parallelize
Note:
If we dene + as the symbol for calling the serialize() function, then le1+le2 and then
le2+le3 will cause the three OpAtom les to be played in a sequence le1->le2->le3.
Once two OpAtom les are serialized they share the same I_generic_material and represent
the same editing. Similarly, doing le1+le2 and le1+le3 and then nally le1+le4 will
cause the four les to be played in a sequence and share the same I_generic_material. When
serializing les you must ensure that their I_generic_material share the same track structure
(i.e. you can not serialize a video-only OpAtom le with a sound-only OpAtom le). The
generic material of each OpAtom les being serialized must contain exactly the same number
of video track, audio track, data track and metadata track.
Remarks:
We provide here an example of editing with OpAtom les. You may also refer to the example
"opatom_wrapper" from your installation directory.
Performing:
Audio_le1//Video_le2 then,
Audio_le3//Video_le4 then,
Audio_le1+Audio_le3
Audio Track: embedded audio from le1 followed by embedded audio from le2.
Video Track: embedded video from le2 followed by embedded video from le4.
It corresponds to the editing of an operational pattern 2b. Therefore the four OpAtom les
are OpAtom_2b les sharing the same generic material.
Furthermore performing :
Audio_le1+Audio_le3 then,
Video_le2+Video_le4 then,
Audio_le1//Video_le2
This function synchronizes several opatom les that were created together. In order to get the full
fonctionality from the opatom structure, you should call this function rst before manipulating
each le individually.
Parameters:
← list A mxf_le_list pointer
Returns:
true if successful.
I_mxf_file
I_opatom_file
I_avid_opatom_file I_dcp1_file
I_mxf_file
I_opatom_file
Returns the umid uniquely identifying the essence embedded in this opatom. Returned pointer
must be destroyed by the API user (FreeUmidInterface).
Returns:
NULL if an error occurred.
Destructor.
This function is called by MXFTk to notify that its internal output buer is lled and that the
MXF data is ready to be sent to the streaming device.
Parameters:
← buer A pointer on the MXF buer. This is NULL when the end of the MXF stream has
been reached and no more data will be sent. MXFTk user should not free this buer!
Note:
After exiting this function, MXFTk always assume that all the data was read. Therefore, if
your streaming device is not ready to receive this data you should make use of a mutex to
stop the current process as long as necessary.
This function is called by MXFTk to know if it will be allowed to seek in the output MXF
stream.
Note:
When wrapping an OpZero MXF le, it is mandatory to set the stream as seekable or the
creation of the le will be impossible. Other types of MXF les do not necessarily require a
seekable stream but allowing seek operations can help to produce closed and complete MXF
les.
This function will be called whenever the API requires to move to a new location on the mxf
stream. Implement this function if you dened the stream as seekable. Reimplement this function
if you are creating an OpZero le.
Parameters:
← position The absolute seek position from the beginning of the stream.
Returns:
the new location (should be equal to the input parameter).
Related Functions
(Note that these are not member functions.)
Frees metadata list returned by get_dic_metatada_sets. Returns true if successful, false other-
wise.
Returns a list of all the possible metadata sets that can be used has a value of this property. If
the property is not a set, the list will be empty.
Returns:
the list of metadata sets. This data MUST be deleted using free_metadata_sets(). Returns
NULL if an error occured.
Returns:
"" if an error occured.
Helper method to get the item at the specied index in an array value.
See also:
get_value.
See also:
get_value.
Returns:
NULL if an error occured.
See also:
get_value.
Frees an I_property interface. The I_value interface that was used to create this property (I_-
value parameter of NewPropertyInterface()) is not destroyed upon calling of this function. It is
the API user responsibility to free it using FreeValueInterface(). Returns false if the deallocation
failed.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
← label A label identifying the metadata according to the naming convention of the dictio-
nary (DMS1:ClipFramework for instance).
← value A reference to the property's value. This one should not be destroyed as long as
the new property has not been deleted.
Returns:
true if the allocation succeeded, false otherwise.
Returns the size of the current edit unit from the referenced track. This function can be called to
set the size of the buer used when calling read_eu().
Returns:
UINT64_ERROR if the size is unknown (usually when the current edit unit is not valid).
Returns the current edit unit oset relative to the origin of the referenced track (not relative to
the origin of the track containing this source clip).
Returns:
INT64_ERROR if the current edit unit is invalid. The returned value is comprised between
get_start_position() and get_end_position().
Returns the timecode corresponding to the current edit unit. This is a timecode relative to the
track containing this source clip (not relative to the referenced track).
Returns:
The current timecode. It is always comprised between get_start_timecode() and get_end_-
timecode(). The returned pointer must be deleted by MXFTk user. Return NULL if the
current timecode could not be retrieved.
Retrieves the duration of this I_source_clip (measured in edit units of the track containing this
source clip). The sum of the duration of each source clip denes the total duration of the track.
An edit unit is the time unit for the current track (usually a frame or a eld for a video track).
Please refer to [377M] for further information. The edit rate is the number of edit units per second.
Note that the track containing the source clip may have an edit rate dierent from the referenced
track. Returns -1 if the duration if unknown.
Warning:
If the track containing this source clip has an edit rate dierent from the edit rate of the
referenced track; then start_position + duration != end_position.
Returns the oset of the last edit unit to be read on the referenced track. The oset is relative to
the origin of the referenced track.
Returns:
INT64_ERROR if this information could not be retrieved (notably if the duration of the
source clip is unknown).
Returns the timecode corresponding to the last edit unit of this source clip. This is a timecode
relative to the track containing this source clip (not relative to the referenced track).
Returns:
NULL if this timecode could not be retrieved.
Returns a pointer (reference) to the material containing the I_track referenced by get_-
referenced_track().
Returns:
NULL if no material is being referenced or if the material is not in the le. The returned
material can be cast into an I_concrete_material if this source clip is in an I_generic_-
material.
Returns the Unique Material Identier of the referenced material. This function is particularly
useful when get_referenced_track() returns NULL. If the UMID is not nil, it generally means that
the referenced material is stored in another MXF le (this can notably be the case when reading
OpAtom les). Retrieving the UMID of the missing material may help to locate it in a database
environment.
Returns a pointer (reference) to the track containing the audiovisual source to be edited on the
current track.
Returns:
NULL if no track is being referenced or if the referenced material is not in the le. The
returned track can be cast into an I_concrete_track if this source clip is in an I_generic_-
material.
Returns the oset of the rst edit unit to be read on the referenced track. The oset is relative
to the origin of the referenced track.
Returns:
INT64_ERROR if this information could not be retrieved.
Returns the timecode corresponding to the rst edit unit of this source clip. This is a timecode
relative to the track containing this source clip (not relative to the referenced track).
Returns:
NULL if this timecode could not be retrieved.
Reads the data from the current edit unit and stores it in the specied buer.
Parameters:
← buer The buer into which the edit unit will be written.
← buer_size The size of the buer. Usually, this is set to the size returned by current_-
eu_size(). However, the reading of an edit unit can be split in several calls to read_eu()
with smaller buer sizes if required. For instance if current_eu_size() returns a size of
200000 bytes. Calling read_eu(buer, 200000) or calling twice read_eu(buer, 100000)
will retrieve all the data from the current edit unit.
Returns:
the number of bytes eectively written.
Seeks a given edit unit to be read on the referenced track. The edit unit must be comprised
between get_start_position() and get_end_position().
Returns:
true if successful, false if the edit unit can not be reached.
Returns:
true if succcessful, false if the edit unit can not be reached.
Returns:
true if succcessful, false if the edit unit can not be reached.
Related Functions
(Note that these are not member functions.)
Call this function when creating a system item congured in "predened timecode" mode. This
function appends a timecode component to the timecode components already set. This mechanism
lets you create discontinuous timecodes however the timecode components you provide do not
necessarily need to dene a discontinuity. For performance reason it is better to call this function
before writing the frame with the corresponding timecode.
Call this function when reading the system item of an I_mxf_le. It will return the timecode
corresponding to the specied edit unit. Contrary to timecode material from the header metadata,
accessing the timecode from the system item requires to parse the essences contained in the le
and may be more time-consuming.
Parameters:
edit_unit The edit number.
Returns:
the timecode for the corresponding edit unit. Returns NULL if there's no timecode on this
system item. The returned timecode must be freed by the user using FreeTimecodeInterface();
This function will be called when creating a system item congured in "timecode generator" mode.
Parameters:
edit_unit The edit number from the video track of the concrete material.
See also:
use_timecode_generator
Call this function when creating a system item. This function must be called before calling the
function append_timecode_component. The predened mode lets you denes the system item as
a series of timecode components. Note that in streaming mode all the timecode components do
not need to be set before launching the process. However, if you fail to provide the timecode of
each frame in time this may degrade the performances.
Call this function so that the timecode from the system item remains the same as the one from
the I_timecode_material attached to the current I_concrete_material.
Returns:
true is the deallocation succeeded, false otherwise.
Warning:
User must not free a system item already attached to an I_concrete_material.
Returns:
true is the allocation succeeded, false otherwise.
Related Functions
(Note that these are not member functions.)
Returns:
true if successful, false otherwise.
Returns:
-1 if this timecode is less than the specied timecode, 0 if the timecodes are equal, +1 if this
timecode is greater than the specied timecode.
Returns the frame digits of this timecode. If timecode is 05:25:13:24 it will return 24.
Returns the timecode value as a number of frames elapsed from timecode 00:00:00:00. For in-
stance, if the timecode value is 00:02:10:14 and the frame rate is 25, the returned value will be
2∗60∗25+10∗25+14+1 = 3265.
Returns:
0 if an error occured.
Returns the hour digits of this timecode. If timecode is 05:25:13:24 it will return 5.
Returns the minute digits of this timecode. If timecode is 05:25:13:24 it will return 25.
Return the second digits of this timecode. If timecode is 05:25:13:24 it will return 13.
Returns:
The timecode is output using the HH:MM:SS:FF format. The returned pointer must not be
deleted. Returns NULL if an error occured.
Indicate whether this timecode is greater than the specied timecode or not.
Returns:
true if successful, false otherwise.
Returns:
true if successful, false otherwise.
Indicate whether this timecode is smaller than the specied timecode or not.
Returns:
true if successful, false otherwise.
Returns:
true if the copy succeeded, false otherwise.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
value The value of the time as a string using the HH:MM:SS:FF format (for instance
"00:08:15:04")
Returns:
true if the allocation succeeded, false otherwise.
Parameters:
hours The number of hours for this timecode.
minutes The number of minutes for this timecode.
seconds The number of seconds for this timecode.
frames The frame value of this timecode.
frame_rate The frame rate of this timecode.
drop_frame Indicate whether this is a drop frame timecode or not (drop frame timecode
is∗ only allowed with 25, 30 or 60 frames per second).
Returns:
true if the allocation succeeded, false otherwise.
Related Functions
(Note that these are not member functions.)
See also:
The Timecode Material section for mode details.
Gets the duration of the current I_timecode_component measured in edit units of the I_-
timecode_material it belongs to.
Returns:
The returned pointer must not be deleted.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
timecode The timecode.
duration The timecode duration, measured in edit units of the targeted timecode material.
Returns:
true if the allocation succeeded, false otherwise.
Destructor.
Parameters:
edit_unit The edit number from the video track of the concrete material.
Returns:
The timecode corresponding to the specied edit unit. Return NULL if no timecode is to be
written in the system item. The returned timecode will be automatically freed by MXFTk.
I_generic_material
I_timecode_material
I_generic_material
I_timecode_material
Related Functions
(Note that these are not member functions.)
Note:
Each timecode component holds a starting timecode value and a duration. Discontinuous
timecodes can be set by redening the timecode during the le play-in, this can be achieved
by appending several timecode components to the material.
See also:
The Timecode Material section for mode details.
Adds the specied timecode to the end of the timecode track. In most cases, a unique I_-
timecode_material should be embedded in an I_timecode_material. This ensures continuity
while playing the audiovisual material (requirement of MXF le play out). You may set the
duration of the I_timecode_component to -1 in order to leave MXFTk compute it automatically
whenever possible.
Timecode redenition (adding several I_timecode_component) lets you create discontinuous time-
lines. For instance
timecode_component("00:10:00:00", 100)
Appending these two timecode components will give the following timecode playout: "00:00:00:00",
"00:00:00:01", ..., "00:00:01:24", "00:00:10:00", etc.
Returns:
true if successful, false otherwise.
Returns:
true if successful, false otherwise.
Warning:
The edit rate of a timecode track is not necessarily equal to the frame rate of its timecode
components.
Returns:
the edit rate of this timecode material. Returns NULL if an error occured.
Retrieves the ordered list of I_timecode_component from this timecode track. A timecode compo-
nent states a starting timecode and duration. Therefore, adjacent I_timecode_component dene
an I_timecode_material just as adjacent I_track_item dene an I_track.
Returns:
the timecode components of this material. Returned timecode components must not be edited
nor deleted. Returns NULL if an error occurred.
Returns:
the total duration of this timecode material. Returns -1 if unknown.
Warning:
User should not free a timecode material already appended to a material.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
origin The start edit unit (origin) of the timecode track created (usually 0).
edit_rate The edit rate
Note:
The duration will be automatically computed as I_timecode_component will be added to
this material (append_timecode_component()).
Returns:
true if the allocation succeeded, false otherwise.
I_track
I_concrete_track
timeline_metadata: metadata is appended right after the last metadata material already
on the track. It is added in a time-linear fashion: metadata materials are continuously
appended one after the other. The duration property of the metadata to be added is set in
the I_metadata_material containing it. Therefore duration of the track is the sum of the
I_metadata_material's duration.
Parameters:
← tracks The list of tracks that this metadata annotates. Thus, the list must contain point-
ers on I_track/I_concrete_track from the material containing this metadata track.
Returns:
true if successful, false otherwise.
Returns the duration of this track measured in edit units. A negative value means that the
duration is not known yet.
Returns the edit rate of this track (number of edit units per second).
Returns:
NULL if an error occured. The returned pointer should be destroyed using FreeRationalIn-
terface().
Returns:
NULL if the timecode value cannot be computed. The returned timecode value should be
freed using FreeTimecodeInterface().
Returns a time-linearly ordered list of items from this track. Each I_track_item returned by
this function can be either cast into an I_source_clip, I_dm_source_clip or I_dm_segment (re-
spectively thanks to source_clip_cast(), dm_source_clip_cast() or dm_segment_cast()). Track
items are the indivisible segments of data embedded on a track: several track items butted to each
other (or overlapping) materialize a track. The list can be freed at any time using free_elements().
Each track item usually references a metadata tree or the content of an audiovisual
Returns:
The list of elements, The returned list must always be deleted using free_elements. Returns
NULL if an error occured.
Returns:
true if successful, false otherwise.
Returns:
the end timecode. The returned pointer should be freed by the API user. Returns NULL if
it cannot be computed.
Returns:
the start timecode. The returned pointer should be freed by the API user. Returns NULL if
it cannot be computed.
Returns an integer uniquely identifying the current track within its material. However, two tracks
originating from a dierent material may have the same track_id() value.
Returns:
∼0U if an error occured.
Parameters:
→ name_size The length (in bytes) of the returned string.
Returns:
The name of the track. The returned pointer must not be deleted. Returns NULL if an error
occured.
This function returns the list of I_track_item from this track located at the specied edit unit.
The list can be empty if the edit unit is beyond track's scope. On an event_metadata track the
list may contain several track items; all other tracks will contain at most one track item. Each
track item provides methods to read its content. Hence when the user wishes to read the data at
a given edit unit, he must rst seek to the desired location thanks to item_seek_eu() or item_-
seek_timecode(). The retrieved I_track_item must be cast into I_source_clip, I_dm_segment
or I_dm_source_clip that will expose methods to read the metadata or audiovisual data. Note
that if it's an I_source_clip, the referenced track will be set ready for reading with the read()
function.
Parameters:
← position The position along the track. The value will be added to the origin of this track.
Therefore a track with an origin = 5 and a duration = 20 can be accessed with a position
ranging from -5 to 20.
Returns:
NULL if the seek operation cannot be performed (seeking beyond track scope).
This function returns the list of I_track_item from this track located at the specied timecode.
Timecode information can be retrieved from the function I_generic_material::get_timecode().
The list can be empty if the timecode is beyond tracks scope. On an event_metadata track the
list may contain several track items; all other tracks will contain at most one track item. Each
track item provides methods to read its content. Hence when the user wishes to read the data at
a given edit units, he must rst seek to the desired location thanks to item_seek_eu() or item_-
seek_timecode(). Then, the I_track_item just retrieved must be cast into I_source_clip, I_-
dm_segment or I_dm_source_clip that will expose methods to read the metadata or audiovisual
data. Note that if it's an I_source_clip, the referenced track will be set ready for reading with the
read() function. Furthermore, data from dierent tracks read at the same timecode is synchronized
and is meant to be played together.
Returns:
NULL if the seek operation cannot be performed (seeking beyond track scope).
Returns the origin of this track measured in edit units. Future references to the track's content
will be performed thanks to an oset relative to the origin. Returns INT64_ERROR if an error
occured.
Remove the metadata material and its associated metadata tree if the current track is an event
or static metadata track.
Returns:
true if successful, false otherwise.
Note:
this function will be inoperative on a timeline metadata track.
Parameters:
← name The Unicode UTF16 string.This pointer may be destroyed after calling this func-
tion.
Returns:
true if successful, false otherwise.
Returns:
-1 if the edit unit cannot be computed.
Returns:
The type of this track as a string. The returned pointer must not be deleted. Returns NULL
if an error occured.
Related Functions
(Note that these are not member functions.)
Returns the memory address of a 32-byte long buer containing the UMID value. This buer
must not be edited or deleted
Returns a string containing the value of this UMID. It represents 32 bytes in a hexadecimal form,
each byte being separated by a dot.
Returns:
The returned pointer must not be deleted. Return NULL if an error occured.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
value The memory address of a 32-byte long buer containing the UMID value. This buer
can be freed after calling this function.
Returns:
true if the allocation succeeded, false otherwise.
Parameters:
value The UMID value stored in a string. It represents 32 bytes in a hexadecimal form, each
byte being separated by a dot.
Returns:
true if the allocation succeeded, false otherwise.
Related Functions
(Note that these are not member functions.)
Returns the memory address of a 64-byte long buer containing the UMID value. This buer
must not be edited or deleted
Returns a string containing the value of this UMID. It represents 64 bytes in a hexadecimal form,
each byte being separated by a dot.
Returns:
The returned pointer must not be deleted. Return NULL if an error occured.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
value The memory address of a 64-byte long buer containing the UMID value. This buer
can be freed after calling this function.
Returns:
true if the allocation succeeded, false otherwise.
Parameters:
value The UMID value stored in a string. It represents 64 bytes in a hexadecimal form, each
byte being separated by a dot.
Returns:
true if the allocation succeeded, false otherwise.
template<typename T >
bool get_value (size_t index, T &t) const
template<typename T >
bool get_value (T &t) const
template<typename T >
T get_value_as (size_t index) const
Related Functions
(Note that these are not member functions.)
Gets a memory pointer on the value's data. This pointer should be directly cast into the appro-
priate type depending on the return value of get_type()). Returned pointer must not be deleted.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Parameters:
index The index used to retrieve items in an array value.
Frees the specied I_value interface. The data stored in the specied value is not destroyed upon
calling of this function. It is the MXFTK user responsibility to free it.
Returns:
true if the deallocation succeeded, false otherwise.
Parameters:
type The MXF type of the value.
I_mxf_file
I_op1a_file
I_xdcam_dv_file
I_mxf_file
I_op1a_file
I_xdcam_dv_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling ush().
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_xdcam_dv_le interface. This function must be called when writing
an eVTR le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
← task This is a class derived by MXFTk user to provide its own implementation to feed
the streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op1a_file
I_xdcam_hd_file
I_mxf_file
I_op1a_file
I_xdcam_hd_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling ush().
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_xdcam_hd_le interface. This function must be called when writing
an eVTR le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
← task This is a class derived by MXFTk user to provide its own implementation to feed
the streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op1a_file
I_xdcam_imx_file
I_mxf_file
I_op1a_file
I_xdcam_imx_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling ush().
Returns:
true if the allocation succeeded, false otherwise.
Retrieves a pointer on an I_xdcam_imx_le interface. This function must be called when writing
an eVTR le on a linear streaming device (e.g. a videotape recorder, an IEEE1394 port, etc.).
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
← task This is a class derived by MXFTk user to provide its own implementation to feed
the streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
I_mxf_file
I_op1a_file
I_xdcam_proxy_file
I_mxf_file
I_op1a_file
I_xdcam_proxy_file
Related Functions
(Note that these are not member functions.)
Returns:
true if the deallocation succeeded, false otherwise.
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
lename The complete path toward the MXF le to be written upon calling ush().
Returns:
true if the allocation succeeded, false otherwise.
Note:
The concrete material that will be added to the le should have been wrapped using the
xdcam wrapping mode.
Parameters:
← task This is a class derived by MXFTk user to provide its own implementation to feed
the streaming device while output data is built by MXFTk.
Returns:
true if the allocation succeeded, false otherwise.
See also:
the Streaming section for a complete overview of the streaming capabilities of MXFTk.
Deprecated
Please avoid using this method.
Parameters:
← locator The location (le path) to add to the list.
Return the next element in the list based on the current position of the internal iterator
Returns:
A const char ∗ pointer to the essence path.
Returns:
The number of elements.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_metadata ∗ pointer to the element.
Returns:
The number of elements.
Deprecated
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_mxf_le ∗ pointer to the element.
Deprecated
Returns:
The number of elements.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_timecode_component ∗ pointer to the element.
Returns:
The number of elements.
Indicate whether this list contains the specied track item or not.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_track_item ∗ pointer to the element.
Returns:
The number of elements.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_property ∗ pointer to the element.
Returns:
The number of elements.
Related Functions
(Note that these are not member functions.)
The denominator.
The numerator.
Return the next element in the list based on the current position of the internal iterator
Returns:
An I_track ∗ pointer to the element.
Returns:
The number of elements.