-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create VideoData #5
Comments
Ah yes, I've actually not tried sending NDI using the library either yet. I think currently you would need to set up a video frame using a bunch of unsafe pointer stuff and messing with memory directly. I can try and figure out what it expects that data to be and try to create something that's somewhat reasonable for a rust API. It might take a bit since I'm currently moving out of my apartment but if you end up figuring it out before me feel free to send a PR! |
a simple solution could be to make an interface to create VideoData like this... impl VideoData {
...
pub fn from_buffer(width: i32, height: i32, fourcc: FourCCVideoType, framerate : i32, frame_format: FrameFormatType, timecode: i64, stride:i32, buffer: &mut [u8] ) -> Self
} and give the user the option to create any type of video data. A Different option would be to use an external crate like image::image, to handle the creation from ImageBuffer. |
I've accepted your PR and made some changes to allow maximum flexibility to the end user. Like I mentioned in the PR, I'm not sure if this is too verbose and we want something to simplify creating VideoData with only modifications to the buffer, or if that's not exactly necessary right now but this at least makes it possible with the library. |
Is there a way to create a VideoData with some image data input?
currently it is only possible to create an empty frame. Is this correct or am I not seeing something.
How can I send data when I'm not able to create a Video Frame?
Could also help implementing this, but I don't know where to start.
I want to use NDI to send some generated Visuals.
The text was updated successfully, but these errors were encountered: