e_video_hwc: make an internal header 29/305029/1
authorSooChan Lim <sc1.lim@samsung.com>
Sun, 21 Jan 2024 02:51:08 +0000 (11:51 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 26 Jan 2024 00:59:23 +0000 (09:59 +0900)
Move the internal resources and the function declaration
to the internal header

Change-Id: Ie1264f103846b480e2c62463e464c6c4101c4f1a

src/bin/video/iface/e_video_hwc.c
src/bin/video/iface/e_video_hwc.h [deleted file]
src/bin/video/iface/e_video_hwc_intern.h [new file with mode: 0644]
src/bin/video/iface/e_video_hwc_planes.c
src/bin/video/iface/e_video_hwc_windows.c

index 4d98d3d8a57b371433c2cec9c127e093ed4355ce..6c4802dc5950a045b66b2ec319ddda27cb62e23f 100644 (file)
@@ -3,7 +3,7 @@
 #endif
 
 #include "e_video_internal.h"
-#include "e_video_hwc.h"
+#include "e_video_hwc_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
diff --git a/src/bin/video/iface/e_video_hwc.h b/src/bin/video/iface/e_video_hwc.h
deleted file mode 100644 (file)
index 22072ee..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef _E_VIDEO_HWC_H_
-#define _E_VIDEO_HWC_H_
-
-#include <string.h>
-#include <Eina.h>
-#include "e.h"
-#include "e_video_internal.h"
-
-#define BUFFER_MAX_COUNT   5
-
-#ifndef CLEAR
-#define CLEAR(x) memset(&(x), 0, sizeof(x))
-#endif
-
-typedef struct _E_Video_Hwc E_Video_Hwc;
-typedef struct _E_Video_Hwc_Iface E_Video_Hwc_Iface;
-typedef struct _E_Video_Hwc_Geometry E_Video_Hwc_Geometry;
-typedef struct _E_Video_Hwc_PP E_Video_Hwc_PP;
-
-struct _E_Video_Hwc_Iface
-{
-   void           (*destroy)(E_Video_Hwc *evh);
-   Eina_Bool      (*property_get)(E_Video_Hwc *evh, unsigned int id, tdm_value *value);
-   Eina_Bool      (*property_set)(E_Video_Hwc *evh, unsigned int id, tdm_value value, Eina_Bool sync);
-   Eina_Bool      (*available_properties_get)(E_Video_Hwc *evh, const tdm_prop **props, int *count);
-   Eina_Bool      (*buffer_commit)(E_Video_Hwc *evh, E_Comp_Wl_Video_Buf *vbuf);
-   Eina_Bool      (*check_if_pp_needed)(E_Video_Hwc *evh);
-   tbm_surface_h  (*displaying_buffer_get)(E_Video_Hwc *evh);
-};
-
-struct _E_Video_Hwc_PP
-{
-   tdm_pp *tdm_handle;
-   tdm_info_pp info;
-
-   int minw, minh, maxw, maxh;
-   int align;
-   int align_vertical;
-
-   Eina_Bool scanout;
-};
-
-struct _E_Video_Hwc_Geometry
-{
-   Eina_Rectangle input_r;    /* input buffer's content rect */
-   Eina_Rectangle output_r;   /* video plane rect */
-   uint transform;            /* rotate, flip */
-
-   struct {
-        Eina_Rectangle output_r; /* video plane rect in physical output coordinates */
-        uint transform;          /* rotate, flip in physical output coordinates */
-   } tdm;
-};
-
-struct _E_Video_Hwc
-{
-   E_Video_Comp_Iface iface;
-   E_Video_Hwc_Iface backend;
-
-   E_Hwc_Policy hwc_policy;
-
-   E_Client_Video *ecv;
-   E_Client *ec;
-   E_Output *e_output;
-
-   Eina_List *ec_event_handler;
-
-   /* input info */
-   tbm_format tbmfmt;
-   Eina_List *input_buffer_list;
-
-   /* in screen coordinates */
-   E_Video_Hwc_Geometry geo, old_geo;
-
-   E_Comp_Wl_Buffer *old_comp_buffer;
-
-   /* converter info */
-   E_Video_Hwc_PP *pp;
-
-   tbm_format pp_tbmfmt;
-   Eina_List *pp_buffer_list;
-   Eina_List *next_buffer;
-
-   int output_align;
-
-   /* When a video buffer be attached, it will be appended to the end of waiting_list .
-    * And when it's committed, it will be moved to committed_list.
-    * Finally when the commit handler is called, it will become current_fb.
-    */
-   Eina_List    *bqueue;   /* A queue for buffer which will have to be committed next time. */
-   E_Comp_Wl_Video_Buf *committed_vbuf;  /* A committed video buffer to backend */
-   E_Comp_Wl_Video_Buf *current_fb;     /* buffer which is showing on screen currently */
-
-   struct wl_listener surface_viewport_listener;
-   E_Video_Hwc_Render_Fail_Cb render_fail_cb;
-
-   struct
-     {
-        E_Main_Hook *post_client_idler_before_hook;
-        Eina_Bool map;
-        Eina_Bool redraw;
-        Eina_Bool topmost_viewport;
-     } render;
-
-   struct
-     {
-        E_Video_Hwc_Render_Fail_Cb cb;
-        Eina_Bool walking;
-     } render_fail;
-
-   Eina_Bool  need_force_render;
-   Eina_Bool  deleted;
-};
-
-/* Functions for HWC */
-EINTERN void         e_video_hwc_wait_buffer_commit(E_Video_Hwc *evh);
-EINTERN void         e_video_hwc_client_mask_update(E_Video_Hwc *evh);
-EINTERN Eina_Bool    e_video_hwc_current_fb_update(E_Video_Hwc *evh);
-
-/* Functions for HWC Planes */
-EINTERN E_Video_Hwc *e_video_hwc_planes_create(E_Output *output, E_Client *ec);
-EINTERN Eina_Bool    e_video_hwc_planes_property_delay_set(E_Video_Hwc *evh, unsigned int id, tdm_value value);
-
-/* Functions for HWC Windows */
-EINTERN E_Video_Hwc *e_video_hwc_windows_create(E_Output *output, E_Client *ec);
-EINTERN Eina_Bool    e_video_hwc_windows_info_get(E_Video_Hwc *evh, E_Client_Video_Info *info);
-EINTERN Eina_Bool    e_video_hwc_windows_commit_data_release(E_Video_Hwc *evh, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
-EINTERN tbm_surface_h   e_video_hwc_windows_tbm_surface_get(E_Video_Hwc *evh);
-
-#endif
diff --git a/src/bin/video/iface/e_video_hwc_intern.h b/src/bin/video/iface/e_video_hwc_intern.h
new file mode 100644 (file)
index 0000000..b457fdf
--- /dev/null
@@ -0,0 +1,132 @@
+#ifndef E_VIDEO_HWC_INTERN_H
+#define E_VIDEO_HWC_INTERN_H
+
+#if 0
+#include <string.h>
+#include <Eina.h>
+#include "e.h"
+#include "e_video_internal.h"
+#endif
+
+#define BUFFER_MAX_COUNT   5
+
+#ifndef CLEAR
+#define CLEAR(x) memset(&(x), 0, sizeof(x))
+#endif
+
+typedef struct _E_Video_Hwc E_Video_Hwc;
+typedef struct _E_Video_Hwc_Iface E_Video_Hwc_Iface;
+typedef struct _E_Video_Hwc_Geometry E_Video_Hwc_Geometry;
+typedef struct _E_Video_Hwc_PP E_Video_Hwc_PP;
+
+struct _E_Video_Hwc_Iface
+{
+   void           (*destroy)(E_Video_Hwc *evh);
+   Eina_Bool      (*property_get)(E_Video_Hwc *evh, unsigned int id, tdm_value *value);
+   Eina_Bool      (*property_set)(E_Video_Hwc *evh, unsigned int id, tdm_value value, Eina_Bool sync);
+   Eina_Bool      (*available_properties_get)(E_Video_Hwc *evh, const tdm_prop **props, int *count);
+   Eina_Bool      (*buffer_commit)(E_Video_Hwc *evh, E_Comp_Wl_Video_Buf *vbuf);
+   Eina_Bool      (*check_if_pp_needed)(E_Video_Hwc *evh);
+   tbm_surface_h  (*displaying_buffer_get)(E_Video_Hwc *evh);
+};
+
+struct _E_Video_Hwc_PP
+{
+   tdm_pp *tdm_handle;
+   tdm_info_pp info;
+
+   int minw, minh, maxw, maxh;
+   int align;
+   int align_vertical;
+
+   Eina_Bool scanout;
+};
+
+struct _E_Video_Hwc_Geometry
+{
+   Eina_Rectangle input_r;    /* input buffer's content rect */
+   Eina_Rectangle output_r;   /* video plane rect */
+   uint transform;            /* rotate, flip */
+
+   struct {
+        Eina_Rectangle output_r; /* video plane rect in physical output coordinates */
+        uint transform;          /* rotate, flip in physical output coordinates */
+   } tdm;
+};
+
+struct _E_Video_Hwc
+{
+   E_Video_Comp_Iface iface;
+   E_Video_Hwc_Iface backend;
+
+   E_Hwc_Policy hwc_policy;
+
+   E_Client_Video *ecv;
+   E_Client *ec;
+   E_Output *e_output;
+
+   Eina_List *ec_event_handler;
+
+   /* input info */
+   tbm_format tbmfmt;
+   Eina_List *input_buffer_list;
+
+   /* in screen coordinates */
+   E_Video_Hwc_Geometry geo, old_geo;
+
+   E_Comp_Wl_Buffer *old_comp_buffer;
+
+   /* converter info */
+   E_Video_Hwc_PP *pp;
+
+   tbm_format pp_tbmfmt;
+   Eina_List *pp_buffer_list;
+   Eina_List *next_buffer;
+
+   int output_align;
+
+   /* When a video buffer be attached, it will be appended to the end of waiting_list .
+    * And when it's committed, it will be moved to committed_list.
+    * Finally when the commit handler is called, it will become current_fb.
+    */
+   Eina_List    *bqueue;   /* A queue for buffer which will have to be committed next time. */
+   E_Comp_Wl_Video_Buf *committed_vbuf;  /* A committed video buffer to backend */
+   E_Comp_Wl_Video_Buf *current_fb;     /* buffer which is showing on screen currently */
+
+   struct wl_listener surface_viewport_listener;
+   E_Video_Hwc_Render_Fail_Cb render_fail_cb;
+
+   struct
+     {
+        E_Main_Hook *post_client_idler_before_hook;
+        Eina_Bool map;
+        Eina_Bool redraw;
+        Eina_Bool topmost_viewport;
+     } render;
+
+   struct
+     {
+        E_Video_Hwc_Render_Fail_Cb cb;
+        Eina_Bool walking;
+     } render_fail;
+
+   Eina_Bool  need_force_render;
+   Eina_Bool  deleted;
+};
+
+/* Functions for HWC */
+EINTERN void         e_video_hwc_wait_buffer_commit(E_Video_Hwc *evh);
+EINTERN void         e_video_hwc_client_mask_update(E_Video_Hwc *evh);
+EINTERN Eina_Bool    e_video_hwc_current_fb_update(E_Video_Hwc *evh);
+
+/* Functions for HWC Planes */
+EINTERN E_Video_Hwc *e_video_hwc_planes_create(E_Output *output, E_Client *ec);
+EINTERN Eina_Bool    e_video_hwc_planes_property_delay_set(E_Video_Hwc *evh, unsigned int id, tdm_value value);
+
+/* Functions for HWC Windows */
+EINTERN E_Video_Hwc *e_video_hwc_windows_create(E_Output *output, E_Client *ec);
+EINTERN Eina_Bool    e_video_hwc_windows_info_get(E_Video_Hwc *evh, E_Client_Video_Info *info);
+EINTERN Eina_Bool    e_video_hwc_windows_commit_data_release(E_Video_Hwc *evh, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
+EINTERN tbm_surface_h   e_video_hwc_windows_tbm_surface_get(E_Video_Hwc *evh);
+
+#endif
index 5b1f6c59673a156e803b4c93bfe2483d1fed47ec..4406aaf4fbff2028ba1cd406d535b1652536849c 100644 (file)
@@ -3,7 +3,7 @@
 #endif
 
 #include "e_video_internal.h"
-#include "e_video_hwc.h"
+#include "e_video_hwc_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
index f4e25a963457f16619cc34244911b0a6fdc4c586..e26e01a62de7c7284c61b0658ecf53208a96df70 100644 (file)
@@ -3,7 +3,7 @@
 #endif
 
 #include "e_video_internal.h"
-#include "e_video_hwc.h"
+#include "e_video_hwc_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_hwc_window_intern.h"
 #include "e_hwc_windows_intern.h"