Skip to content

Commit

Permalink
videocall-daemon: Modify readme to include link (#178)
Browse files Browse the repository at this point in the history
* save

* save
  • Loading branch information
darioalessandro authored Dec 13, 2024
1 parent 2d87f49 commit 74939df
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion videocall-daemon/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion videocall-daemon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "videocall-daemon"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion videocall-daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## ✨ Features
- Stream video effortlessly from your desktop/robot/rpi.
- Works seamlessly with [videocall.rs](https://videocall.rs).
- Currently Supports Chrome, Chromium and Edge.
- Compatible with **local servers** or **production environments**.

---
Expand Down Expand Up @@ -37,7 +38,7 @@ videocall-daemon \
--fps 30
```

## 🌐 See Your Stream Live!
## 🌐 See Your Stream Live! using Chrome
This system integrates directly with [videocall.rs](https://videocall.rs). Simply navigate to the following URL to watch your stream live:

```
Expand Down
2 changes: 1 addition & 1 deletion videocall-daemon/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl CameraDaemon {
.unwrap()
];
Ok(std::thread::spawn(move || {
info!("Camera opened... waiting for frames");
debug!("Camera opened... waiting for frames");
let mut camera = Camera::new(
CameraIndex::Index(video_device_index),
RequestedFormat::new::<YuyvFormat>(RequestedFormatType::Closest(
Expand Down
14 changes: 12 additions & 2 deletions videocall-daemon/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use clap::Parser;

use tokio::sync::mpsc::channel;
use tracing::level_filters::LevelFilter;
use videocall_daemon::camera::{CameraConfig, CameraDaemon};
use videocall_daemon::microphone::MicrophoneDaemon;
use videocall_daemon::quic::{Client, Opt};
Expand All @@ -9,7 +10,9 @@ use videocall_daemon::quic::{Client, Opt};
async fn main() {
tracing::subscriber::set_global_default(
tracing_subscriber::FmtSubscriber::builder()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.with_env_filter(tracing_subscriber::EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy())
.finish(),
)
.unwrap();
Expand All @@ -28,6 +31,7 @@ async fn main() {
panic!("invalid framerate: {}", framerate);
}
let user_id = opt.user_id.clone();
let meeting_id = opt.meeting_id.clone();
let video_device_index = opt.video_device_index;
let audio_device = opt.audio_device.clone();
let mut client = Client::new(opt);
Expand All @@ -46,9 +50,15 @@ async fn main() {
let mut microphone = MicrophoneDaemon::default();
if let Some(audio_device) = audio_device {
microphone
.start(quic_tx, audio_device, user_id)
.start(quic_tx, audio_device, user_id.clone())
.expect("failed to start microphone");
}

tracing::info!(
"If you used the default url, the stream is ready at https://app.videocall.rs with meeting id:{} \n** warning: use Chrome or Chromium \n** warning: do no reuse the username {}",
meeting_id,
user_id
);
while let Some(data) = quic_rx.recv().await {
if let Err(e) = client.send_packet(data).await {
tracing::error!("Failed to send packet: {}", e);
Expand Down
10 changes: 9 additions & 1 deletion videocall-daemon/src/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ use videocall_types::protos::{
packet_wrapper::{packet_wrapper::PacketType, PacketWrapper},
};



/// Video Call Daemon
///
/// This daemon connects to the videocall.rs and streams audio and video to the specified meeting.
///
/// You can watch the video at https://videocall.rs/meeting/{user_id}/{meeting_id}
#[derive(Parser, Debug)]
#[clap(name = "client")]
pub struct Opt {
Expand All @@ -32,7 +40,7 @@ pub struct Opt {
pub user_id: String,

#[clap(long = "meeting-id")]
meeting_id: String,
pub meeting_id: String,

#[clap(long = "video-device-index")]
pub video_device_index: usize,
Expand Down

0 comments on commit 74939df

Please sign in to comment.