update la webapp
This commit is contained in:
@@ -447,7 +447,7 @@ impl StreamingFlacSink {
|
||||
|
||||
/// Create a sink with a custom broadcast pacing limit and options.
|
||||
pub fn with_options(
|
||||
encoder_options: EncoderOptions,
|
||||
mut encoder_options: EncoderOptions,
|
||||
bits_per_sample: u8,
|
||||
broadcast_max_lead_time: f64,
|
||||
options: StreamingSinkOptions,
|
||||
@@ -457,6 +457,9 @@ impl StreamingFlacSink {
|
||||
panic!("bits_per_sample must be 16, 24, or 32");
|
||||
}
|
||||
|
||||
// Transfer server_base_url from StreamingSinkOptions to EncoderOptions
|
||||
encoder_options.server_base_url = options.server_base_url.clone();
|
||||
|
||||
// Create PCM channel (bounded for backpressure)
|
||||
let (pcm_tx, pcm_rx) = mpsc::channel::<PcmChunk>(16);
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ impl StreamingOggFlacSink {
|
||||
|
||||
/// Create a sink with a custom broadcast pacing limit and options.
|
||||
pub fn with_options(
|
||||
encoder_options: EncoderOptions,
|
||||
mut encoder_options: EncoderOptions,
|
||||
bits_per_sample: u8,
|
||||
broadcast_max_lead_time: f64,
|
||||
options: StreamingSinkOptions,
|
||||
@@ -406,6 +406,9 @@ impl StreamingOggFlacSink {
|
||||
panic!("bits_per_sample must be 16, 24, or 32");
|
||||
}
|
||||
|
||||
// Transfer server_base_url from StreamingSinkOptions to EncoderOptions
|
||||
encoder_options.server_base_url = options.server_base_url.clone();
|
||||
|
||||
// Create PCM channel (bounded for backpressure)
|
||||
let (pcm_tx, pcm_rx) = mpsc::channel::<PcmChunk>(16);
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ pub struct StreamingSinkOptions {
|
||||
pub default_title: Option<String>,
|
||||
pub default_artist: Option<String>,
|
||||
pub use_only_default_metadata: bool,
|
||||
pub server_base_url: Option<String>,
|
||||
}
|
||||
|
||||
impl StreamingSinkOptions {
|
||||
@@ -63,6 +64,7 @@ impl StreamingSinkOptions {
|
||||
default_title: None,
|
||||
default_artist: None,
|
||||
use_only_default_metadata: false,
|
||||
server_base_url: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +75,7 @@ impl StreamingSinkOptions {
|
||||
default_title: None,
|
||||
default_artist: None,
|
||||
use_only_default_metadata: false,
|
||||
server_base_url: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +103,11 @@ impl StreamingSinkOptions {
|
||||
self.use_only_default_metadata = only_default;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_server_base_url(mut self, url: impl Into<Option<String>>) -> Self {
|
||||
self.server_base_url = url.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Shared handle state for streaming sinks.
|
||||
|
||||
Reference in New Issue
Block a user