mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-27 05:10:20 +00:00
client API: declare mpv_suspend/mpv_resume deprecated
They're useless, and I have no idea what they're actually supposed to do (wrt. pending input processing changes). Also remove their implicit uses from the IPC handlers.
This commit is contained in:
@@ -124,15 +124,11 @@ static void *client_thread(void *p)
|
||||
};
|
||||
|
||||
fcntl(arg->client_fd, F_SETFL, fcntl(arg->client_fd, F_GETFL, 0) | O_NONBLOCK);
|
||||
mpv_suspend(arg->client);
|
||||
|
||||
while (1) {
|
||||
rc = poll(fds, 2, 0);
|
||||
if (rc == 0) {
|
||||
mpv_resume(arg->client);
|
||||
if (rc == 0)
|
||||
rc = poll(fds, 2, -1);
|
||||
mpv_suspend(arg->client);
|
||||
}
|
||||
if (rc < 0) {
|
||||
MP_ERR(arg, "Poll error\n");
|
||||
continue;
|
||||
|
||||
@@ -222,7 +222,6 @@ static void *client_thread(void *p)
|
||||
MP_VERBOSE(arg, "Client connected\n");
|
||||
|
||||
mpv_set_wakeup_callback(arg->client, wakeup_cb, wakeup_event);
|
||||
mpv_suspend(arg->client);
|
||||
|
||||
// Do the first read operation on the pipe
|
||||
if ((ioerr = async_read(arg->client_h, buf, 4096, &ol))) {
|
||||
@@ -233,11 +232,8 @@ static void *client_thread(void *p)
|
||||
while (1) {
|
||||
HANDLE handles[] = { wakeup_event, ol.hEvent };
|
||||
int n = WaitForMultipleObjects(2, handles, FALSE, 0);
|
||||
if (n == WAIT_TIMEOUT) {
|
||||
mpv_resume(arg->client);
|
||||
if (n == WAIT_TIMEOUT)
|
||||
n = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
|
||||
mpv_suspend(arg->client);
|
||||
}
|
||||
|
||||
switch (n) {
|
||||
case WAIT_OBJECT_0: // wakeup_event
|
||||
|
||||
Reference in New Issue
Block a user