mirror of
https://github.com/freemkv/libfreemkv.git
synced 2026-10-07 18:13:10 +00:00
Key-source contexts carry the op token and progress; DiscSession gains open_with, scan_with and finish on the held handle. A consumer that closes after a cancel keeps *.partial, and an artifact lock sidecar guards each final output. Stop rules are enforced as lint tests.
83 lines
47 KiB
Plaintext
83 lines
47 KiB
Plaintext
# The spec-quote registry: one line per `libfreemkv::spec` quote, `<id>\t<passage>`.
|
||
# The passage is the unelided, rendered source text a const's " … " fragments come
|
||
# from (radix subscripts as ₂/₁₆, ⊕ for XOR, curly quotes as printed). A trailing
|
||
# `\t// …` comment is not part of the passage: `test-only reference` (rule 9), or
|
||
# where a quote is cited later. `spec_quotes_match_registry` checks const == registry.
|
||
# Registry == source is a PR-review item (open the page); for KS-22…KS-24 run the
|
||
# ignored `libaacs_quotes_match_source` with LIBAACS_AACS_C=<aacs.c @55be92be>.
|
||
KS-1 When AACS encryption is applied to Clip AV stream files under the “\BDMV” directory, encryption is applied to every Aligned Unit in the file.
|
||
KS-2 An Aligned Unit consists of 32 MPEG source packets: Each MPEG source packet consists of the TP_extra_header (4 bytes) and an MPEG Transport packet (188 bytes). The total size of an Aligned Unit is 6144 bytes, which is equal to the size of 3 logical sectors.
|
||
KS-3 The final 6128 bytes of each Aligned Unit is encrypted using the Block Key and AES-128CBCE. A new CBC cipher chain is started for each Aligned Unit (see Figure 3-7).
|
||
KS-4 The first 16 bytes of each Aligned Unit is used as the seed for calculating the Block Key. Calculation method for the Block key is described in Figure 3-8.
|
||
KS-5 Copy_permission_indicator shall be set to 11₂ if the data is encrypted, or shall be set to 00₂ if the data is not encrypted. If the Licensed Player encounters the packet with Copy_permission_indicator set to 10₂ or 01₂, the data shall be considered encrypted.
|
||
KS-6 Table 3-34 TP_extra_header: Syntax No. of bits Mnemonic TP_extra_header { Copy_permission_indicator 2 uimsbf Arrival_time_stamp 30 uimsbf }
|
||
KS-7 Each physical sector in an Aligned Unit shall be allocated contiguously on the BD-ROM disc.
|
||
KS-8 All the extents of each Clip AV stream file shall be allocated with ascending order in physical layer.
|
||
KS-9 Within the Stereoscopic Interleaved file, segments of the two Clip AV stream files are recorded alternately. The boundary of these segments shall be always aligned to Aligned Unit boundary, so that there is no impact on the encryption scheme of the Stereoscopic Interleaved file.
|
||
KS-10 All AV stream files that are referred to by one Title are included in the same CPS Unit. If First Playback, Top Menu and/or a Title share one or more Clips, they shall be included in the same CPS Unit, i.e. the same Unit Key shall be assigned to First Playback, Top Menu and/or the Title. If multiple Titles share one or more Clips, these Titles shall be included in the same CPS Unit, i.e. the same Unit Key shall be assigned to these Titles. // cited later by SG23 (KU-L2) and the §3.6.2 playlist-borrowing site
|
||
KS-11 Each CPS Unit has a CPS_Unit_number. CPS_Unit_number values are defined in ascending order, starting from one. So, the maximum value of CPS_Unit_number shall be the same as the number of CPS Units that are assigned to First Playback, Top Menu, and/or Titles.
|
||
KS-12 Unit_Key_Block_start_address field (32 bits) indicates the start address of Unit_Key_Block() in the relative byte number from the first byte of CPS Unit Key File. The value of Unit_Key_Block_start_address field shall be a multiple of 16.
|
||
KS-13 Table 3-13: Unit_Key_File_Header(){ Application_Type (= 01₁₆) 8 Uimsbf Num_of_BD_Directory (= 01₁₆) 8 Uimsbf Use_SKB_Unified_MKB_Flag 1 Bslbf (reserved) 15 Bslbf For(I=0; I < Num_of_BD_Directory; I++){ CPS_Unit_number for First Playback#I 16 Uimsbf CPS_Unit_number for Top Menu#I 16 Uimsbf Num_of_Title#I 16 Uimsbf For(J=1; J < Num_of_Title+1; J++){ (reserved) 16 Bslbf CPS_Unit_number for Title#J in Directory #I 16 Uimsbf } } }
|
||
KS-14 Table 3-15: Unit_Key_Block(){ Num_of_CPS_Unit 16 Uimsbf (reserved) 112 Bslbf For(I=1; I < Num_of_CPS_Unit+1; I++){ MAC of PMSN#I 128 Bslbf MAC of Device Binding Nonce#I 128 Bslbf Encrypted CPS Unit Key for CPS Unit#I 128 bslbf } } Num_of_CPS_Unit field (16 bits) indicates the number of CPS Units on the disc.
|
||
KS-15 Encrypted CPS Unit Key field contains the 16 bytes of the encrypted CPS Unit Key (Kcu) for each CPS Unit. The CPS Unit Key is encrypted as follows: AES-128E( Kvu, Kcu ) where Kvu denotes a Volume Unique Key defined in Section 3.3 of the AACS Pre-recorded Video Book of this specification.
|
||
KS-16 The Licensed Replicator chooses a Volume ID (IDv) to be placed on the pre-recorded media and calculates a Volume Unique Key (Kvu) as follows: Kvu = AES-G(Km, IDv) where AES-G represents the AES-based one-way function defined in the Introduction and Common Cryptographic Elements book.
|
||
KS-17 The AES-based One-way Function result is calculated as AES-G(x1, x2) = AES-128D(x1, x2) ⊕ x2.
|
||
KS-18 If the Bus Encryption Enabled (BEE) flag in the Content Certificate is set to 1₂, the BEF shall be set to 1₂ for all the sectors that correspond to the Aligned Unit with Copy_permission_indicator set to 11₂ of the Clip AV stream files under “\BDMV\STREAM” directory. Otherwise, the BEF shall be set to 0₂.
|
||
KS-19 Unless otherwise specified, the Initialization Vector used at the beginning of a CBC encryption or decryption chain is a constant, iv0, which is: 0BA0F8DDFEA61FB3D8DF9F566A050F78₁₆
|
||
KS-20 The 30 least significant bits of this field shall be interpreted as a 30-bit unsigned binary number specifying the length of the extent in bytes. Unless otherwise specified, the length shall be an integral multiple of the logical block size. The 2 most significant bits shall be interpreted as a 2-bit unsigned binary number specifying the type of the extent as described in figure 4/42. If the 30 least significant bits are set to ZERO, the two most significant bits shall also be set to ZERO.
|
||
KS-21 Value Interpretation / 0 Extent recorded and allocated / 1 Extent not recorded but allocated / 2 Extent not recorded and not allocated / 3 The extent is the next extent of allocation descriptors (see 4/12) / Figure 42 - Extent interpretation
|
||
KS-22 static int _verify_ts(uint8_t *buf) { int i; for (i = 0; i < ALIGNED_UNIT_LEN; i += 192) { if (BD_UNLIKELY(buf[i + 4] != 0x47)) { return 0; } /* Clear copy_permission_indicator bits */ buf[i] &= ~0xc0; } return 1; }
|
||
KS-23 crypto_error = crypto_aes128e(aacs->uk->uk[curr_uk].key, out_buf, key); if (crypto_error) { LOG_CRYPTO_ERROR(DBG_AACS, "unit key derivation failed", crypto_error); return 1; } for (a = 0; a < 16; a++) { key[a] ^= out_buf[a]; /* here out_buf is plain data from in_buf */ } // test-only reference
|
||
KS-24 /* plain ? */ if (!(buf[0] & 0xc0)) { // TP_extra_header Copy_permission_indicator == 0, unit is not encrypted return 1; } // test-only reference
|
||
KS-25 AACS 2.x (UHD): the 64-byte Unit_Key_RO.inf stride and the FMTS IndividualSegment.tbl / .fmts model have no public book. They are pinned by the qa UHD fixture and aacs-unit-grid.md §2.
|
||
KS-26 FMTS anchor contract: the decode server returns the whole set only for an index-1 anchor, and 422 for the wrong phase (kdb decode-server main.rs:1640-1688)
|
||
KS-27 Please note: The AACS Specifications books for HD DVD and CBHD have been removed from this AACS website due to inactivity.
|
||
KS-28 File-anchored grid on real discs: 32/32 sync on the file grid vs 0–1/32 on the disc-LBA grid (aacs-unit-grid.md §2 table). This corroborates KS-1.
|
||
KS-29 The Licensed Drive reads Volume ID (Volume_ID) from the media and calculates a message authentication code (Dm) from the Volume ID and the Bus Key (BK) calculated in step 26 in Section 4.3. // test-only reference
|
||
SS-1 Table 18 Sense key specific field definitions Sense Key Sense Key Specific Field Definition Reference ILLEGAL REQUEST Field pointer 2.4.1.1.4.2 HARDWARE ERROR, MEDIUM ERROR, or RECOVERED ERROR Actual retry count 2.4.1.1.4.3 NO SENSE or NOT READY Progress indication 2.4.1.1.4.4 … 2.4.1.1.4.4 Progress indication sense key specific data If the sense key is NO SENSE or NOT READY, the SENSE KEY SPECIFIC field shall be as shown in table 21. … PROGRESS INDICATION field The PROGRESS INDICATION field is a percent complete indication in which the returned value is a numerator that has 65 536 (10000h) as its denominator. The progress indication shall be based upon the total operation. … SKSV (Sense-key Specific Valid) bit 1 A sense-key specific valid (SKSV) bit set to one indicates the SENSE KEY SPECIFIC field contains valid information as defined in this manual.
|
||
SS-2 The descriptor format sense data for response codes 72h (current errors) and 73h (deferred errors) is defined in table 12. … The sense key specific sense data descriptor (see table 17) provides additional information about the exception condition. The format and content of the sense-key specific data depends on the value in the SENSE KEY field (see 2.4.1.1.1).
|
||
SS-3 In the event that a command requires a level of readiness that does not currently exist, the Drive should be terminated with CHECK CONDITION status and sense bytes SK/ASC/ASCQ should be selected from those shown in Table F.3. Table F.3 — Readiness Errors SK ASC ASCQ Description 2 04 00 LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE 2 04 01 LOGICAL UNIT IS IN PROCESS OF BECOMING READY 2 04 02 LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED 2 04 03 LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED 2 04 04 LOGICAL UNIT NOT READY, FORMAT IN PROGRESS 2 04 07 LOGICAL UNIT NOT READY, OPERATION IN PROGRESS 2 04 08 LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS 2 0C 07 WRITE ERROR RECOVERY NEEDED 2 0C 0F DEFECTS IN ERROR WINDOW 2 30 00 INCOMPATIBLE MEDIUM INSTALLED 2 30 01 CANNOT READ MEDIUM – UNKNOWN FORMAT 2 or 5 30 02 CANNOT READ MEDIUM – INCOMPATIBLE FORMAT 2 30 03 CLEANING CARTRIDGE INSTALLED 2 or 5 30 04 CANNOT WRITE MEDIUM – UNKNOWN FORMAT 2 or 5 30 05 CANNOT WRITE MEDIUM – INCOMPATIBLE FORMAT 2 or 5 30 06 CANNOT FORMAT MEDIUM – INCOMPATIBLE MEDIUM 2 30 07 CLEANING FAILURE 2 or 5 30 11 CANNOT WRITE MEDIUM – UNSUPPORTED MEDIUM VERSION 2 3A 00 MEDIUM NOT PRESENT 2 3A 01 MEDIUM NOT PRESENT – TRAY CLOSED 2 3A 02 MEDIUM NOT PRESENT – TRAY OPEN
|
||
SS-4 The TEST UNIT READY command (see table 202) provides a means to check if the logical unit is ready. This is not a request for a self-test. If the logical unit is able to accept an appropriate medium-access command without returning CHECK CONDITION status, this command shall return a GOOD status. If the logical unit is unable to become operational or is in a state such that an application client action (e.g., START UNIT command) is required to make the logical unit ready, the command shall be terminated with CHECK CONDITION status, with the sense key set to NOT READY.
|
||
SS-5 The Drive maintains two separate Prevent states: Prevent and Persistent Prevent as described in 4.1.7. The Persistent and Prevent bits are used to independently select values for these states. See Table 329. Table 329 — State Selection Persistent Prevent Meaning 0 0 Prevent State shall be cleared (Unlocked) 0 1 Prevent State shall be set (Locked) 1 0 Persistent Prevent State shall be cleared (Persistent Allow) 1 1 Persistent Prevent State shall be set (Persistent Prevent)
|
||
SS-6 When Power Conditions field is zero and FL is zero, the meanings of LoEj and Start are defined in Table 633. Table 633 — LoEj and Start Meanings when Power Conditions = 0 LoEj Start Operation 0 0 Stop the disc 0 1 Start the disc and make ready for access 1 0 Eject the disc if permitted. It is not an error If no media is present. See 6.13, PREVENT ALLOW MEDIUM REMOVAL Command 1 1 Load the disc, Start the disc and make ready for access. It is not an error if no media is present.
|
||
SS-7 static int _mmc_report_key(MMC *mmc, uint8_t agid, uint32_t addr, uint8_t blocks, uint8_t format, uint8_t *buf, uint16_t len) { uint8_t cmd[MMC_CDB_SIZE]; memset(cmd, 0, sizeof(cmd)); BD_DEBUG(DBG_MMC, "MMC report key...\n"); cmd[0] = MMC_REPORT_KEY; cmd[2] = (addr >> 24) & 0xff; cmd[3] = (addr >> 16) & 0xff; cmd[4] = (addr >> 8) & 0xff; cmd[5] = addr & 0xff; cmd[6] = blocks; cmd[7] = MMC_KEY_CLASS_AACS; cmd[8] = (len >> 8) & 0xff; cmd[9] = len & 0xff; cmd[10] = (agid << 6) | (format & 0x3f); return device_send_cmd(mmc->dev, cmd, buf, 0, len); } … static int _mmc_invalidate_agid(MMC *mmc, uint8_t agid) { uint8_t buf[2]; memset(buf, 0, sizeof(buf)); return _mmc_report_key(mmc, agid, 0, 0, MMC_REPORT_KEY_AACS_INVALIDATE_AGID, buf, sizeof(buf)); } static void _mmc_invalidate_agids(MMC *mmc) { int agid; /* invalidate all agids */ for (agid = 0; agid < 4; agid++) { _mmc_invalidate_agid(mmc, agid); } } static int _mmc_report_agid(MMC *mmc, uint8_t *agid) { uint8_t buf[8]; memset(buf, 0, sizeof(buf)); int result = _mmc_report_key(mmc, 0, 0, 0, MMC_REPORT_KEY_AACS_AGID, buf, sizeof(buf)); if (result) { *agid = (buf[7] & 0xff) >> 6; } return result; }
|
||
SS-8 LOCK_EX Place an exclusive lock. Only one process may hold an exclusive lock for a given file at a given time. LOCK_UN Remove an existing lock held by this process. A call to flock() may block if an incompatible lock is held by another process. To make a nonblocking request, include LOCK_NB (by ORing) with any of the above operations. A single file may not simultaneously have both shared and exclusive locks. Locks created by flock() are associated with an open file description (see open(2)). This means that duplicate file descriptors (created by, for example, fork(2) or dup(2)) refer to the same lock, and this lock may be modified or released using any of these file descriptors. Furthermore, the lock is released either by an explicit LOCK_UN operation on any of these duplicate file descriptors, or when all such file descriptors have been closed. If a process uses open(2) (or similar) to obtain more than one file descriptor for the same file, these file descriptors are treated independently by flock(). An attempt to lock the file using one of these file descriptors may be denied by a lock that the calling process has already placed via another file descriptor. EWOULDBLOCK The file is locked and the LOCK_NB flag was selected. Since Linux 2.6.12, NFS clients support flock() locks by emulating them as fcntl(2) byte-range locks on the entire file. This means that fcntl(2) and flock() locks do interact with one another over NFS. It also means that in order to place an exclusive lock, the file must be opened for writing.
|
||
SS-9 A file identity is uniquely determined by the combination of st_dev and st_ino. At any given time in a system, distinct files shall have distinct file identities; hard links to the same file shall have the same file identity. Over time, these file identities can be reused for different files.
|
||
SS-10 LOCKFILE_EXCLUSIVE_LOCK 0x00000002 The function requests an exclusive lock. Otherwise, it requests a shared lock. LOCKFILE_FAIL_IMMEDIATELY 0x00000001 The function returns immediately if it is unable to acquire the requested lock. Otherwise, it waits. FILE_SHARE_DELETE 0x00000004 Enables subsequent open operations on a file or device to request delete access. Otherwise, no process can open the file or device if it requests delete access. The identifier (low and high parts) and the volume serial number uniquely identify a file on a single computer. To determine whether two open handles represent the same file, combine the identifier and the volume serial number for each file and compare them.
|
||
SS-12 The fsync() function shall request that all data for the open file descriptor named by fildes is to be transferred to the storage device associated with the file described by fildes. The nature of the transfer is implementation-defined. The fsync() function shall not return until the system has completed that action or until an error is detected. The fdatasync() function shall force all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state. The functionality shall be equivalent to fsync() with the symbol _POSIX_SYNCHRONIZED_IO defined, with the exception that all I/O operations shall be completed as defined for synchronized I/O data integrity completion.
|
||
SS-13 This system call is extremely dangerous and should not be used in portable programs. None of these operations writes out the file's metadata. Therefore, unless the application is strictly performing overwrites of already-instantiated disk blocks, there are no guarantees that the data will be available after a crash. There is no user interface to know if a write is purely an overwrite. On filesystems using copy-on-write semantics (e.g., btrfs) an overwrite of existing allocated blocks is impossible. When writing into preallocated space, many filesystems also require calls into the block allocator, which this system call does not sync out to disk. This system call does not flush disk write caches and thus does not provide any data integrity on systems with volatile disk write caches. Some details SYNC_FILE_RANGE_WAIT_BEFORE and SYNC_FILE_RANGE_WAIT_AFTER will detect any I/O errors or ENOSPC conditions and will return these to the caller. Useful combinations of the flags bits are: SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE Ensures that all pages in the specified range which were dirty when sync_file_range() was called are placed under write-out. This is a start-write-for-data-integrity operation. SYNC_FILE_RANGE_WRITE Start write-out of all dirty pages in the specified range which are not presently under write-out. This is an asynchronous flush-to-disk operation. This is not suitable for data integrity operations. SYNC_FILE_RANGE_WAIT_BEFORE (or SYNC_FILE_RANGE_WAIT_AFTER) Wait for completion of write-out of all pages in the specified range. This can be used after an earlier SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE operation to wait for completion of that operation, and obtain its result. SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER This is a write-for-data-integrity operation that will ensure that all pages in the specified range which were dirty when sync_file_range() was called are committed to disk.
|
||
SS-14 Does the same thing as fsync(2) then asks the drive to flush all buffered data to the permanent storage device (arg is ignored). As this drains the entire queue of the device and acts as a barrier, data that had been fsync'd on the same device before is guaranteed to be persisted when this call returns. This is currently implemented on HFS, MS-DOS (FAT), Universal Disk Format (UDF) and APFS file systems. The operation may take quite a while to complete. Certain FireWire drives have also been known to ignore the request to flush their buffered data.
|
||
SS-15 Typically the WriteFile and WriteFileEx functions write data to an internal buffer that the operating system writes to a disk or communication pipe on a regular basis. The FlushFileBuffers function writes all the buffered information for a specified file to the device or pipe.
|
||
SS-23 When coupled with a store, all previous operations become ordered before any load of this value with Acquire (or stronger) ordering. In particular, all previous writes become visible to all threads that perform an Acquire (or stronger) load of this value. When coupled with a load, if the loaded value was written by a store operation with Release (or stronger) ordering, then all subsequent operations become ordered after that store. In particular, all subsequent loads will see data written before the store.
|
||
MS-1 pack() { pack_header() while (nextbits() = = packet_start_code_prefix) { PES_packet() } }
|
||
MS-2 pack_header() { pack_start_code 32 bslbf '01' 2 bslbf system_clock_reference_base [32..30] 3 bslbf marker_bit 1 bslbf system_clock_reference_base [29..15] 15 bslbf marker_bit 1 bslbf system_clock_reference_base [14..0] 15 bslbf marker_bit 1 bslbf system_clock_reference_extension 9 uimsbf marker_bit 1 bslbf program_mux_rate 22 uimsbf marker_bit 1 bslbf marker_bit 1 bslbf reserved 5 bslbf pack_stuffing_length 3 uimsbf
|
||
MS-3 The value of program_mux_rate is measured in units of 50 bytes/second. The value 0 is forbidden. The value represented in program_mux_rate is used to define the time of arrival of bytes at the input to the P-STD in 2.5.2. The value encoded in the program_mux_rate field may vary from pack to pack in an ITU-T Rec. H.222.0 | ISO/IEC 13818-1 program multiplexed stream. pack_stuffing_length – A 3-bit integer specifying the number of stuffing bytes which follow this field. stuffing_byte – This is a fixed 8-bit value equal to '1111 1111' that can be inserted by the encoder, for example to meet the requirements of the channel. It is discarded by the decoder. In each pack header no more than 7 stuffing bytes shall be present.
|
||
MS-4 SCR(i) = SCR_base(i) × 300 + SCR_ext(i) (2-18) where SCR_base(i) = ((system_clock_ frequency × t(i)) DIV 300) % 233 (2-19) SCR_ext(i) = ((system_clock_ frequency × t(i)) DIV 1) % 300 (2-20) The input arrival time, t(i), as given in equation 2-21, for all other bytes shall be constructed from SCR(i) and the rate at which data arrives, where the arrival rate within each pack is the value represented in the program_mux_rate field in that pack’s header. SCR(i′ ) i − i′ t(i) = + (2-21) system_clock_ frequency program_mux_rate × 50 where i′ is the index of the byte containing the last bit of the system_clock_reference_base field in the pack header i is the index of any byte in the pack, including the pack header SCR(i′) is the time encoded in the system clock reference base and extension fields in units of the system clock program_mux_rate is a field defined in 2.5.3.3. After delivery of the last byte of a pack there may be a time interval during which no bytes are delivered to the input of the P-STD. 2.5.2.3 Buffering The PES packet data from elementary stream n is passed to the input buffer for stream n, Bn. Transfer of byte i from the system target decoder input to Bn is instantaneous, so that byte i enters the buffer for stream n, of size BSn, at time t(i). Bytes present in the pack header, system headers, Program Stream Maps, Program Stream Directories, or PES packet headers of the Program Stream such as SCR, DTS, PTS, and packet_length fields, are not delivered to any of the buffers, but may be used to control the system. The input buffer sizes BS1 through BSn are given by the P-STD buffer size parameter in the syntax in equation 2-16 and equation 2-17. At the decoding time, tdn(j), all data for the access unit that has been in the buffer longest, An(j), and any stuffing bytes that immediately precede it that are present in the buffer at the time tdn(j), are removed instantaneously at time tdn(j). The decoding time tdn(j) is specified in the DTS or PTS fields. Decoding times tdn(j + 1), tdn(j + 2), ... of access units without encoded DTS or PTS fields which directly follow access unit j may be derived from information in the elementary stream. Refer to Annex C of ITU-T Rec. H.262 | ISO/IEC 13818-2, ISO/IEC 13818-3, ISO/IEC 11172-2 or ISO/IEC 11172-3. Also refer to 2.7.5. As the access unit is removed from the buffer, it is instantaneously decoded to a presentation unit. The Program Stream shall be constructed and t(i) shall be chosen so that the input buffers of size BS1 through BSn neither overflow nor underflow in the program system target decoder. That is: 0 ≤ Fn(t) ≤ BSn for all t and n and Fn(t) = 0 instantaneously before t = t(0). Fn(t) is the instantaneous fullness of P-STD buffer Bn. An exception to this condition is that the P-STD buffer Bn may underflow when the low_delay flag in the video sequence header is set to '1' (refer to 2.4.2.6) or when trick_mode status is true (refer to 2.4.3.8). For all Program Streams, the delay caused by system target decoder input buffering shall be less than or equal to one second except for still picture video data and ISO/IEC 14496 streams. The input buffering delay is the difference in time between a byte entering the input buffer and when it is decoded. Specifically: in the case of no still picture video data and no ISO/IEC 14496 stream the delay is constrained by: tdn(j)-t(i) <= 1 sec in the case of still picture video data the delay is constrained by: tdn(j)-t(i) <= 60 sec in the case of ISO/IEC 14496 streams the delay is constrained by: tdn(j)-t(i) <= 10 sec for all bytes contained in access unit j. For Program Streams, all bytes of each pack shall enter the P-STD before any byte of a subsequent pack.
|
||
MS-5 system_header () { system_header_start_code 32 bslbf header_length 16 uimsbf marker_bit 1 bslbf rate_bound 22 uimsbf marker_bit 1 bslbf audio_bound 6 uimsbf fixed_flag 1 bslbf CSPS_flag 1 bslbf system_audio_lock_flag 1 bslbf system_video_lock_flag 1 bslbf marker_bit 1 bslbf video_bound 5 uimsbf packet_rate_restriction_flag 1 bslbf reserved_bits 7 bslbf while (nextbits () = = '1') { stream_id 8 uimsbf '11' 2 bslbf P-STD_buffer_bound_scale 1 bslbf P-STD_buffer_size_bound 13 uimsbf } }
|
||
MS-6 The rate_bound is an integer value greater than or equal to the maximum value of the program_mux_rate field coded in any pack of the Program Stream. It may be used by a decoder to assess whether it is capable of decoding the entire stream. audio_bound – A 6-bit field. The audio_bound is an integer in the inclusive range from 0 to 32 and is set to a value greater than or equal to the maximum number of ISO/IEC 13818-3 and ISO/IEC 11172-3 audio streams in the Program Stream for which the decoding processes are simultaneously active. For the purpose of this subclause, the decoding process of an ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream is active if the STD buffer is not empty or if a Presentation Unit is being presented in the P-STD model. fixed_flag – The fixed_flag is a 1-bit flag. When set to '1' fixed bitrate operation is indicated. When set to '0' variable bitrate operation is indicated. During fixed bitrate operation, the value encoded in all system_clock_reference fields in the multiplexed ITU-T Rec. H.222.0 | ISO/IEC 13818-1 stream shall adhere to the following linear equation: SCR_base(i) = ((c1 × i + c2) DIV 300) % 233 (2-22) SCR_ext(i) = ((c1 × i + c2) DIV 300) % 300 (2-23) where c1 is a real-valued constant valid for all i c2 is a real-valued constant valid for all i i is the index in the ITU-T Rec. H.222.0 | ISO/IEC 13818-1 multiplexed stream of the byte containing the final bit of any system_clock_reference field in the stream CSPS_flag – The CSPS_flag is a 1-bit field. If its value is set to '1' the Program Stream meets the constraints defined in 2.7.9. system_audio_lock_flag – The system_audio_lock_flag is a 1-bit field indicating that there is a specified, constant rational relationship between the audio sampling rate and the system_clock_frequency in the system target decoder. The system_clock_frequency is defined in 2.5.2.1 and the audio sampling rate is specified in ISO/IEC 13818-3. The system_audio_lock_flag may only be set to '1' if, for all presentation units in all audio elementary streams in the Program Stream, the ratio of system_clock_frequency to the actual audio sampling rate, SCASR, is constant and equal to the value indicated in the following table at the nominal sampling rate indicated in the audio stream. system_clock_ frequency SCASR = (2-24) audio_sample_ rate_in _the_P−STD X The notation denotes real division. Y Nominal audio sampling 16 32 22,05 44,1 24 48 frequency (kHz) SCASR 27 000 000 27 000 000 27 000 000 27 000 000 27 000 000 27 000 000 ------------- ------------- ------------- ------------- ------------- ------------- 16 000 32 000 22 050 44 100 24 000 48 000 system_video_lock_flag – The system_video_lock_flag is a 1-bit field indicating that there is a specified, constant rational relationship between the video frame rate and the system clock frequency in the system target decoder. Subclause 2.5.2.1 defines system_clock_frequency and the video frame rate is specified in ITU-T Rec. H.262 | ISO/IEC 13818-2. The system_video_lock_flag may only be set to '1' if, for all presentation units in all video elementary streams in the ITU-T Rec. H.222.0 | ISO/IEC 13818-1 program, the ratio of system_clock_frequency to the actual video frame rate, SCFR, is constant and equal to the value indicated in the following table at the nominal frame rate indicated in the video stream. system_clock_ frequency SCFR = (2-25) frame_rate_in _the_P−STD Nominal frame rate 23,976 24 25 29,97 30 50 59,94 60 (Hz) SCFR 1 126 125 1 125 000 1 080 000 900 900 900 000 540 000 450 450 450 000 The values of the ratio SCFR are exact. The actual frame rate differs slightly from the nominal rate in cases where the nominal rate is 23,976, 29,97, or 59,94 frames per second. video_bound – The video_bound is a 5-bit integer in the inclusive range from 0 to 16 and is set to a value greater than or equal to the maximum number of ITU-T Rec. H.262 | ISO/IEC 13818-2 and ISO/IEC 11172-2 streams in the Program Stream of which the decoding processes are simultaneously active. For the purpose of this subclause, the decoding process of an ITU-T Rec. H.262 | ISO/IEC 13818-2 and ISO/IEC 11172-2 video stream is active if the P-STD buffer is not empty, or if a Presentation Unit is being presented in the P-STD model, or if the reorder buffer is not empty. packet_rate_restriction_flag – The packet_rate_restriction_flag is a 1-bit flag. If the CSPS flag is set to '1', the packet_rate_restriction_flag indicates which constraint is applicable to the packet rate, as specified in 2.7.9. If the CSPS flag is set to value of '0', then the meaning of the packet_rate_restriction_flag is undefined. reserved_bits – This 7-bit field is reserved for future use by ISO/IEC. Until otherwise specified by ITU-T | ISO/IEC it shall have the value '111 1111'.
|
||
MS-7 Each elementary stream present in the Program Stream shall have its P-STD_buffer_bound_scale and P-STD_buffer_size_bound specified exactly once by this mechanism in each system header. P-STD_buffer_bound_scale – The P-STD_buffer_bound_scale is a 1-bit field that indicates the scaling factor used to interpret the subsequent P-STD_buffer_size_bound field. If the preceding stream_id indicates an audio stream, P-STD_buffer_bound_scale shall have the value '0'. If the preceding stream_id indicates a video stream, P-STD_buffer_bound_scale shall have the value '1'. For all other stream types, the value of the P-STD_buffer_bound_scale may be either '1' or '0'. P-STD_buffer_size_bound – The P-STD_buffer_size_bound is a 13-bit unsigned integer defining a value greater than or equal to the maximum P-STD input buffer size, BSn, over all packets for stream n in the Program Stream. If P-STD_buffer_bound_scale has the value '0', then P-STD_buffer_size_bound measures the buffer size bound in units of 128 bytes. If P-STD_buffer_bound_scale has the value '1', then P-STD_buffer_size_bound measures the buffer size bound in units of 1024 bytes.
|
||
MS-8 program_stream_map() { packet_start_code_prefix 24 bslbf map_stream_id 8 uimsbf program_stream_map_length 16 uimsbf current_next_indicator 1 bslbf reserved 2 bslbf program_stream_map_version 5 uimsbf reserved 7 bslbf marker_bit 1 bslbf program_stream_info_length 16 uimsbf for (i = 0; i < N; i++) { descriptor() } elementary_stream_map_length 16 uimsbf for (i = 0; i < N1; i++) { stream_type 8 uimsbf elementary_stream_id 8 uimsbf elementary_stream_info_length 16 uimsbf for (i = 0; i < N2; i++) { descriptor() } } CRC_32 32 rpchof } 2.5.4.2 Semantic definition of fields in Program Stream map packet_start_code_prefix – The packet_start_code_prefix is a 24-bit code. Together with the map_stream_id that follows it constitutes a packet start code that identifies the beginning of a packet. The packet_start_code_prefix is the bit string '0000 0000 0000 0000 0000 0001' (0x000001 in hexadecimal). map_stream_id – This is an 8-bit field whose value shall be 0xBC. program_stream_map_length – The program_stream_map_length is a 16-bit field indicating the total number of bytes in the program_stream_map immediately following this field. The maximum value of this field is 1018 (0x3FA). current_next_indicator – This is a 1-bit field, when set to '1' indicates that the Program Stream Map sent is currently applicable. When the bit is set to '0', it indicates that the Program Stream Map sent is not yet applicable and shall be the next table to become valid. program_stream_map_version – This 5-bit field is the version number of the whole Program Stream Map. The version number shall be incremented by 1 modulo 32 whenever the definition of the Program Stream Map changes. When the current_next_indicator is set to '1', then the program_stream_map_version shall be that of the currently applicable Program Stream Map. When the current_next_indicator is set to '0', then the program_stream_map_version shall be that of the next applicable Program Stream Map. program_stream_info_length – The program_stream_info_length is a 16-bit field indicating the total length of the descriptors immediately following this field. marker_bit – A marker_bit is a 1-bit field that has the value '1'. elementary_stream_map_length – This is a 16-bit field specifying the total length, in bytes, of all elementary stream information in this program stream map. It includes the stream_type, elementary_stream_id, and elementary_stream_info_length fields. stream_type – This 8-bit field specifies the type of the stream according to Table 2-29. The stream_type field shall only identify elementary streams contained in PES packets. A value of 0x05 is prohibited. elementary_stream_id – The elementary_stream_id is an 8-bit field indicating the value of the stream_id field in the PES packet headers of PES packets in which this elementary stream is stored.
|
||
MS-9 CRC_32 – This is a 32-bit field that contains the CRC value that gives a zero output of the registers in the decoder defined in Annex A after processing the entire program stream map.
|
||
MS-10 '10' 2 bslbf PES_scrambling_control 2 bslbf PES_priority 1 bslbf data_alignment_indicator 1 bslbf copyright 1 bslbf original_or_copy 1 bslbf PTS_DTS_flags 2 bslbf ESCR_flag 1 bslbf ES_rate_flag 1 bslbf DSM_trick_mode_flag 1 bslbf additional_copy_info_flag 1 bslbf PES_CRC_flag 1 bslbf PES_extension_flag 1 bslbf PES_header_data_length 8 uimsbf if (PTS_DTS_flags = = '10') { '0010' 4 bslbf PTS [32..30] 3 bslbf marker_bit 1 bslbf PTS [29..15] 15 bslbf marker_bit 1 bslbf PTS [14..0] 15 bslbf marker_bit 1 bslbf } Table 2-17 – PES packet (continued) Syntax No. of bits Mnemonic if (PTS_DTS_flags = = '11') { '0011' 4 bslbf PTS [32..30] 3 bslbf marker_bit 1 bslbf PTS [29..15] 15 bslbf marker_bit 1 bslbf PTS [14..0] 15 bslbf marker_bit 1 bslbf '0001' 4 bslbf DTS [32..30] 3 bslbf
|
||
MS-11 if ( PES_extension_flag = = '1') { PES_private_data_flag 1 bslbf pack_header_field_flag 1 bslbf program_packet_sequence_counter_flag 1 bslbf P-STD_buffer_flag 1 bslbf reserved 3 bslbf PES_extension_flag_2 1 bslbf if ( PES_private_data_flag = = '1') { PES_private_data 128 bslbf } if (pack_header_field_flag = = '1') { pack_field_length 8 uimsbf pack_header() } if (program_packet_sequence_counter_flag = = '1') { marker_bit 1 bslbf program_packet_sequence_counter 7 uimsbf marker_bit 1 bslbf MPEG1_MPEG2_identifier 1 bslbf original_stuff_length 6 uimsbf } if ( P-STD_buffer_flag = = '1') { '01' 2 bslbf P-STD_buffer_scale 1 bslbf P-STD_buffer_size 13 uimsbf } if ( PES_extension_flag_2 = = '1') { marker_bit 1 bslbf PES_extension_field_length 7 uimsbf for (i = 0; i < PES_extension_field_length; i++) { reserved 8 bslbf } } } for (i = 0; i < N1; i++) { stuffing_byte 8 bslbf } for (i = 0; i < N2; i++) { PES_packet_data_byte 8 bslbf } } else if ( stream_id = = program_stream_map || stream_id = = private_stream_2 || stream_id = = ECM || stream_id = = EMM || stream_id = = program_stream_directory || stream_id = = DSMCC_stream || stream_id = = ITU-T Rec. H.222.1 type E stream ) { for (i = 0; i < PES_packet_length; i++) { PES_packet_data_byte 8 bslbf } } else if ( stream_id = = padding_stream) { for (i = 0; i < PES_packet_length; i++) { padding_byte 8 bslbf } }
|
||
MS-12 A value of 0 indicates that the PES packet length is neither specified nor bounded and is allowed only in PES packets whose payload consists of bytes from a video elementary stream contained in Transport Stream packets.
|
||
MS-13 If the preceding stream_id indicates an audio stream, P-STD_buffer_scale shall have the value '0'. If the preceding stream_id indicates a video stream, P-STD_buffer_scale shall have the value '1'. For all other stream types, the value may be either '1' or '0'. P-STD_buffer_size – The P-STD_buffer_size is a 13-bit unsigned integer, the meaning of which is only defined if this PES packet is contained in a Program Stream. It defines the size of the input buffer, BSn, in the P-STD. If P-STD_buffer_scale has the value '0', then the P-STD_buffer_size measures the buffer size in units of 128 bytes. If P-STD_buffer_scale has the value '1', then the P-STD_buffer_size measures the buffer size in units of 1024 bytes. Thus: if (P-STD_buffer_scale = = 0) _ (2-16) BSn = P − STD_buffer_size × 128 else BSn = P − STD_buffer_size × 1024 (2-17) The encoded value of the P-STD buffer size takes effect immediately when the P-STD_buffer_size field is received by the ITU-T Rec. H.222.0 | ISO/IEC 13818-1 System Target Decoder (refer to 2.7.7). PES_extension_field_length – This is a 7-bit field which specifies the length, in bytes, of the data following this field in the PES extension field up to and including any reserved bytes. stuffing_byte – This is a fixed 8-bit value equal to '1111 1111' that can be inserted by the encoder, for example to meet the requirements of the channel. It is discarded by the decoder. No more than 32 stuffing bytes shall be present in one
|
||
MS-14 In the case of a private_stream_1, private_stream_2, ECM_stream, or EMM_stream, the contents of the PES_packet_data_byte field are user definable and will not be specified by ITU-T | ISO/IEC in the future.
|
||
MS-15 In the case of audio, if a PTS is present in PES packet header it shall refer to the first access unit commencing in the PES packet. An audio access unit commences in a PES packet if the first byte of the audio access unit is present in the PES packet. In the case of video, if a PTS is present in a PES packet header it shall refer to the access unit containing the first picture start code that commences in this PES packet.
|
||
MS-16 Bytes present in the pack header, system headers, Program Stream Maps, Program Stream Directories, or PES packet headers of the Program Stream such as SCR, DTS, PTS, and packet_length fields, are not delivered to any of the buffers, but may be used to control the system. The input buffer sizes BS1 through BSn are given by the P-STD buffer size parameter in the syntax in equation 2-16 and equation 2-17. At the decoding time, tdn(j), all data for the access unit that has been in the buffer longest, An(j), and any stuffing bytes that immediately precede it that are present in the buffer at the time tdn(j), are removed instantaneously at time tdn(j). The decoding time tdn(j) is specified in the DTS or PTS fields. Decoding times tdn(j + 1), tdn(j + 2), ... of access units without encoded DTS or PTS fields which directly follow access unit j may be derived from information in the elementary stream. Refer to Annex C of ITU-T Rec. H.262 | ISO/IEC 13818-2, ISO/IEC 13818-3, ISO/IEC 11172-2 or ISO/IEC 11172-3. Also refer to 2.7.5. As the access unit is removed from the buffer, it is instantaneously decoded to a presentation unit. The Program Stream shall be constructed and t(i) shall be chosen so that the input buffers of size BS1 through BSn neither overflow nor underflow in the program system target decoder. That is: 0 ≤ Fn(t) ≤ BSn for all t and n and Fn(t) = 0 instantaneously before t = t(0). Fn(t) is the instantaneous fullness of P-STD buffer Bn. An exception to this condition is that the P-STD buffer Bn may underflow when the low_delay flag in the video sequence header is set to '1' (refer to 2.4.2.6) or when trick_mode status is true (refer to 2.4.3.8). For all Program Streams, the delay caused by system target decoder input buffering shall be less than or equal to one second except for still picture video data and ISO/IEC 14496 streams.
|
||
MS-17 The Program Stream shall be constructed such that the time interval between the bytes containing the last bit of system_clock_reference_base fields in successive packs shall be less than or equal to 0.7 s.
|
||
MS-18 The Program Stream and Transport Stream shall be constructed so that the maximum difference between coded presentation timestamps referring to each elementary video or audio stream is 0,7 s. Thus: | tpn(k) − tpn(k″) | ≤ 0.7 s for all n, k, and k″ satisfying: • Pn(k) and Pn(k″) are presentation units for which presentation timestamps are coded; • k and k″ are chosen so that there is no presentation unit, Pn(k′) with a coded presentation timestamp and with k < k′ < k″; and • No decoding discontinuity exists in elementary stream n between Pn(k) and Pn(k''). In the case of still pictures the 0,7 s constraint does not apply.
|
||
MS-19 For each elementary stream of a Program Stream or Transport Stream, a presentation timestamp (PTS) shall be encoded for the first access unit. A decoding discontinuity exists at the start of an access unit An(j) in an elementary stream n if the decoding time tdn(j) of that access unit is greater than the largest value permissible given the specified tolerance on the system_clock_frequency. For video, except when trick mode status is true or when low_delay flag is '1', this is allowed only at the start of a video sequence. If a decoding discontinuity exists in any elementary video or audio stream in the Transport Stream or Program Stream, then a PTS shall be encoded referring to the first access unit after each decoding discontinuity except when trick mode status is true. When low_delay is '1' a PTS shall be encoded for the first access unit after an EBn or Bn underflow. A PTS may only be present in a ITU-T Rec. H.222.0 | ISO/IEC 13818-1 video or audio elementary stream PES packet header if the first byte of a picture start code or the first byte of an audio access unit is contained in the PES packet. A decoding_timestamp (DTS) shall appear in a PES packet header if and only if the following two conditions are met: • a PTS is present in the PES packet header; • the decoding time differs from the presentation time.
|
||
MS-20 If an audio sequence is coded using an ISO/IEC 13818-3 extension bitstream, corresponding decoding/presentation units in the two layers shall have identical PTS values.
|
||
MS-21 In a Program Stream, the P-STD_buffer_scale and P-STD_buffer_size fields shall occur in the first PES packet of each elementary stream and again whenever the value changes. They may also occur in any other PES packet. 2.7.8 Coding of system header in the Program Stream In a Program Stream, the system header may be present in any pack, immediately following the pack header. The system header shall be present in the first pack of an Program Stream. The values encoded in all the system headers in the Program Stream shall be identical.
|
||
MS-22 0x01 ISO/IEC 11172 Video 0x02 ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream 0x03 ISO/IEC 11172 Audio 0x04 ISO/IEC 13818-3 Audio 0x05 ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections 0x06 ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data
|
||
MS-23 hierarchy_embedded_layer_index – The hierarchy_embedded_layer_index is a 6-bit field that defines the hierarchy table index of the program element that needs to be accessed before decoding of the elementary stream associated with this hierarchy_descriptor. This field is undefined if the hierarchy_type value is 15 (base layer). hierarchy_channel – The hierarchy_channel is a 6-bit field that indicates the intended channel number for the associated program element in an ordered set of transmission channels. The most robust transmission channel is defined by the lowest value of this field with respect to the overall transmission hierarchy definition. NOTE – A given hierarchy_channel may at the same time be assigned to several program elements. Table 2-43 – Hierarchy descriptor Syntax No. of bits Mnemonic hierarchy_descriptor() { descriptor_tag 8 uimsbf descriptor_length 8 uimsbf reserved 4 bslbf hierarchy_type 4 uimsbf reserved 2 bslbf hierarchy_layer_index 6 uimsbf reserved 2 bslbf hierarchy_embedded_layer_index 6 uimsbf reserved 2 bslbf hierarchy_channel 6 uimsbf } Table 2-44 – Hierarchy_type field values Value Description 0 Reserved 1 ITU-T Rec. H.262 | ISO/IEC 13818-2 Spatial Scalability 2 ITU-T Rec. H.262 | ISO/IEC 13818-2 SNR Scalability 3 ITU-T Rec. H.262 | ISO/IEC 13818-2 Temporal Scalability 4 ITU-T Rec. H.262 | ISO/IEC 13818-2 Data partitioning 5 ISO/IEC 13818-3 Extension bitstream 6 ITU-T Rec.H222.0 | ISO/IEC 13818-1 Private Stream 7 ITU-T Rec. H.262 | ISO/IEC 13818-2 Multi-view Profile 8-14 Reserved 15 Base layer
|
||
MS-24 ISO_639_language_descriptor() { descriptor_tag 8 uimsbf descriptor_length 8 uimsbf for (i = 0; i < N; i++) { ISO_639_language_code 24 bslbf audio_type 8 bslbf } }
|
||
MS-25 4 X X hierarchy_descriptor 5 X X registration_descriptor 6 X X data_stream_alignment_descriptor 7 X X target_background_grid_descriptor 8 X X Video_window_descriptor 9 X X CA_descriptor 10 X X ISO_639_language_descriptor 11 X X System_clock_descriptor 12 X X Multiplex_buffer_utilization_descriptor 13 X X Copyright_descriptor 14 X Maximum_bitrate_descriptor 15 X X Private_data_indicator_descriptor 16 X X Smoothing_buffer_descriptor 17 X STD_descriptor 18 X X IBP_descriptor 19-26 X Defined in ISO/IEC 13818-6 27 X X MPEG-4_video_descriptor 28 X X MPEG-4_audio_descriptor 29 X X IOD_descriptor 30 X SL_descriptor 31 X X FMC_descriptor 32 X X External_ES_ID_descriptor 33 X X MuxCode_descriptor 34 X X FmxBufferSize_descriptor 35 X MultiplexBuffer_descriptor 36-63 n/a n/a ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved 64-255 n/a n/a User Private
|
||
MS-26 This is the CRC calculated with the polynomial: x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1
|
||
MS-27 1011 1100 1 program_stream_map 1011 1101 2 private_stream_1 1011 1110 padding_stream 1011 1111 3 private_stream_2 110x xxxx ISO/IEC 13818-3 or ISO/IEC 11172-3 or ISO/IEC 13818-7 or ISO/IEC 14496-3 audio stream number x xxxx 1110 xxxx ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 or ISO/IEC 14496-2 video stream number xxxx
|
||
MS-28 A range of private descriptors may be defined by the user. These descriptors shall commence with descriptor_tag and descriptor_length fields. For private descriptors, the value of descriptor_tag may take the values 64-55 as identified in Table 2-39. These descriptors may be placed within a program_stream_map()
|
||
MS-29 if (startcode == PRIVATE_STREAM_1) { avio_w8(ctx->pb, id); if (id >= 0xa0) { /* LPCM (XXX: check nb_frames) */ avio_w8(ctx->pb, 7); avio_wb16(ctx->pb, 4); /* skip 3 header bytes */ avio_w8(ctx->pb, stream->lpcm_header[0]); avio_w8(ctx->pb, stream->lpcm_header[1]); avio_w8(ctx->pb, stream->lpcm_header[2]); } else if (id >= 0x40) { /* AC-3 */ avio_w8(ctx->pb, nb_frames); avio_wb16(ctx->pb, trailer_size + 1); } }
|
||
MS-30 stream->lpcm_header[0] = 0x0c; stream->lpcm_header[1] = (freq << 4) | (((st->codecpar->bits_per_coded_sample - 16) / 4) << 6) | st->codecpar->ch_layout.nb_channels - 1; stream->lpcm_header[2] = 0x80;
|
||
MS-31 if (stream_id != program_stream_map && stream_id != padding_stream && stream_id != private_stream_2 && stream_id != ECM && stream_id != EMM && stream_id != program_stream_directory && stream_id != DSMCC_stream && stream_id != ITU-T Rec. H.222.1 type E stream) { '10' 2 bslbf PES_scrambling_control 2 bslbf
|