jellyflood/Shared/Objects/MediaComponents/AudoCodec.swift
Joe f5bd1b8fcd
Customizable Device Profiles (#1169)
* Rename ExperimentalSettingsView.swift to PlaybackQualitySettingsView.swift

Fix Merge

* Rename MaximumBitrateSettingsView.swift to PlaybackQualitySettingsView.swift

fix merge

* Re-implement on Main. Should now have all the Main changed. Added a new change to use the Device Profile as a Transcoding Profile.

* Part 1 -> Making VideoPlayerType into a struct (I Hope) correctly

* Part 1.1 -> Making VideoPlayerType into a struct (I Hope) correctly

* Remove unneeded Files

* Missing file + CustomDeviceProfileSelection -> CustomDeviceProfileAction Rename

* Change + to Appending

* Attempt to add StorageValues+User. Not sure if this is correct?

* Move the Array unwrapping to funcitons. Not required but this should help prevent accidently doing this wrong. Add subtitles back into the custom profiles since that somehow got dropped. Added a PlaybackCompatibility enum. This might need to work for more than just video

* Complete rewrite to allow multiple profiles, compatibility mode, and directplay.

* Hardward -> Hardware

* Update CustomDeviceProfileSettingsView.swift

Double Licensing

* It was actually really easy to implement iOS... Trash cans still look weird and small.

* Swipe to Delete instead of the edit button

* wip

* wip

* Linting

* tvOS Implementation

* wip

* wip

* cleanup

* Create Package.resolved

---------

Co-authored-by: Joseph Kribs <joseph@kribs.net>
Co-authored-by: Ethan Pippin <ethanpippin2343@gmail.com>
2024-09-02 15:33:02 -06:00

115 lines
2.5 KiB
Swift

//
// Swiftfin is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors
//
import Defaults
enum AudioCodec: String, CaseIterable, Codable, Displayable, Defaults.Serializable {
case aac
case ac3
case amr_nb
case amr_wb
case dts
case dts_hd
case eac3
case flac
case alac
case mlp
case mp1
case mp2
case mp3
case nellymoser
case opus
case pcm_alaw
case pcm_bluray
case pcm_dvd
case pcm_mulaw
case pcm_s16be
case pcm_s16le
case pcm_s24be
case pcm_s24le
case pcm_u8
case speex
case truehd
case vorbis
case wavpack
case wmalossless
case wmapro
case wmav1
case wmav2
var displayTitle: String {
switch self {
case .aac:
return "AAC"
case .ac3:
return "AC-3"
case .amr_nb:
return "AMR-NB"
case .amr_wb:
return "AMR-WB"
case .dts:
return "DTS"
case .dts_hd:
return "DTS-HD"
case .eac3:
return "E-AC-3"
case .flac:
return "FLAC"
case .alac:
return "ALAC"
case .mlp:
return "MLP"
case .mp1:
return "MP1"
case .mp2:
return "MP2"
case .mp3:
return "MP3"
case .nellymoser:
return "Nellymoser"
case .opus:
return "Opus"
case .pcm_alaw:
return "PCM ALAW"
case .pcm_bluray:
return "PCM Bluray"
case .pcm_dvd:
return "PCM DVD"
case .pcm_mulaw:
return "PCM MULAW"
case .pcm_s16be:
return "PCM S16BE"
case .pcm_s16le:
return "PCM S16LE"
case .pcm_s24be:
return "PCM S24BE"
case .pcm_s24le:
return "PCM S24LE"
case .pcm_u8:
return "PCM U8"
case .speex:
return "Speex"
case .truehd:
return "TrueHD"
case .vorbis:
return "Vorbis"
case .wavpack:
return "WavPack"
case .wmalossless:
return "WMA Lossless"
case .wmapro:
return "WMA Pro"
case .wmav1:
return "WMA V1"
case .wmav2:
return "WMA V2"
}
}
}