🏡 index : ~doyle/scrs.git

author Jordan Doyle <jordan@doyle.la> 2020-08-16 14:20:52.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2020-08-16 14:20:52.0 +01:00:00
commit
85aca7e56612ab342d0d00d3d8694c7fb4571a45 [patch]
tree
a67fe219b35b8a4aab5ba93870086fa58f32f658
parent
e832fffa934d4ea14820316e4d1af285af07d732
download
85aca7e56612ab342d0d00d3d8694c7fb4571a45.tar.gz

Bump version of bus_queue to master to prevent eprintln spam



Diff

 Cargo.lock               | 10 ++++++++++
 scrs-serve/Cargo.toml    |  2 +-
 scrs-serve/src/stream.rs | 12 +++++++++---
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 6eeebf8..aa914b6 100644
--- a/Cargo.lock
+++ a/Cargo.lock
@@ -50,10 +50,10 @@
[[package]]
name = "bus_queue"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e98e34ec054d0202019aa721ab322ef0bd018216233d0a4043526158123496d"
source = "git+https://github.com/filipdulic/bus-queue.git?rev=48796ef8b56fb352effa9afb0c4c05b7c795d633#48796ef8b56fb352effa9afb0c4c05b7c795d633"
dependencies = [
 "arc-swap",
 "event-listener",
 "futures-core",
 "futures-sink",
]
@@ -160,6 +160,12 @@
 "regex",
 "termcolor",
]

[[package]]
name = "event-listener"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "043d21a617dda31c36aed31a38f4ebb643a6fa55c2963fd9f0cc1c831e5095d7"

[[package]]
name = "fnv"
diff --git a/scrs-serve/Cargo.toml b/scrs-serve/Cargo.toml
index 0b87003..508ca3f 100644
--- a/scrs-serve/Cargo.toml
+++ a/scrs-serve/Cargo.toml
@@ -7,7 +7,7 @@
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bus_queue = "0.5"
bus_queue = { git = "https://github.com/filipdulic/bus-queue.git", rev = "48796ef8b56fb352effa9afb0c4c05b7c795d633" }
futures = "0.3"
tokio = { version = "0.2", features = ["full"] }
http = "0.2"
diff --git a/scrs-serve/src/stream.rs b/scrs-serve/src/stream.rs
index ba47eed..9af8435 100644
--- a/scrs-serve/src/stream.rs
+++ a/scrs-serve/src/stream.rs
@@ -1,4 +1,4 @@
use bus_queue::flavors::arc_swap::{bounded, Publisher, Subscriber};
use bus_queue::flavors::arc_swap::{async_bounded, AsyncPublisher, AsyncSubscriber};
use bytes::Bytes;
use mime::Mime;
use std::sync::atomic::{AtomicU64, Ordering};
@@ -8,8 +8,8 @@
use crate::metadata::MetadataContainer;

pub struct Stream {
    publisher: Mutex<Publisher<Bytes>>,
    subscriber: Subscriber<Bytes>,
    publisher: Mutex<AsyncPublisher<Bytes>>,
    subscriber: AsyncSubscriber<Bytes>,
    metadata: MetadataContainer,
    #[allow(dead_code)] // unimplemented
    bitrate: usize,
@@ -23,7 +23,7 @@

impl From<crate::config::StreamConfig> for Stream {
    fn from(config: crate::config::StreamConfig) -> Self {
        let (publisher, subscriber) = bounded::<Bytes>(config.buffer_size);
        let (publisher, subscriber) = async_bounded::<Bytes>(config.buffer_size);

        let content_type: Mime = config.content_type.parse().unwrap();

@@ -63,11 +63,11 @@
}

pub struct BroadcastHandle<'a> {
    pub publisher: tokio::sync::MutexGuard<'a, Publisher<Bytes>>,
    pub publisher: tokio::sync::MutexGuard<'a, AsyncPublisher<Bytes>>,
}

pub struct Listener<'a> {
    pub subscriber: Subscriber<Bytes>,
    pub subscriber: AsyncSubscriber<Bytes>,
    listener_count: &'a AtomicU64,
}