diff --git a/Cargo.lock b/Cargo.lock index bbeb2eb..ecab629 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1569,8 +1569,9 @@ dependencies = [ [[package]] name = "servicepoint" -version = "0.14.0" -source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#8ddbaeaaa64a4abb8ffb8b08a3a84cc1135e312f" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6bd5cfa49c73aeecb344680ffbf697abf73e0563a441b93b9723ae43867500f" dependencies = [ "bitvec", "log", diff --git a/Cargo.toml b/Cargo.toml index cc386bf..08994a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,7 @@ fast_image_resize = { version = "5.1.2", features = ["image"] } [dependencies.servicepoint] package = "servicepoint" -version = "0.14.0" -git = "https://git.berlin.ccc.de/servicepoint/servicepoint/" -branch = "next" +version = "0.14.1" [profile.release] lto = true # Enable link-time optimization diff --git a/src/brightness.rs b/src/brightness.rs index c2011de..469727f 100644 --- a/src/brightness.rs +++ b/src/brightness.rs @@ -1,7 +1,7 @@ use std::net::UdpSocket; use crate::cli::BrightnessCommand; use log::info; -use servicepoint::{Brightness, GlobalBrightnessCommand, SendCommandExt}; +use servicepoint::{Brightness, GlobalBrightnessCommand, UdpSocketExt}; pub(crate) fn brightness(connection: &UdpSocket, brightness_command: BrightnessCommand) { match brightness_command { diff --git a/src/ledwand_dither.rs b/src/ledwand_dither.rs index 5c73358..61a3d3c 100644 --- a/src/ledwand_dither.rs +++ b/src/ledwand_dither.rs @@ -1,7 +1,7 @@ //! Based on https://github.com/WarkerAnhaltRanger/CCCB_Ledwand use image::GrayImage; -use servicepoint::{BitVecU8Msb0, Bitmap, PIXEL_HEIGHT}; +use servicepoint::{DisplayBitVec, Bitmap, PIXEL_HEIGHT}; type GrayHistogram = [usize; 256]; @@ -169,7 +169,7 @@ pub(crate) fn ostromoukhov_dither(source: GrayImage, bias: u8) -> Bitmap { assert_eq!(width % 8, 0); let mut source = source.into_raw(); - let mut destination = BitVecU8Msb0::repeat(false, source.len()); + let mut destination = DisplayBitVec::repeat(false, source.len()); for y in 0..height as usize { let start = y * width as usize; @@ -206,7 +206,7 @@ pub(crate) fn ostromoukhov_dither(source: GrayImage, bias: u8) -> Bitmap { #[inline] fn ostromoukhov_dither_pixel( source: &mut [u8], - destination: &mut BitVecU8Msb0, + destination: &mut DisplayBitVec, position: usize, width: usize, last_row: bool, diff --git a/src/pixels.rs b/src/pixels.rs index fdaf9f1..d22b39a 100644 --- a/src/pixels.rs +++ b/src/pixels.rs @@ -5,7 +5,7 @@ use crate::{ stream_window::stream_window }; use log::info; -use servicepoint::{BinaryOperation, BitVecCommand, BitVecU8Msb0, BitmapCommand, ClearCommand, CompressionCode, Origin, SendCommandExt, PIXEL_COUNT}; +use servicepoint::{BinaryOperation, BitVecCommand, UdpSocketExt, BitmapCommand, ClearCommand, CompressionCode, DisplayBitVec, Origin, PIXEL_COUNT}; pub(crate) fn pixels(connection: &UdpSocket, pixel_command: PixelCommand) { match pixel_command { @@ -24,7 +24,7 @@ pub(crate) fn pixels(connection: &UdpSocket, pixel_command: PixelCommand) { } fn pixels_on(connection: &UdpSocket) { - let mask = BitVecU8Msb0::repeat(true, PIXEL_COUNT); + let mask = DisplayBitVec::repeat(true, PIXEL_COUNT); let command = BitVecCommand{offset: 0, bitvec: mask, compression: CompressionCode::Lzma, operation: BinaryOperation::Overwrite}; connection .send_command(command) @@ -33,7 +33,7 @@ fn pixels_on(connection: &UdpSocket) { } fn pixels_invert(connection: &UdpSocket) { - let mask = BitVecU8Msb0::repeat(true, PIXEL_COUNT); + let mask = DisplayBitVec::repeat(true, PIXEL_COUNT); let command = BitVecCommand{offset: 0, bitvec: mask, compression: CompressionCode::Lzma, operation: BinaryOperation::Xor}; connection .send_command(command) diff --git a/src/stream_window.rs b/src/stream_window.rs index f5f1176..971e12d 100644 --- a/src/stream_window.rs +++ b/src/stream_window.rs @@ -10,7 +10,7 @@ use scap::{ frame::convert_bgra_to_rgb, frame::Frame, }; -use servicepoint::{BitmapCommand, CompressionCode, Origin, SendCommandExt, FRAME_PACING}; +use servicepoint::{BitmapCommand, CompressionCode, Origin, UdpSocketExt, FRAME_PACING}; use std::time::{Duration, Instant}; pub fn stream_window(