This message was deleted.
# sdk-rust
s
This message was deleted.
b
But can you directly get those argb frames and feed them to the livekit VideoSource?
libwebrtc is already encoding the frames
If you also have I420 frames, you can easily ingest them
I see this line from your code, it seems you could directly ingest from that
b
oh wow, so do i send the frame or frame bytes?
would i have to use a similar method to the wav file example to ingest the frames into the vid_src like so
vid_src.capture_frame(frame)
b
You can take this example where I generate rgba data, then convert it to i420 and capture it
🙌 1
b
thanks, I'll try it out and give you feedback. Is there a video or demo of how the wgpu_room works?
b
I think running it may be easier to see 😄
b
ok, will do. thanks theo. I'll keep you posted.
hey @boundless-energy-78552, I run into this issue when trying to connect to a room using the rust sdk.
b
hey, make sure that the -ObjC flag is set when you’re compiling. https://github.com/livekit/rust-sdks/blob/main/.cargo/config
🙌 1
b
top tier
thanks a lot for the quick feedback theo
🙌 1
hey @boundless-energy-78552. I got something working - posted it in the main channel. Is it possible to receive room events in a separate thread? It currently doesn't log any text data messages / chat events when it's not in the same scope as the rx (UnboundedReceiver) variable.
@magnificent-art-43333 here's the issue i'm facing. Getting room inputs on a new thread
b
Hey, the code you sent should work (From what I see), it is perfectly valid to listen to the events channel in another task
b
I tried sending messages using the chat ui but i couldn't see the event logs from the receiver
b
maybe something is blocking your task?
🤔 1
It’s hard to see without the full code/more context
b
yh, I think I might be running into some threading issue. The code is in a private monorepo, but I'll see what I can do.
b
just tested with the basic_room example, and it worked
Maybe you can setup tokio-console to debug stuck tasks
b
sorry for the delay. I figured it be better if i quickly open sourced the code now instead of later.
open sourced it. https://github.com/cs50victor/kitt_2 ( code is super messy - tried to ship as fast as possible ). After watching OPENAI's DevDay event, I figured there are a lot of new cool use cases that'll enable kitt to be even more useful.
❤️ 4
🔥 2
b
Nice, this is awesome, I’ll try it once I have the time. Let me know if you weren’t able to find the issue 🙂
Thanks for sharing!
🙏 1
b
haven't uses tokio-console before, actively learning how to use it. pulling my hair out.
hey @boundless-energy-78552, I was able to also receive events when i tested it in the basic_room example. I put up a draft PR of the events receiver not picking up events like chat messages - https://github.com/livekit/rust-sdks/pull/233 . I've spent several hours trying to debug this issue. ( I'm fairly new to rust btw ). Would really love to quickly move past this, and work on adding features to kitt_2.
b
Hey, thanks for the reproducible example, going to take a look\
❤️ 1
Just took a look
It is because you’re not keeping a reference to the room
So the events channel is being closed
b
not close to my computer at the moment but you mean the line ‘let room = Arc:new(room)’ ?
👍 1
b
Yes, store this variable somewhere
b
Thanks. I’ll try it when i get home. Using channels in rust is more complex than i thought.
m
Uh oh, saying something against Rust might upset @boundless-energy-78552, Victor. 🫣 😂
😂 2
b
I actually love rust 😂 , but somethings are a pain in the rear. Like the long compile times.
🦀 1
it worked @boundless-energy-78552 🥲
😂 2
thanks
🙌 1