edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits
| 1 | //! The capability matrix against real files: what the unit test in |
| 2 | //! `demux::tests` asserts about the dispatch tables, this asserts about the |
| 3 | //! containers themselves — every codec the decoder layer can be handed opens |
| 4 | //! from *both* an mp4 and a Matroska file, and says its own name. |
| 5 | //! |
| 6 | //! The defect class it exists for: VP9 shipped decodable out of an mp4 and |
| 7 | //! refused out of a `.webm` with the VA-API VP9 decoder compiled in, because one |
| 8 | //! dispatch arm was missing while the refusal string claimed the capability was |
| 9 | //! absent. A gap must be a written-down row (`demux::UNSUPPORTED`), never a |
| 10 | //! silent fall-through. |
| 11 | //! |
| 12 | //! Nothing installed is needed: these are container reads, not decodes. |
| 13 | |
| 14 | use PathBuf; |
| 15 | |
| 16 | use Demuxer as _; |
| 17 | use AudioSession; |
| 18 | use ; |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | /// One row per cell of (codec × container). A cell with no fixture is a hole in |
| 27 | /// the evidence, so every one of them is filled here. |
| 28 | const MATRIX: & = & |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | ; |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | /// The depth cell of the matrix: 10-bit is a property of the stream, and VP9 |
| 53 | /// states it in the one place neither container repeats — the keyframe's |
| 54 | /// uncompressed header. Assumed 8-bit, a profile 2 stream decodes into an NV12 |
| 55 | /// pool and comes back as garbage. |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | /// The audio half, and the claim a refusal makes: every codec the "cannot be |
| 79 | /// decoded" notice names as readable really opens, per container. It read "AAC |
| 80 | /// and AC-3 only" while FLAC, MP3, Vorbis, ALAC and PCM all decoded out of a |
| 81 | /// Matroska file — a refusal that undersells sends a user re-encoding a film |
| 82 | /// whose sound already plays. |
| 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 | |
| 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 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | /// Which of two video tracks an mp4 opens on may not depend on hash order: it is |
| 152 | /// the first in `moov.traks`, file order, the same box the audio side numbers its |
| 153 | /// streams out of. A `HashMap` walk here made a saved `.edith` reopen on the |
| 154 | /// other picture from one launch to the next. |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 |