diff --git a/.gitignore b/.gitignore index b7f084a..d1fe83b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ **/*.rs.bk Cargo.lock extern/ +config.toml #Added by cargo # diff --git a/src/config.rs b/src/config.rs index 69213f8..68e2705 100644 --- a/src/config.rs +++ b/src/config.rs @@ -42,10 +42,9 @@ pub struct TargetConfig { username: String, } - - pub fn get_config_directory(botname: &str) -> Result { let mut home = dirs::home_dir().expect("no home directory found"); + // TODO make this fit LFS guidelines home.push(botname); return Ok(home); diff --git a/src/gstream.rs b/src/gstream.rs index 99e104c..7af8c33 100644 --- a/src/gstream.rs +++ b/src/gstream.rs @@ -4,37 +4,12 @@ extern crate gstreamer as gst; use gst::gst_element_error; use gst::prelude::*; - -// I don't understand why I need the type length limit - -use async_trait::async_trait; - -use tracing_subscriber; -use std::{env, io, process::exit}; - -use matrix_sdk::{ - self, - events::{ - room::message::{MessageEventContent, TextMessageEventContent}, - room::member::{MemberEventContent}, StrippedStateEvent, - SyncMessageEvent, AnySyncMessageEvent, AnySyncMessageEvent::{CallInvite, CallCandidates, CallHangup, CallAnswer}, - call::invite::InviteEventContent, - call::SessionDescription, - AnySyncRoomEvent::Message, - AnyToDeviceEvent, - }, - identifiers::{DeviceId, RoomId, UserId}, - Client, ClientConfig, EventEmitter, JsonStore, SyncRoom, SyncSettings, Room, - locks::RwLock, CustomEvent, - Sas, -}; - -use matrix_sdk_common::Raw; -use url::Url; -use dirs; -use std::sync::Arc; use anyhow; +// TBD, how to manage the gstreamer instance/mode/whatever. Throw it in an Arc? +// I should use a channel and an async task to work with it since it can be a little weird +// and I want it to never be able to block the matrix side of things + pub fn foo() -> Result { // Dummy webrtc pipeline, it sends test sources to the webrtc type