〖Android〗CM10.2编译错误解决

时间:2023-03-10 07:50:28
〖Android〗CM10.2编译错误解决

错误1:

hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp: In function 'int android::hdmi_gl_set_param(int, int, int, int, unsigned int, unsigned int, int, int, int, int, int)':
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'srcAddr = {(addr_space)1u, ((long unsigned int)src_y_address), ((src_w * src_h) * 4), 1, 0}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_addr& fimg2d_addr::operator=(const fimg2d_addr&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_addr&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'srcImage = {srcAddr, srcAddr, src_w, src_h, (src_w * 4), (pixel_order)0u, (color_format)1u}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_image& fimg2d_image::operator=(const fimg2d_image&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_image&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'dstAddr = {(addr_space)1u, ((long unsigned int)dst_addr), ((dst_w * dst_h) * dst_bpp), 1, 0}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_addr& fimg2d_addr::operator=(const fimg2d_addr&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_addr&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'dstImage = {dstAddr, dstAddr, dst_w, dst_h, (dst_w * dst_bpp), (pixel_order)0u, ((color_format)dst_color_format)}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_image& fimg2d_image::operator=(const fimg2d_image&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_image&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'Scaling = {(scaling)2u, (scaling_factor)0u, 0, 0, src_w, src_h, dst_w, dst_h}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_scale& fimg2d_scale::operator=(const fimg2d_scale&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_scale&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'Scaling = {(scaling)2u, (scaling_factor)0u, 0, 0, src_w, src_h, dst_h, dst_w}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_scale& fimg2d_scale::operator=(const fimg2d_scale&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_scale&'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: warning: extended initializer lists only available with -std=c++ or -std=gnu++ [enabled by default]
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: error: no match for 'operator=' in 'BlitParam = {(blit_op)2u, (premultiplied)1u, 255, 0, g2d_rotation, (& Scaling), 0, 0, (& dstClip), 0, (& srcImage), (& dstImage), 0, (& srcRect), (& dstRect), 0, 0}'
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp::: note: candidate is:
In file included from hardware/samsung/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp:::
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: fimg2d_blit& fimg2d_blit::operator=(const fimg2d_blit&)
hardware/samsung/exynos4/hal/libhdmi/SecHdmi/../../include/sec_g2d_4x.h::: note: no known conversion for argument from '<brace-enclosed initializer list>' to 'const fimg2d_blit&'
make: *** [/media/Enjoy/AndroidCode/cm10./out/target/product/stuttgart/obj/SHARED_LIBRARIES/libhdmi_intermediates/SecHdmiV4L2Utils.o] Error
make: *** Waiting for unfinished jobs....

解决:

diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
index f3ae1ac..b103acb
--- a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
+++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
@@ -, +, @@ int hdmi_set_g_scaling(int layer,
cur_g2d_address = (unsigned int)dst_addr;
prev_src_addr = src_address; - srcAddr = {(addr_space)ADDR_USER, (unsigned long)src_address, src_w * src_h * , , };
- srcImage = {srcAddr, srcAddr, src_w, src_h, src_w*, AX_RGB, CF_ARGB_8888};
srcRect = {, , src_w, src_h};
-
- dstAddr = {(addr_space)ADDR_USER, (unsigned long)dst_addr, dst_w * dst_h * dst_bpp, , };
- dstImage = {dstAddr, dstAddr, dst_w, dst_h, dst_w*dst_bpp, AX_RGB, (color_format)dst_color_format};
dstRect = {, , dst_w, dst_h};
+
+ srcAddr = {(addr_space)ADDR_USER, (unsigned long)src_address};
+ srcImage = { src_w, src_h, src_w*, AX_RGB, CF_ARGB_8888, srcAddr, srcAddr, srcRect, false };
+ dstAddr = {(addr_space)ADDR_USER, (unsigned long)dst_addr};
+ dstImage = { dst_w, dst_h, dst_w*dst_bpp, AX_RGB, (color_format)dst_color_format, dstAddr, dstAddr, dstRect, false};
dstClip = {, , , dst_w, dst_h}; if (rotVal == || rotVal == )
@@ -, +, @@ int hdmi_gl_set_param(int layer,
cur_g2d_address = (unsigned int)dst_addr;
prev_src_addr = src_y_address; - srcAddr = {(addr_space)ADDR_PHYS, (unsigned long)src_y_address, src_w*src_h*, , };
- srcImage = {srcAddr, srcAddr, src_w, src_h, src_w*, AX_RGB, CF_ARGB_8888};
srcRect = {, , src_w, src_h};
-
- dstAddr = {(addr_space)ADDR_PHYS, (unsigned long)dst_addr, dst_w*dst_h*dst_bpp, , };
- dstImage = {dstAddr, dstAddr, dst_w, dst_h, dst_w*dst_bpp, AX_RGB, (color_format)dst_color_format};
dstRect = {, , dst_w, dst_h};
+
+ srcAddr = {(addr_space)ADDR_USER, (unsigned long)src_y_address};
+ srcImage = { src_w, src_h, src_w*, AX_RGB, CF_ARGB_8888, srcAddr, srcAddr, srcRect, false };
+ dstAddr = {(addr_space)ADDR_USER, (unsigned long)dst_addr};
+ dstImage = { dst_w, dst_h, dst_w*dst_bpp, AX_RGB, (color_format)dst_color_format, dstAddr, dstAddr, dstRect, false};
+
dstClip = {, , , dst_w, dst_h}; if (rotVal == || rotVal == )
- Scaling = {SCALING_BILINEAR, SCALING_PIXELS, , , src_w, src_h, dst_w, dst_h};
+ Scaling = {SCALING_BILINEAR, src_w, src_h, dst_w, dst_h};
else
- Scaling = {SCALING_BILINEAR, SCALING_PIXELS, , , src_w, src_h, dst_h, dst_w};
+ Scaling = {SCALING_BILINEAR, src_w, src_h, dst_h, dst_w}; switch (rotVal) {
case :
@@ -, +, @@ int hdmi_gl_set_param(int layer,
return -;
break;
}
-
- BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, , g2d_rotation, &Scaling, , , &dstClip, , &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, };
-
+ struct fimg2d_param param;
+ param = {, 0xff, , g2d_rotation, NON_PREMULTIPLIED, &scaling, , , &dstClip};
+ BlitParam = { BLIT_OP_SRC, param, &srcImage, NULL, NULL, &dstImage, BLIT_SYNC, };
if (stretchFimgApi(&BlitParam) < ) {
ALOGE("%s::stretchFimgApi() fail", __func__);
return -;
diff --git a/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.h b/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.h
index ebee763..
--- a/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.h
+++ b/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.h
@@ -, +, @@
#include <cutils/log.h>
#include <binder/IBinder.h>
#include <binder/IServiceManager.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
#include "ISecTVOut.h" #define GETSERVICETIMEOUT (5)