mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-05 23:59:01 +00:00
Add API to scrcpy library to send control messages to Android device.
This commit is contained in:
parent
de3853d910
commit
ad7212beb1
2 changed files with 12 additions and 0 deletions
|
@ -555,3 +555,10 @@ scrcpy_add_sink(struct scrcpy_process *p,
|
|||
decoder_add_sink(&s->decoder, sink);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
scrcpy_push_event(struct scrcpy_process *p,
|
||||
const struct control_msg *msg) {
|
||||
struct scrcpy *s = p->scrcpy_struct;
|
||||
controller_push_msg(&s->controller, msg);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "coords.h"
|
||||
#include "control_msg.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -171,6 +172,10 @@ scrcpy_add_sink(struct scrcpy_process *p,
|
|||
void (*close)(void *sink),
|
||||
bool (*push)(void *sink, const void *avframe));
|
||||
|
||||
void
|
||||
scrcpy_push_event(struct scrcpy_process *p,
|
||||
const struct control_msg *msg);
|
||||
|
||||
void
|
||||
scrcpy_stop(struct scrcpy_process *p);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue