Use two sockets for video and control
The socket used the device-to-computer direction to stream the video and the computer-to-device direction to send control events. Some features, like copy-paste from device to computer, require to send non-video data from the device to the computer. To make them possible, use two sockets: - one for streaming the video from the device to the client; - one for control/events in both directions.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
struct control_event_queue CBUF(struct control_event, 64);
|
||||
|
||||
struct controller {
|
||||
socket_t video_socket;
|
||||
socket_t control_socket;
|
||||
SDL_Thread *thread;
|
||||
SDL_mutex *mutex;
|
||||
SDL_cond *event_cond;
|
||||
@@ -21,7 +21,7 @@ struct controller {
|
||||
};
|
||||
|
||||
bool
|
||||
controller_init(struct controller *controller, socket_t video_socket);
|
||||
controller_init(struct controller *controller, socket_t control_socket);
|
||||
|
||||
void
|
||||
controller_destroy(struct controller *controller);
|
||||
|
||||
Reference in New Issue
Block a user