From bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Fri, 7 Aug 2015 10:07:07 -0700 Subject: OMX: clarify EOS signaling for tunneled decoders Bug: 22859209 Change-Id: Ie28da1b80e4a8dd5ae2806e300ed37287c9c57a8 --- include/media/openmax/OMX_Core.h | 6 +++++- include/media/openmax/OMX_VideoExt.h | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/media/openmax/OMX_Core.h b/include/media/openmax/OMX_Core.h index 521c223..f746a69 100644 --- a/include/media/openmax/OMX_Core.h +++ b/include/media/openmax/OMX_Core.h @@ -509,7 +509,7 @@ typedef enum OMX_EVENTTYPE OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - /** Event when tunneled decoder has rendered an output + /** Event when tunneled decoder has rendered an output or reached EOS * nData1 must contain the number of timestamps returned * pEventData must point to an array of the OMX_VIDEO_RENDEREVENTTYPE structs containing the * render-timestamps of each frame. Component may batch rendered timestamps using this event, @@ -518,6 +518,10 @@ typedef enum OMX_EVENTTYPE * * If component is doing frame-rate conversion, it must signal the render time of each * converted frame, and must interpolate media timestamps for in-between frames. + * + * When the component reached EOS, it must signal an EOS timestamp using the same mechanism. + * This is in addition to the timestamp of the last rendered frame, and should follow that + * frame. */ OMX_EventOutputRendered = 0x7F000001, OMX_EventMax = 0x7FFFFFFF diff --git a/include/media/openmax/OMX_VideoExt.h b/include/media/openmax/OMX_VideoExt.h index 34c0405..3971bc5 100644 --- a/include/media/openmax/OMX_VideoExt.h +++ b/include/media/openmax/OMX_VideoExt.h @@ -203,10 +203,17 @@ typedef struct OMX_VIDEO_SLICESEGMENTSTYPE { OMX_BOOL bEnableLoopFilterAcrossSlices; } OMX_VIDEO_SLICESEGMENTSTYPE; -/** Structure to return timestamps of rendered output frames for tunneled components */ +/** Structure to return timestamps of rendered output frames as well as EOS + * for tunneled components. + */ typedef struct OMX_VIDEO_RENDEREVENTTYPE { OMX_S64 nMediaTimeUs; // timestamp of rendered video frame OMX_S64 nSystemTimeNs; // system monotonic time at the time frame was rendered + // Use INT64_MAX for nMediaTimeUs to signal that the EOS + // has been reached. In this case, nSystemTimeNs MUST be + // the system time when the last frame was rendered. + // This MUST be done in addition to returning (and + // following) the render information for the last frame. } OMX_VIDEO_RENDEREVENTTYPE; #ifdef __cplusplus -- cgit v1.1 From a180e855f66db8e4aa4796247e55ca5372d53de2 Mon Sep 17 00:00:00 2001 From: Nick Armstrong-Crews Date: Wed, 2 Sep 2015 13:00:52 -0700 Subject: Add KEYCODE_SOFT_SLEEP for Ungaze. BUG: b/23589870 Change-Id: I9bb575fe97bfae926ef4db37615e88057b81480c --- include/android/keycodes.h | 4 +++- include/input/InputEventLabels.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/android/keycodes.h b/include/android/keycodes.h index 1f55d9f..421abe5 100644 --- a/include/android/keycodes.h +++ b/include/android/keycodes.h @@ -735,7 +735,9 @@ enum { AKEYCODE_MEDIA_SKIP_FORWARD = 272, AKEYCODE_MEDIA_SKIP_BACKWARD = 273, AKEYCODE_MEDIA_STEP_FORWARD = 274, - AKEYCODE_MEDIA_STEP_BACKWARD = 275 + AKEYCODE_MEDIA_STEP_BACKWARD = 275, + /** Put device to sleep unless a wakelock is held. */ + AKEYCODE_SOFT_SLEEP = 276 // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h index 344f2f3..f0a6238 100644 --- a/include/input/InputEventLabels.h +++ b/include/input/InputEventLabels.h @@ -311,6 +311,7 @@ static const InputEventLabel KEYCODES[] = { DEFINE_KEYCODE(MEDIA_SKIP_BACKWARD), DEFINE_KEYCODE(MEDIA_STEP_FORWARD), DEFINE_KEYCODE(MEDIA_STEP_BACKWARD), + DEFINE_KEYCODE(SOFT_SLEEP), { NULL, 0 } }; -- cgit v1.1 From ac72bbf4e46d6689070df09a25db2960a9036eb2 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Tue, 11 Aug 2015 18:29:28 -0700 Subject: inputflinger: Initial support for rotary encoders. This change introduces support for rotary encoder input devices. We also define a new input source (namely, AINPUT_SOURCE_ROTARY_ENCODER) and a new axis of input (namely, AXIS_SCROLL), since the rotary encoder motion doesn't necessarily tie to a horizontal or vertical scroll motion. A ROTARY_ENCODER input device class is also introduced, corresponding to the new input source. A new input source can be defined as producing rotary encoder motion events, if its corresponding .idc file contains the following declaration: device.type = rotaryEncoder Bug: 18707397 Change-Id: I8ccd540908311d1ff44fdfeba81b691895413641 Signed-off-by: Prashant Malani --- include/android/input.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/android/input.h b/include/android/input.h index 5ab4e29..5eeb7fc 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -644,6 +644,13 @@ enum { */ AMOTION_EVENT_AXIS_TILT = 25, /** + * Axis constant: Generic scroll axis of a motion event. + * + * - This is used for scroll axis motion events that can't be classified as strictly + * vertical or horizontal. The movement of a rotating scroller is an example of this. + */ + AMOTION_EVENT_AXIS_SCROLL = 26, + /** * Axis constant: Generic 1 axis of a motion event. * The interpretation of a generic axis is device-specific. */ @@ -817,6 +824,8 @@ enum { AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, /** joystick */ AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, + /** rotary encoder */ + AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE, /** any */ AINPUT_SOURCE_ANY = 0xffffff00, -- cgit v1.1 From d4db70a7b8b2d136c46c50f89b276f8150be5fc2 Mon Sep 17 00:00:00 2001 From: Jani Suonpera Date: Fri, 9 Oct 2015 11:45:57 +0300 Subject: DO NOT MERGE ANYWHERE Add new interface for sensor physical data This is special solution only for emerald branch. Changes including new const char* value/interface for sensor physical data. Sensor service and manager does not take care of content, structure or other details of string. Sensor HAL is taking care of parsing data from string and setting values to Sensor HW. Change-Id: I3abc3ddc7c6adc4b32a40b9a43f2a94c5af7b2b0 Signed-off-by: Ben Fennema --- include/gui/ISensorServer.h | 1 + include/gui/SensorManager.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gui/ISensorServer.h b/include/gui/ISensorServer.h index 3dca2a3..e590ce9 100644 --- a/include/gui/ISensorServer.h +++ b/include/gui/ISensorServer.h @@ -41,6 +41,7 @@ public: virtual sp createSensorEventConnection(const String8& packageName, int mode, const String16& opPackageName) = 0; virtual int32_t isDataInjectionEnabled() = 0; + virtual status_t setSensorPhysicalData(const char* physicaldata) = 0; }; // ---------------------------------------------------------------------------- diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h index 0cff46c..2b07ca7 100644 --- a/include/gui/SensorManager.h +++ b/include/gui/SensorManager.h @@ -58,7 +58,7 @@ public: Sensor const* getDefaultSensor(int type); sp createEventQueue(String8 packageName = String8(""), int mode = 0); bool isDataInjectionEnabled(); - + bool SetPhysicalData(const char* data); private: // DeathRecipient interface void sensorManagerDied(); -- cgit v1.1 From 8c3e55f4149deda3ec7c7a67fda81216d5f9af25 Mon Sep 17 00:00:00 2001 From: Ben Fennema Date: Wed, 2 Dec 2015 01:04:40 +0000 Subject: Revert "DO NOT MERGE ANYWHERE Add new interface for sensor physical data" This reverts commit d4db70a7b8b2d136c46c50f89b276f8150be5fc2. Change-Id: Ifb52d5595970a5178e12c2a90da4aac0e38f5942 --- include/gui/ISensorServer.h | 1 - include/gui/SensorManager.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/gui/ISensorServer.h b/include/gui/ISensorServer.h index e590ce9..3dca2a3 100644 --- a/include/gui/ISensorServer.h +++ b/include/gui/ISensorServer.h @@ -41,7 +41,6 @@ public: virtual sp createSensorEventConnection(const String8& packageName, int mode, const String16& opPackageName) = 0; virtual int32_t isDataInjectionEnabled() = 0; - virtual status_t setSensorPhysicalData(const char* physicaldata) = 0; }; // ---------------------------------------------------------------------------- diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h index 2b07ca7..0cff46c 100644 --- a/include/gui/SensorManager.h +++ b/include/gui/SensorManager.h @@ -58,7 +58,7 @@ public: Sensor const* getDefaultSensor(int type); sp createEventQueue(String8 packageName = String8(""), int mode = 0); bool isDataInjectionEnabled(); - bool SetPhysicalData(const char* data); + private: // DeathRecipient interface void sensorManagerDied(); -- cgit v1.1 From d983fd11d4a00b03f92d09f32c08840e66d90777 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Wed, 13 Jan 2016 01:00:25 -0800 Subject: Revert "inputflinger: Initial support for rotary encoders." This reverts commit ac72bbf4e46d6689070df09a25db2960a9036eb2. --- include/android/input.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/android/input.h b/include/android/input.h index 5eeb7fc..5ab4e29 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -644,13 +644,6 @@ enum { */ AMOTION_EVENT_AXIS_TILT = 25, /** - * Axis constant: Generic scroll axis of a motion event. - * - * - This is used for scroll axis motion events that can't be classified as strictly - * vertical or horizontal. The movement of a rotating scroller is an example of this. - */ - AMOTION_EVENT_AXIS_SCROLL = 26, - /** * Axis constant: Generic 1 axis of a motion event. * The interpretation of a generic axis is device-specific. */ @@ -824,8 +817,6 @@ enum { AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, /** joystick */ AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, - /** rotary encoder */ - AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE, /** any */ AINPUT_SOURCE_ANY = 0xffffff00, -- cgit v1.1