mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Remove and update dependencies (#1140)
This commit is contained in:
parent
a7fb7ee673
commit
e14dac3ff3
10 changed files with 707 additions and 703 deletions
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
toolchain:
|
toolchain:
|
||||||
- "1.61" # MSRV (Minimum supported rust version)
|
- "1.64" # MSRV (Minimum supported rust version)
|
||||||
- stable
|
- stable
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
# Ignore failures in beta
|
# Ignore failures in beta
|
||||||
|
@ -113,7 +113,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest]
|
os: [windows-latest]
|
||||||
toolchain:
|
toolchain:
|
||||||
- "1.61" # MSRV (Minimum supported rust version)
|
- "1.64" # MSRV (Minimum supported rust version)
|
||||||
- stable
|
- stable
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -160,7 +160,7 @@ jobs:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
target: [armv7-unknown-linux-gnueabihf]
|
target: [armv7-unknown-linux-gnueabihf]
|
||||||
toolchain:
|
toolchain:
|
||||||
- "1.61" # MSRV (Minimum supported rust version)
|
- "1.64" # MSRV (Minimum supported rust version)
|
||||||
- stable
|
- stable
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
1348
Cargo.lock
generated
1348
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -50,7 +50,7 @@ path = "protocol"
|
||||||
version = "0.5.0-dev"
|
version = "0.5.0-dev"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = { version = "0.9", default-features = false, features = ["termcolor", "humantime", "atty"] }
|
env_logger = { version = "0.10", default-features = false, features = ["color", "humantime", "auto-color"] }
|
||||||
futures-util = { version = "0.3", default_features = false }
|
futures-util = { version = "0.3", default_features = false }
|
||||||
getopts = "0.2"
|
getopts = "0.2"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
|
|
@ -22,7 +22,7 @@ dns-sd = { version = "0.1", optional = true }
|
||||||
form_urlencoded = "1.0"
|
form_urlencoded = "1.0"
|
||||||
futures-core = "0.3"
|
futures-core = "0.3"
|
||||||
futures-util = { version = "0.3", features = ["alloc", "bilock", "sink", "unstable"] }
|
futures-util = { version = "0.3", features = ["alloc", "bilock", "sink", "unstable"] }
|
||||||
governor = { version = "0.4", default-features = false, features = ["std", "jitter"] }
|
governor = { version = "0.5", default-features = false, features = ["std", "jitter"] }
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
hmac = "0.12"
|
hmac = "0.12"
|
||||||
httparse = "1.7"
|
httparse = "1.7"
|
||||||
|
@ -32,14 +32,13 @@ hyper-proxy = { version = "0.9", default-features = false, features = ["rustls"]
|
||||||
hyper-rustls = { version = "0.23", features = ["http2"] }
|
hyper-rustls = { version = "0.23", features = ["http2"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
nonzero_ext = "0.3"
|
nonzero_ext = "0.3"
|
||||||
num = "0.4"
|
|
||||||
num-bigint = { version = "0.4", features = ["rand"] }
|
num-bigint = { version = "0.4", features = ["rand"] }
|
||||||
num-derive = "0.3"
|
num-derive = "0.3"
|
||||||
num-integer = "0.1"
|
num-integer = "0.1"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
||||||
pbkdf2 = { version = "0.11", default-features = false, features = ["hmac"] }
|
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
|
||||||
priority-queue = "1.2"
|
priority-queue = "1.2"
|
||||||
protobuf = "3"
|
protobuf = "3"
|
||||||
quick-xml = { version = "0.23", features = ["serialize"] }
|
quick-xml = { version = "0.23", features = ["serialize"] }
|
||||||
|
@ -49,7 +48,7 @@ serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
sha1 = "0.10"
|
sha1 = "0.10"
|
||||||
shannon = "0.2"
|
shannon = "0.2"
|
||||||
sysinfo = { version = "0.27", default-features = false }
|
sysinfo = { version = "0.28", default-features = false }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
time = { version = "0.3", features = ["formatting", "parsing"] }
|
time = { version = "0.3", features = ["formatting", "parsing"] }
|
||||||
tokio = { version = "1", features = ["io-util", "macros", "net", "parking_lot", "rt", "sync", "time"] }
|
tokio = { version = "1", features = ["io-util", "macros", "net", "parking_lot", "rt", "sync", "time"] }
|
||||||
|
@ -64,7 +63,7 @@ rand = "0.8"
|
||||||
vergen = { version = "7", default-features = false, features = ["build", "git"] }
|
vergen = { version = "7", default-features = false, features = ["build", "git"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.9"
|
env_logger = "0.10"
|
||||||
tokio = { version = "1", features = ["macros", "parking_lot"] }
|
tokio = { version = "1", features = ["macros", "parking_lot"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -2,8 +2,7 @@ use std::io::{self, Read};
|
||||||
|
|
||||||
use aes::Aes192;
|
use aes::Aes192;
|
||||||
use byteorder::{BigEndian, ByteOrder};
|
use byteorder::{BigEndian, ByteOrder};
|
||||||
use hmac::Hmac;
|
use pbkdf2::pbkdf2_hmac;
|
||||||
use pbkdf2::pbkdf2;
|
|
||||||
use protobuf::Enum;
|
use protobuf::Enum;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use sha1::{Digest, Sha1};
|
use sha1::{Digest, Sha1};
|
||||||
|
@ -96,7 +95,7 @@ impl Credentials {
|
||||||
return Err(AuthenticationError::Key.into());
|
return Err(AuthenticationError::Key.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
pbkdf2::<Hmac<Sha1>>(&secret, username.as_bytes(), 0x100, &mut key[0..20]);
|
pbkdf2_hmac::<Sha1>(&secret, username.as_bytes(), 0x100, &mut key[0..20]);
|
||||||
|
|
||||||
let hash = &Sha1::digest(&key[..20]);
|
let hash = &Sha1::digest(&key[..20]);
|
||||||
key[..20].copy_from_slice(hash);
|
key[..20].copy_from_slice(hash);
|
||||||
|
|
|
@ -31,16 +31,16 @@ tokio = { version = "1", features = ["parking_lot", "rt", "rt-multi-thread", "sy
|
||||||
zerocopy = "0.6"
|
zerocopy = "0.6"
|
||||||
|
|
||||||
# Backends
|
# Backends
|
||||||
alsa = { version = "0.6", optional = true }
|
alsa = { version = "0.7", optional = true }
|
||||||
portaudio-rs = { version = "0.3", optional = true }
|
portaudio-rs = { version = "0.3", optional = true }
|
||||||
libpulse-binding = { version = "2", optional = true, default-features = false }
|
libpulse-binding = { version = "2", optional = true, default-features = false }
|
||||||
libpulse-simple-binding = { version = "2", optional = true, default-features = false }
|
libpulse-simple-binding = { version = "2", optional = true, default-features = false }
|
||||||
jack = { version = "0.11", optional = true }
|
jack = { version = "0.11", optional = true }
|
||||||
sdl2 = { version = "0.35", optional = true }
|
sdl2 = { version = "0.35", optional = true }
|
||||||
gstreamer = { version = "0.18", optional = true }
|
gstreamer = { version = "0.20", optional = true }
|
||||||
gstreamer-app = { version = "0.18", optional = true }
|
gstreamer-app = { version = "0.20", optional = true }
|
||||||
gstreamer-audio = { version = "0.18", optional = true }
|
gstreamer-audio = { version = "0.20", optional = true }
|
||||||
glib = { version = "0.15", optional = true }
|
glib = { version = "0.17", optional = true }
|
||||||
|
|
||||||
# Rodio dependencies
|
# Rodio dependencies
|
||||||
rodio = { version = "0.17.1", optional = true, default-features = false }
|
rodio = { version = "0.17.1", optional = true, default-features = false }
|
||||||
|
@ -50,7 +50,7 @@ cpal = { version = "0.15.1", optional = true }
|
||||||
symphonia = { version = "0.5", default-features = false, features = ["mp3", "ogg", "vorbis"] }
|
symphonia = { version = "0.5", default-features = false, features = ["mp3", "ogg", "vorbis"] }
|
||||||
|
|
||||||
# Legacy Ogg container decoder for the passthrough decoder
|
# Legacy Ogg container decoder for the passthrough decoder
|
||||||
ogg = { version = "0.8", optional = true }
|
ogg = { version = "0.9", optional = true }
|
||||||
|
|
||||||
# Dithering
|
# Dithering
|
||||||
rand = { version = "0.8", features = ["small_rng"] }
|
rand = { version = "0.8", features = ["small_rng"] }
|
||||||
|
|
|
@ -48,7 +48,8 @@ impl Open for GstreamerSink {
|
||||||
let gst_bytes = NUM_CHANNELS as usize * 2048 * sample_size;
|
let gst_bytes = NUM_CHANNELS as usize * 2048 * sample_size;
|
||||||
|
|
||||||
let pipeline = gst::Pipeline::new(None);
|
let pipeline = gst::Pipeline::new(None);
|
||||||
let appsrc = gst::ElementFactory::make("appsrc", None)
|
let appsrc = gst::ElementFactory::make("appsrc")
|
||||||
|
.build()
|
||||||
.expect("Failed to create GStreamer appsrc element")
|
.expect("Failed to create GStreamer appsrc element")
|
||||||
.downcast::<gst_app::AppSrc>()
|
.downcast::<gst_app::AppSrc>()
|
||||||
.expect("couldn't cast AppSrc element at runtime!");
|
.expect("couldn't cast AppSrc element at runtime!");
|
||||||
|
|
|
@ -14,7 +14,7 @@ use crate::{
|
||||||
MS_PER_PAGE, PAGES_PER_MS,
|
MS_PER_PAGE, PAGES_PER_MS,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn get_header<T>(code: u8, rdr: &mut PacketReader<T>) -> DecoderResult<Box<[u8]>>
|
fn get_header<T>(code: u8, rdr: &mut PacketReader<T>) -> DecoderResult<Vec<u8>>
|
||||||
where
|
where
|
||||||
T: Read + Seek,
|
T: Read + Seek,
|
||||||
{
|
{
|
||||||
|
@ -29,19 +29,19 @@ where
|
||||||
return Err(DecoderError::PassthroughDecoder("Invalid Data".into()));
|
return Err(DecoderError::PassthroughDecoder("Invalid Data".into()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(pck.data.into_boxed_slice())
|
Ok(pck.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct PassthroughDecoder<R: Read + Seek> {
|
pub struct PassthroughDecoder<R: Read + Seek> {
|
||||||
rdr: PacketReader<R>,
|
rdr: PacketReader<R>,
|
||||||
wtr: PacketWriter<Vec<u8>>,
|
wtr: PacketWriter<'static, Vec<u8>>,
|
||||||
eos: bool,
|
eos: bool,
|
||||||
bos: bool,
|
bos: bool,
|
||||||
ofsgp_page: u64,
|
ofsgp_page: u64,
|
||||||
stream_serial: u32,
|
stream_serial: u32,
|
||||||
ident: Box<[u8]>,
|
ident: Vec<u8>,
|
||||||
comment: Box<[u8]>,
|
comment: Vec<u8>,
|
||||||
setup: Box<[u8]>,
|
setup: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R: Read + Seek> PassthroughDecoder<R> {
|
impl<R: Read + Seek> PassthroughDecoder<R> {
|
||||||
|
@ -98,7 +98,7 @@ impl<R: Read + Seek> AudioDecoder for PassthroughDecoder<R> {
|
||||||
let absgp_page = pck.absgp_page() - self.ofsgp_page;
|
let absgp_page = pck.absgp_page() - self.ofsgp_page;
|
||||||
self.wtr
|
self.wtr
|
||||||
.write_packet(
|
.write_packet(
|
||||||
pck.data.into_boxed_slice(),
|
pck.data,
|
||||||
self.stream_serial,
|
self.stream_serial,
|
||||||
PacketWriteEndInfo::EndStream,
|
PacketWriteEndInfo::EndStream,
|
||||||
absgp_page,
|
absgp_page,
|
||||||
|
@ -196,7 +196,7 @@ impl<R: Read + Seek> AudioDecoder for PassthroughDecoder<R> {
|
||||||
|
|
||||||
self.wtr
|
self.wtr
|
||||||
.write_packet(
|
.write_packet(
|
||||||
pck.data.into_boxed_slice(),
|
pck.data,
|
||||||
self.stream_serial,
|
self.stream_serial,
|
||||||
inf,
|
inf,
|
||||||
pckgp_page - self.ofsgp_page,
|
pckgp_page - self.ofsgp_page,
|
||||||
|
|
|
@ -11,8 +11,8 @@ use symphonia::{
|
||||||
units::Time,
|
units::Time,
|
||||||
},
|
},
|
||||||
default::{
|
default::{
|
||||||
codecs::{Mp3Decoder, VorbisDecoder},
|
codecs::{MpaDecoder, VorbisDecoder},
|
||||||
formats::{Mp3Reader, OggReader},
|
formats::{MpaReader, OggReader},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ impl SymphoniaDecoder {
|
||||||
let format: Box<dyn FormatReader> = if AudioFiles::is_ogg_vorbis(file_format) {
|
let format: Box<dyn FormatReader> = if AudioFiles::is_ogg_vorbis(file_format) {
|
||||||
Box::new(OggReader::try_new(mss, &format_opts)?)
|
Box::new(OggReader::try_new(mss, &format_opts)?)
|
||||||
} else if AudioFiles::is_mp3(file_format) {
|
} else if AudioFiles::is_mp3(file_format) {
|
||||||
Box::new(Mp3Reader::try_new(mss, &format_opts)?)
|
Box::new(MpaReader::try_new(mss, &format_opts)?)
|
||||||
} else {
|
} else {
|
||||||
return Err(DecoderError::SymphoniaDecoder(format!(
|
return Err(DecoderError::SymphoniaDecoder(format!(
|
||||||
"Unsupported format: {file_format:?}"
|
"Unsupported format: {file_format:?}"
|
||||||
|
@ -63,7 +63,7 @@ impl SymphoniaDecoder {
|
||||||
let decoder: Box<dyn Decoder> = if AudioFiles::is_ogg_vorbis(file_format) {
|
let decoder: Box<dyn Decoder> = if AudioFiles::is_ogg_vorbis(file_format) {
|
||||||
Box::new(VorbisDecoder::try_new(&track.codec_params, &decoder_opts)?)
|
Box::new(VorbisDecoder::try_new(&track.codec_params, &decoder_opts)?)
|
||||||
} else if AudioFiles::is_mp3(file_format) {
|
} else if AudioFiles::is_mp3(file_format) {
|
||||||
Box::new(Mp3Decoder::try_new(&track.codec_params, &decoder_opts)?)
|
Box::new(MpaDecoder::try_new(&track.codec_params, &decoder_opts)?)
|
||||||
} else {
|
} else {
|
||||||
return Err(DecoderError::SymphoniaDecoder(format!(
|
return Err(DecoderError::SymphoniaDecoder(format!(
|
||||||
"Unsupported decoder: {file_format:?}"
|
"Unsupported decoder: {file_format:?}"
|
||||||
|
|
|
@ -13,5 +13,4 @@ edition = "2021"
|
||||||
protobuf = "3"
|
protobuf = "3"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
glob = "0.3"
|
|
||||||
protobuf-codegen = "3"
|
protobuf-codegen = "3"
|
||||||
|
|
Loading…
Reference in a new issue