edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! Compatibility shim: the `symphonia` 0.6 umbrella surface edith consumes, |
| 2 | //! served by [`ec_probe`]. |
| 3 | //! |
| 4 | //! Two registries, exactly as the incumbent has them: |
| 5 | //! [`default::get_probe`] opens a file and [`default::get_codecs`] builds a |
| 6 | //! decoder for one of its tracks. Underneath, both are `ec_probe`: one sniffing |
| 7 | //! reader over WAV, MP3, FLAC, ADTS, Ogg, mp4 and Matroska, and one decoder |
| 8 | //! seat over the family's codecs. |
| 9 | //! |
| 10 | //! Two behaviours differ from the incumbent, deliberately, because they are |
| 11 | //! defects edith works around today: |
| 12 | //! |
| 13 | //! - **A seek is reliable more than once per reader.** The incumbent's mkv |
| 14 | //! seek neither clears its queued frames nor recovers its element iterator, |
| 15 | //! so edith opens a *new reader per seek attempt* |
| 16 | //! (`crates/engine/src/audio.rs`, `SymTrack::seek_to`). Here every seek is |
| 17 | //! served on the one reader the file was opened with, and the landing it |
| 18 | //! reports is the next packet's own timestamp. |
| 19 | //! - **A multichannel AAC track decodes.** The incumbent refuses anything |
| 20 | //! wider than stereo (`aac: aac too complex`), which is exactly a film's 5.1; |
| 21 | //! [`ec_aac`] decodes to 7.1, so `make_audio_decoder` does not refuse it. |
| 22 | //! |
| 23 | //! Written from the signatures edith calls and the crate's published |
| 24 | //! documentation; no symphonia source was read (it is MPL-2.0, this family is |
| 25 | //! MIT OR Apache-2.0). |
| 26 | |
| 27 | |
| 28 | |
| 29 | pub use symphonia_core as core; |
| 30 | |
| 31 | |
| 32 | |
| 33 | use |
| 34 | |
| 35 | ; |
| 36 | use |
| 37 | |
| 38 | ; |
| 39 | use ; |
| 40 | use MediaSourceStream; |
| 41 | use MetadataOptions; |
| 42 | use ; |
| 43 | |
| 44 | pub use ProbeReader; |
| 45 | |
| 46 | /// The registries, as the incumbent hands them out. |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | /// Opens a media source as whatever it turns out to be. |
| 62 | |
| 63 | ; |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | /// Which codecs have a decoder behind them. |
| 80 | |
| 81 | ; |
| 82 | |
| 83 | /// Every codec this registry serves, with the name it reports. |
| 84 | const REGISTERED: & = & |
| 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 |