Struct ndi::send::Send [−][src]
pub struct Send { /* fields omitted */ }
Expand description
A sender struct for sending NDI
Implementations
Create a new instance with default parameters
It is recommended to use SendBuilder
instead
Get the current tally
the return value is whether Tally was actually updated or not
This allows you to receive metadata from the other end of the connection
Retrieve the source information for the given sender instance.
This will add a metadata frame
This will add an audio frame
This will add a video frame
This will add a video frame and will return immediately, having scheduled the frame to be displayed.
All processing and sending of the video will occur asynchronously. The memory accessed by NDIlib_video_frame_t cannot be freed or re-used by the caller until a synchronizing event has occurred. In general the API is better able to take advantage of asynchronous processing than you might be able to by simple having a separate thread to submit frames.
This call is particularly beneficial when processing BGRA video since it allows any color conversion, compression and network sending to all be done on separate threads from your main rendering thread.
Synchronizing events are :
- a call to
send_video
- a call to
send_video_async
with another frame to be sent - a call to
send_video
with p_video_data=NULL - Dropping a
Send
instance
Get the current number of receivers connected to this source.
This can be used to avoid even rendering when nothing is connected to the video source. which can significantly improve the efficiency if you want to make a lot of sources available on the network. If you specify a timeout that is not 0 then it will wait until there are connections for this amount of time.