summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@collabora.com>2015-05-03 12:56:05 (GMT)
committerSebastian Dröge <sebastian@centricular.com>2015-05-04 10:45:12 (GMT)
commit3c77fbda8774de0e9ac9a3839f8b6bcd656f3887 (patch)
tree75eb14703674bc7e122a5a97b7f2a06cfc5ff344
parentbd21df10568244a443a7d64ac28f76e84888540f (diff)
downloadgst-plugins-bad-3c77fbda8774de0e9ac9a3839f8b6bcd656f3887.tar.gz
gst-plugins-bad-3c77fbda8774de0e9ac9a3839f8b6bcd656f3887.tar.xz
androidmedia: Add suport for COLOR_FormatYV12
Reference: http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12 https://bugzilla.gnome.org/show_bug.cgi?id=747126
-rw-r--r--sys/androidmedia/gstamc-constants.h4
-rw-r--r--sys/androidmedia/gstamc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/androidmedia/gstamc-constants.h b/sys/androidmedia/gstamc-constants.h
index af2a877..ae52464 100644
--- a/sys/androidmedia/gstamc-constants.h
+++ b/sys/androidmedia/gstamc-constants.h
@@ -111,7 +111,9 @@ enum
* we shouldn't find incompatible usage and crash horribly... right?
* FIXME: Not actually implemented in the video decoder, it will just error out
* The format seems to be equiv to V4L2_PIX_FMT_NV12MT_16X16 */
- COLOR_OMX_SEC_FormatNV12Tiled = 0x7fc00002
+ COLOR_OMX_SEC_FormatNV12Tiled = 0x7fc00002,
+ /* YV12: http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12 */
+ COLOR_FormatYV12 = 0x32315659,
};
enum
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c
index f9dbdba..8080de4 100644
--- a/sys/androidmedia/gstamc.c
+++ b/sys/androidmedia/gstamc.c
@@ -1785,7 +1785,8 @@ static const struct
COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYVU420SemiPlanar32m, GST_VIDEO_FORMAT_NV12}, {
COLOR_OMX_SEC_FormatNV12Tiled, GST_VIDEO_FORMAT_NV12}, {
- COLOR_FormatYCbYCr, GST_VIDEO_FORMAT_YUY2}
+ COLOR_FormatYCbYCr, GST_VIDEO_FORMAT_YUY2}, {
+ COLOR_FormatYV12, GST_VIDEO_FORMAT_YV12}
};
static gboolean
@@ -1971,6 +1972,7 @@ gst_amc_color_format_info_set (GstAmcColorFormatInfo * color_format_info,
switch (color_format) {
case COLOR_FormatYUV420Planar:
case COLOR_FormatYUV420Flexible:{
+ case COLOR_FormatYV12:
if (stride == 0 || slice_height == 0) {
GST_ERROR ("Stride or slice height is 0");
return FALSE;