edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB7947774Tahinli1 month ago3899 commits
| 1 | //! `cc_data` triplets and their carriage wrappers. |
| 2 | |
| 3 | /// One `cc_data` construct: `cc_valid`, `cc_type` and two data bytes. |
| 4 | /// |
| 5 | /// `cc_type` 0 is NTSC line 21 field 1, 1 is field 2, 2 is a DTVCC packet continuation and 3 a |
| 6 | /// DTVCC packet start. |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | /// Parse a `cc_data()` structure (flags byte first). `None` when `process_cc_data_flag` is clear |
| 18 | /// or the buffer is too short. |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | /// Parse the body of an SEI `user_data_registered_itu_t_t35` message (country code first). |
| 39 | /// Accepts ATSC `GA94` (provider 0x0031) and the DIRECTV variant (provider 0x002F). |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | /// Parse MPEG-2 `user_data()` bytes (after the `00 00 01 B2` start code): ATSC `GA94` or the DVD |
| 53 | /// `CC 01 F8` form. |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | /// Parse a CDP (SMPTE 334-2 caption distribution packet) and return its `ccdata_section`. |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | /// Triplets of a QuickTime `c608` sample: `cdat` boxes carry field 1 pairs, `cdt2` field 2. |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | /// Triplets of a QuickTime `c708` sample: `ccdp` boxes hold a CDP each. |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | /// Raw `cc_type 0` byte pairs of an elementary caption track (mkv/mp4 tracks that store bare |
| 160 | /// 608 pairs, possibly field-tagged by the caller). |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 |