src/bin/video/e_client_video.c \
src/bin/video/e_zone_video.c \
src/bin/video/e_video_debug.c \
+src/bin/video/iface/e_video_hwc.c \
src/bin/video/iface/e_video_hwc_planes.c \
src/bin/video/iface/e_video_hwc_windows.c \
src/bin/video/iface/e_video_external.c \
} cb;
};
-static E_Hwc_Policy
-_e_client_video_zone_hwc_policy_get(E_Zone *zone)
-{
- E_Output *eout;
-
- eout = e_output_find(zone->output_id);
- if (!eout)
- {
- ERR("Something wrong, couldn't find 'E_Output' from 'E_Zone'");
- return E_HWC_POLICY_NONE;
- }
-
- return e_hwc_policy_get(eout->hwc);
-}
-
static void
_e_client_video_comp_iface_deinit(E_Client_Video *ecv)
{
goto end;
}
- hwc_pol = _e_client_video_zone_hwc_policy_get(ec->zone);
- if (hwc_pol == E_HWC_POLICY_WINDOWS)
- {
- INF("Initialize the interface of the client_video for HWC WINDOWS mode");
- iface = e_video_hwc_windows_iface_create(ec);;
- }
- else if (hwc_pol == E_HWC_POLICY_PLANES)
+ hwc_pol = e_zone_video_hwc_policy_get(ec->zone);
+ if (hwc_pol != E_HWC_POLICY_NONE)
{
- INF("Initialize the interface of the client_video for HWC PLANES mode");
- iface = e_video_hwc_planes_iface_create(ec);
+ INF("Initialize the interface of the client_video for HWC mode");
+ iface = e_video_hwc_iface_create(ec);
}
end:
tbm_surface_h (*tbm_surface_get)(E_Video_Comp_Iface *iface);
};
-EINTERN E_Video_Comp_Iface *e_video_hwc_planes_iface_create(E_Client *ec);
-EINTERN E_Video_Comp_Iface *e_video_hwc_windows_iface_create(E_Client *ec);
+EINTERN E_Hwc_Policy e_zone_video_hwc_policy_get(E_Zone *zone);
+EINTERN E_Video_Comp_Iface *e_video_hwc_iface_create(E_Client *ec);
EINTERN E_Video_Comp_Iface *e_video_fallback_iface_create(E_Client *ec);
EINTERN E_Video_Comp_Iface *e_video_external_iface_create(E_Client *ec);
return EINA_TRUE;
}
+
+EINTERN E_Hwc_Policy
+e_zone_video_hwc_policy_get(E_Zone *zone)
+{
+ E_Output *eout;
+
+ eout = e_output_find(zone->output_id);
+ if (!eout)
+ {
+ ERR("Something wrong, couldn't find 'E_Output' from 'E_Zone'");
+ return E_HWC_POLICY_NONE;
+ }
+
+ return e_hwc_policy_get(eout->hwc);
+}
--- /dev/null
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "e_video_internal.h"
+#include "e_video_hwc.h"
+
+EINTERN E_Video_Comp_Iface *
+e_video_hwc_iface_create(E_Client *ec)
+{
+ E_Video_Comp_Iface *iface = NULL;
+ E_Hwc_Policy hwc_pol;
+
+ VIN("Create HWC interface", ec);
+
+ hwc_pol = e_zone_video_hwc_policy_get(ec->zone);
+ if (hwc_pol == E_HWC_POLICY_PLANES)
+ iface = e_video_hwc_planes_iface_create(ec);
+ else if (hwc_pol == E_HWC_POLICY_WINDOWS)
+ iface = e_video_hwc_windows_iface_create(ec);
+
+ return iface;
+}
#ifndef _E_VIDEO_HWC_H_
#define _E_VIDEO_HWC_H_
+#include "e_video_internal.h"
+
#define BUFFER_MAX_COUNT 5
#ifndef CLEAR
#define CLEAR(x) memset(&(x), 0, sizeof(x))
#endif
+EINTERN E_Video_Comp_Iface *e_video_hwc_planes_iface_create(E_Client *ec);
+EINTERN E_Video_Comp_Iface *e_video_hwc_windows_iface_create(E_Client *ec);
+
#endif