diff options
| -rw-r--r-- | headers/media_plugin/media/openmax/OMX_AsString.h | 8 | ||||
| -rw-r--r-- | headers/media_plugin/media/openmax/OMX_VideoExt.h | 4 | ||||
| -rw-r--r-- | include/input/InputTransport.h | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/headers/media_plugin/media/openmax/OMX_AsString.h b/headers/media_plugin/media/openmax/OMX_AsString.h index 56d7cc81ce..dc25deddbb 100644 --- a/headers/media_plugin/media/openmax/OMX_AsString.h +++ b/headers/media_plugin/media/openmax/OMX_AsString.h @@ -930,6 +930,14 @@ inline static const char *asString(OMX_VIDEO_AVCLOOPFILTERTYPE i, const char *de #ifndef AS_STRING_FOR_OMX_VIDEOEXT_H #define AS_STRING_FOR_OMX_VIDEOEXT_H +inline static const char *asString(OMX_VIDEO_AVCPROFILEEXTTYPE i, const char *def = "??") { + switch (i) { + case OMX_VIDEO_AVCProfileConstrainedBaseline: return "ConstrainedBaseline"; + case OMX_VIDEO_AVCProfileConstrainedHigh: return "ConstrainedHigh"; + default: return asString((OMX_VIDEO_AVCPROFILETYPE)i, def); + } +} + inline static const char *asString(OMX_VIDEO_VP8PROFILETYPE i, const char *def = "??") { switch (i) { case OMX_VIDEO_VP8ProfileMain: return "Main"; diff --git a/headers/media_plugin/media/openmax/OMX_VideoExt.h b/headers/media_plugin/media/openmax/OMX_VideoExt.h index 1a5ad176e2..c1025643ef 100644 --- a/headers/media_plugin/media/openmax/OMX_VideoExt.h +++ b/headers/media_plugin/media/openmax/OMX_VideoExt.h @@ -59,10 +59,10 @@ typedef struct OMX_NALSTREAMFORMATTYPE{ } OMX_NALSTREAMFORMATTYPE; /** AVC additional profiles */ -typedef enum OMX_VIDEO_AVCPROFILETYPEEXT { +typedef enum OMX_VIDEO_AVCPROFILEEXTTYPE { OMX_VIDEO_AVCProfileConstrainedBaseline = 0x10000, /**< Constrained baseline profile */ OMX_VIDEO_AVCProfileConstrainedHigh = 0x80000, /**< Constrained high profile */ -} OMX_VIDEO_AVCPROFILETYPEEXT; +} OMX_VIDEO_AVCPROFILEEXTTYPE; /** VP8 profiles */ typedef enum OMX_VIDEO_VP8PROFILETYPE { diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h index 0dd15b1221..944947420e 100644 --- a/include/input/InputTransport.h +++ b/include/input/InputTransport.h @@ -384,6 +384,10 @@ private: const PointerCoords& getPointerById(uint32_t id) const { return pointers[idToIndex[id]]; } + + bool hasPointerId(uint32_t id) const { + return idBits.hasBit(id); + } }; struct TouchState { int32_t deviceId; @@ -419,6 +423,9 @@ private: if (historySize < 2) { return false; } + if (!getHistory(0)->hasPointerId(id) || !getHistory(1)->hasPointerId(id)) { + return false; + } float currentX = getHistory(0)->getPointerById(id).getX(); float currentY = getHistory(0)->getPointerById(id).getY(); float previousX = getHistory(1)->getPointerById(id).getX(); |