Remove buffer mode feature and relocate cache metrics
All checks were successful
Build and Release / build-and-release (push) Successful in 56s
All checks were successful
Build and Release / build-and-release (push) Successful in 56s
- Remove buffer mode toggle (Normal/Large/Huge) as demuxer settings do not significantly impact local file playback - Move cache duration metric from title bar to bottom status bar - Display cache alongside codec, bitrate, and sample rate info - Remove 'b' key binding and Buffer context menu option - Update version to 0.1.15
This commit is contained in:
@@ -21,6 +21,7 @@ pub struct Player {
|
||||
pub audio_codec: Option<String>,
|
||||
pub audio_bitrate: Option<f64>,
|
||||
pub sample_rate: Option<i64>,
|
||||
pub cache_duration: Option<f64>,
|
||||
}
|
||||
|
||||
impl Player {
|
||||
@@ -62,6 +63,7 @@ impl Player {
|
||||
audio_codec: None,
|
||||
audio_bitrate: None,
|
||||
sample_rate: None,
|
||||
cache_duration: None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -119,6 +121,7 @@ impl Player {
|
||||
self.audio_codec = None;
|
||||
self.audio_bitrate = None;
|
||||
self.sample_rate = None;
|
||||
self.cache_duration = None;
|
||||
|
||||
// Wait for socket to be created and mpv to be ready
|
||||
std::thread::sleep(Duration::from_millis(800));
|
||||
@@ -246,6 +249,13 @@ impl Player {
|
||||
self.is_idle = idle;
|
||||
}
|
||||
}
|
||||
|
||||
// Update cache duration (how many seconds are buffered ahead)
|
||||
if let Some(val) = self.get_property("demuxer-cache-duration") {
|
||||
self.cache_duration = val.as_f64();
|
||||
} else {
|
||||
self.cache_duration = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_metadata(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user