MMFMWK-8072 Fix build vpu encoder errors when build on imx6
Only enable vp8 encoder for 845S.
Signed-off-by: xiahong.bao <xiahong.bao@nxp.com>
diff --git a/plugins/vpu/gstvpuenc.c b/plugins/vpu/gstvpuenc.c
index d631356..ced17fb 100755
--- a/plugins/vpu/gstvpuenc.c
+++ b/plugins/vpu/gstvpuenc.c
@@ -40,6 +40,7 @@
#include <gst/video/video.h>
#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
+#include <gst/allocators/gstdmabuf.h>
#include "gstimxcommon.h"
#include "gstvpuallocator.h"
#include "gstvpuenc.h"
@@ -281,12 +282,15 @@
gst_static_pad_template_get (&static_sink_template_jpeg));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_src_template_jpeg));
- } else if (in_plugin->std == VPU_V_VP8) {
+ }
+#ifdef USE_H1_ENC
+ else if (in_plugin->std == VPU_V_VP8) {
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_src_template_vp8));
}
+#endif
gst_element_class_set_static_metadata (element_class,
in_plugin->description, "Codec/Encoder/Video",
@@ -1221,6 +1225,11 @@
in_plugin++;
continue;
}
+#else
+ if (!g_strcmp0 (in_plugin->name, "vp8")) {
+ in_plugin++;
+ continue;
+ }
#endif
t_name = g_strdup_printf ("vpuenc_%s", in_plugin->name);