diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2014-01-19 19:12:07 +0400 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki@gmail.com> | 2014-01-27 18:18:17 +0400 |
commit | 102bd641687a6ec4704ce2b3f259e895b68d8e4b (patch) | |
tree | d6ba6f1c686036af9c9077543624b5adebd72a18 /libavdevice/avdevice.c | |
parent | 7151411b9cf74ce43ab56f0ff8577b8031b997d9 (diff) |
lavd: add avdevice_dev_to_app_control_message API
New API allows to send messages from devices to application.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'libavdevice/avdevice.c')
-rw-r--r-- | libavdevice/avdevice.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index c232bbdc8f..51617fb921 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -44,3 +44,11 @@ int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToD return AVERROR(ENOSYS); return s->oformat->control_message(s, type, data, data_size); } + +int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type, + void *data, size_t data_size) +{ + if (!s->control_message_cb) + return AVERROR(ENOSYS); + return s->control_message_cb(s, type, data, data_size); +} |