summaryrefslogtreecommitdiff
path: root/libavdevice/avdevice.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2014-01-19 16:12:07 +0100
committerLukasz Marek <lukasz.m.luki@gmail.com>2014-01-27 15:18:17 +0100
commit102bd641687a6ec4704ce2b3f259e895b68d8e4b (patch)
treed6ba6f1c686036af9c9077543624b5adebd72a18 /libavdevice/avdevice.c
parent7151411b9cf74ce43ab56f0ff8577b8031b997d9 (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.c8
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);
+}