[FFmpeg-devel] [PATCH] lavd/avdevice: add control message enums
Lukasz Marek
lukasz.m.luki2 at gmail.com
Thu Apr 10 00:51:00 CEST 2014
Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
---
libavdevice/avdevice.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 8b78067..b676934 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -109,6 +109,14 @@ typedef struct AVDeviceRect {
int height; /**< height */
} AVDeviceRect;
+typedef union AVDeviceValue {
+ u_int64_t u64;
+ int64_t i64;
+ double dbl;
+ const char *str;
+ AVRational q;
+} AVDeviceValue;
+
/**
* Message types used by avdevice_app_to_dev_control_message().
*/
@@ -137,7 +145,19 @@ enum AVAppToDevMessageType {
* data: AVDeviceRect: area required to be repainted.
* NULL: whole area is required to be repainted.
*/
- AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A')
+ AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),
+
+ /**
+ * Request pause/play.
+ *
+ * Application requests pause/unpause playback.
+ * Mostly usable with devices that have internal buffer.
+ *
+ * data: NULL
+ */
+ AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
+ AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
+ AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T')
};
/**
@@ -196,7 +216,31 @@ enum AVDevToAppMessageType {
*
* data: NULL.
*/
- AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S')
+ AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'),
+
+ /**
+ * Buffer fullness status messages.
+ *
+ * Device signals buffer overflow/underflow.
+ *
+ * data: NULL.
+ */
+ AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'),
+ AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'),
+
+ /**
+ * Buffer readable/writable.
+ *
+ * Device informs that buffer is readable/writable.
+ * When possible, device informs how many bytes can be read/write.
+ *
+ * @warning Device may not inform when number of bytes than can be read/write changes.
+ *
+ * data: AVDeviceValue(int64_t): amount of bytes available to read/write.
+ * NULL: amount of bytes available to read/write is not known.
+ */
+ AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),
+ AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' ')
};
/**
--
1.8.3.2
More information about the ffmpeg-devel
mailing list