chore: cargo fmt

This commit is contained in:
Baud 2024-02-05 21:12:17 +00:00
parent f0ee6a0444
commit 621b085381
5 changed files with 30 additions and 27 deletions

View File

@ -2,5 +2,5 @@
pub struct ColorGeneratorState {
pub hue: u64,
pub saturation: u64,
pub luma: u64
pub luma: u64,
}

View File

@ -1,6 +1,9 @@
use std::collections::HashMap;
use crate::enums::{ExternalPortType, FairlightAnalogInputLevel, FairlightAudioMixOption, FairlightAudioSourceType, FairlightInputConfiguration, FairlightInputType};
use crate::enums::{
ExternalPortType, FairlightAnalogInputLevel, FairlightAudioMixOption, FairlightAudioSourceType,
FairlightInputConfiguration, FairlightInputType,
};
#[derive(Getters, new)]
pub struct FairlightAudioDynamicsState {
@ -8,7 +11,7 @@ pub struct FairlightAudioDynamicsState {
pub limiter: Option<FairlightAudioLimiterState>,
pub compressor: Option<FairlightAudioCompressorState>,
pub expander: Option<FairlightAudioExpanderState>
pub expander: Option<FairlightAudioExpanderState>,
}
#[derive(Getters, new)]
@ -17,7 +20,7 @@ pub struct FairlightAudioLimiterState {
pub threshold: u64,
pub attack: u64,
pub hold: u64,
pub release: u64
pub release: u64,
}
#[derive(Getters, new)]
@ -27,7 +30,7 @@ pub struct FairlightAudioCompressorState {
pub ratio: u64,
pub attack: u64,
pub hold: u64,
pub release: u64
pub release: u64,
}
#[derive(Getters, new)]
@ -39,7 +42,7 @@ pub struct FairlightAudioExpanderState {
pub ratio: u64,
pub attack: u64,
pub hold: u64,
pub release: u64
pub release: u64,
}
#[derive(Getters, new)]
@ -47,22 +50,22 @@ pub struct FairlightAudioEqualizerBandState {
pub band_enabled: bool,
supported_shapes: Vec<u64>, // TODO
pub shape: u64, // TODO
pub shape: u64, // TODO
supported_frequency_ranges: Vec<u64>, // TODO
pub frequency_ranges: u64, // TODO
pub frequency_ranges: u64, // TODO
pub frequency: u64,
pub gain: u64,
pub q_factor: u64
pub q_factor: u64,
}
#[derive(Getters, new)]
pub struct FairlightAudioMasterChannelPropertiesState {
// Gain in decibel, -Infinity to +6dB
pub fader_gain: u64,
pub follow_fade_to_black: bool
pub follow_fade_to_black: bool,
}
#[derive(Getters, new)]
@ -78,21 +81,21 @@ pub struct FairlightAudioMonitorChannel {
pub gain: u64,
pub input_master_gain: u64,
pub input_talkback_gain: u64,
pub input_sidetone_gain: u64
pub input_sidetone_gain: u64,
}
#[derive(Getters, new)]
pub struct FairlightAudioSource {
pub properties: Option<FairlightAudioSourcePropertiesState>,
pub equalizer: Option<FairlightAudioEqualizerState>,
pub dynamics: Option<FairlightAudioDynamicsState>
pub dynamics: Option<FairlightAudioDynamicsState>,
}
#[derive(Getters, new)]
pub struct FairlightAudioEqualizerState {
pub enabled: bool,
pub gain: u64,
bands: Vec<FairlightAudioEqualizerBandState>
bands: Vec<FairlightAudioEqualizerBandState>,
}
#[derive(Getters, new)]
@ -110,13 +113,13 @@ pub struct FairlightAudioSourcePropertiesState {
pub fader_gain: u64,
supported_mix_options: Vec<FairlightAudioMixOption>,
pub mix_option: FairlightAudioMixOption
pub mix_option: FairlightAudioMixOption,
}
#[derive(Getters, new)]
pub struct FairlightAudioInput {
pub properties: Option<FairlightAudioInputProperties>,
pub sources: HashMap<String, FairlightAudioSource>
pub sources: HashMap<String, FairlightAudioSource>,
}
#[derive(Getters, new)]
@ -128,7 +131,7 @@ pub struct FairlightAudioInputProperties {
pub active_configuration: FairlightInputConfiguration,
supported_input_levels: Vec<FairlightAnalogInputLevel>,
pub activeInputLevel: FairlightAnalogInputLevel
pub active_input_level: FairlightAnalogInputLevel,
}
#[derive(Getters, new)]
@ -137,5 +140,5 @@ pub struct AtemFairlightAudioState {
pub master: Option<FairlightAudioMasterChannel>,
pub monitor: Option<FairlightAudioMonitorChannel>,
pub audio_follow_video_crossfade_transition_enabled: Option<bool>
pub audio_follow_video_crossfade_transition_enabled: Option<bool>,
}

View File

@ -10,5 +10,5 @@ pub struct InputChannel {
pub external_port_type: ExternalPortType,
internal_port_type: InternalPortType,
source_availability: SourceAvailability,
me_availability: MeAvailability
me_availability: MeAvailability,
}

View File

@ -11,7 +11,7 @@ pub struct RecordingState {
pub duration: Option<Timecode>,
pub disks: HashMap<u64, RecordingDiskProperties>
pub disks: HashMap<u64, RecordingDiskProperties>,
}
#[derive(Getters, new)]
@ -19,7 +19,7 @@ pub struct RecordingDiskProperties {
pub disk_id: u64,
pub volume_name: String,
pub recording_time_available: u64,
pub status: RecordingDiskStatus
pub status: RecordingDiskStatus,
}
#[derive(Getters, new)]
@ -27,7 +27,7 @@ pub struct RecordingStateStatus {
pub state: RecordingStatus,
pub error: RecordingError,
pub recording_time_available: u64
pub recording_time_available: u64,
}
#[derive(Getters, new)]
@ -37,5 +37,5 @@ pub struct RecordingStateProperties {
pub working_set_1_disk_id: u64,
pub working_set_2_disk_id: u64,
pub record_in_all_cameras: bool
pub record_in_all_cameras: bool,
}

View File

@ -8,19 +8,19 @@ pub struct StreamingState {
pub stats: Option<StreamingStateStats>,
pub service: StreamingServiceProperties,
pub duration: Option<Timecode>
pub duration: Option<Timecode>,
}
#[derive(Getters, new)]
pub struct StreamingStateStatus {
state: StreamingStatus,
error: StreamingError
error: StreamingError,
}
#[derive(Getters, new)]
pub struct StreamingStateStats {
cache_used: u64,
encoding_bitrate: u64
encoding_bitrate: u64,
}
pub struct StreamingServiceProperties {
@ -28,5 +28,5 @@ pub struct StreamingServiceProperties {
pub url: String,
pub key: String,
bitrates: (u64, u64)
bitrates: (u64, u64),
}