TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
A wrapper class for C++ SectionFile. More...
Public Member Functions | |
SectionFile (DuckContext duck) | |
Constructor. | |
native int | binarySize () |
Get the size in bytes of all sections. | |
native void | clear () |
Clear the content of the SectionFile, erase all sections. | |
native void | delete () |
Delete the encapsulated C++ object. | |
native boolean | fromBinary (byte[] data) |
Load a binary section file from a memory buffer. | |
native boolean | loadBinary (String file) |
Load a binary section file. | |
native boolean | loadXML (String file) |
Load an XML file. | |
void | reorganizeEITs () |
Reorganize all EIT sections according to ETSI TS 101 211. | |
native void | reorganizeEITs (int year, int month, int day) |
Reorganize all EIT sections according to ETSI TS 101 211. | |
native boolean | saveBinary (String file) |
Save a binary section file. | |
native boolean | saveJSON (String file) |
Save a JSON file after automated XML-to-JSON conversion. | |
native boolean | saveXML (String file) |
Save an XML file. | |
native int | sectionsCount () |
Get the total number of sections in the file. | |
native void | setCRCValidation (int mode) |
Set the CRC32 processing mode when loading binary sections. | |
native int | tablesCount () |
Get the total number of full tables in the file. | |
native byte[] | toBinary () |
Get the binary content of a section file. | |
native String | toJSON () |
Serialize as JSON text. | |
native String | toXML () |
Serialize as XML text. | |
Protected Attributes | |
long | nativeObject = 0 |
The address of the underlying C++ object. | |
A wrapper class for C++ SectionFile.
|
inline |
Constructor.
duck | The TSDuck execution context object to use. |
native void io.tsduck.SectionFile.delete | ( | ) |
Delete the encapsulated C++ object.
Reimplemented from io.tsduck.NativeObject.
native int io.tsduck.SectionFile.binarySize | ( | ) |
Get the size in bytes of all sections.
This would be the size of the corresponding binary file.
native int io.tsduck.SectionFile.sectionsCount | ( | ) |
Get the total number of sections in the file.
native int io.tsduck.SectionFile.tablesCount | ( | ) |
Get the total number of full tables in the file.
Orphan sections are not included.
native void io.tsduck.SectionFile.setCRCValidation | ( | int | mode | ) |
Set the CRC32 processing mode when loading binary sections.
mode | For binary files, how to process the CRC32 of the input sections. Must be one of the CRC32_* values. |
native boolean io.tsduck.SectionFile.fromBinary | ( | byte[] | data | ) |
Load a binary section file from a memory buffer.
The loaded sections are added to the content of this object.
data | A byte array containing the binary data to load. |
native byte[] io.tsduck.SectionFile.toBinary | ( | ) |
Get the binary content of a section file.
native boolean io.tsduck.SectionFile.loadBinary | ( | String | file | ) |
Load a binary section file.
The loaded sections are added to the content of this object.
file | Binary file name. If the file name is empty or "-", the standard input is used. |
native boolean io.tsduck.SectionFile.saveBinary | ( | String | file | ) |
Save a binary section file.
[in] | file | Binary file name. If the file name is empty or "-", the standard output is used. |
native boolean io.tsduck.SectionFile.loadXML | ( | String | file | ) |
Load an XML file.
The loaded tables are added to the content of this object.
file | XML file name. If the file name is empty or "-", the standard input is used. If the file name starts with "<?xml", this is considered as "inline XML content". |
native boolean io.tsduck.SectionFile.saveXML | ( | String | file | ) |
Save an XML file.
[in] | file | XML file name. If the file name is empty or "-", the standard output is used. |
native boolean io.tsduck.SectionFile.saveJSON | ( | String | file | ) |
Save a JSON file after automated XML-to-JSON conversion.
[in] | file | JSON file name. If the file name is empty or "-", the standard output is used. |
native String io.tsduck.SectionFile.toXML | ( | ) |
Serialize as XML text.
native String io.tsduck.SectionFile.toJSON | ( | ) |
Serialize as JSON text.
native void io.tsduck.SectionFile.reorganizeEITs | ( | int | year, |
int | month, | ||
int | day | ||
) |
Reorganize all EIT sections according to ETSI TS 101 211.
Only one EITp/f subtable is kept per service. It is split in two sections if two events (present and following) are specified. All EIT schedule are kept. But they are completely reorganized. All events are extracted and spread over new EIT sections according to ETSI TS 101 211 rules.
The "last midnight" according to which EIT segments are assigned is derived from parameters year, month and day. If any of them is out or range, the start time of the oldest event in the section file is used as "reference date".
year | Year of the reference time for EIT schedule. This is the "last midnight" according to which EIT segments are assigned. |
month | Month (1..12) of the reference time for EIT schedule. |
day | Day (1..31) of the reference time for EIT schedule. |
|
inline |
Reorganize all EIT sections according to ETSI TS 101 211.
Only one EITp/f subtable is kept per service. It is split in two sections if two events (present and following) are specified. All EIT schedule are kept. But they are completely reorganized. All events are extracted and spread over new EIT sections according to ETSI TS 101 211 rules.
The start time of the oldest event in the section file is used as "reference date".
|
protectedinherited |
The address of the underlying C++ object.
It is normally accessed by native methods only.