tdm_hwc_window_unset_flags(tdm_hwc_window *hwc_window, tdm_hwc_window_flag flags);
/**
+ * @brief Get the window video capability
+ * @param[in] hwc_window A window object
+ * @param[out] video_capability A hwc window video capability
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_video_get_capability(tdm_hwc_window *hwc_window,
+ tdm_hwc_window_video_capability *video_capability);
+
+/**
+ * @brief Get the window video supported format
+ * @param[in] hwc_window A window object
+ * @param[out] formats A hwc window supported formats
+ * @param[out] count A number of the hwc window supported formats
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_video_get_supported_format(tdm_hwc_window *hwc_window,
+ const tbm_format **formats,
+ int *count);
+
+/**
* @brief Destroy a pp object
* @param[in] pp A pp object
* @see tdm_display_create_pp
*/
tdm_error (*hwc_window_unset_flags)(tdm_hwc_window *hwc_window,
tdm_hwc_window_flag flags);
+
+ /**
+ * @brief Get the window video capability
+ * @param[in] hwc_window A window object
+ * @param[out] video_capability A hwc window video capability
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_video_get_capability)(tdm_hwc_window *hwc_window,
+ tdm_hwc_window_video_capability *video_capability);
+
+ /**
+ * @brief Get the window video supported format
+ * @param[in] hwc_window A window object
+ * @param[out] formats A hwc window supported formats
+ * @param[out] count A number of the hwc window supported formats
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_video_get_supported_format)(tdm_hwc_window *hwc_window,
+ const tbm_format **formats,
+ int *count);
} tdm_func_hwc_window;
/**
TDM_LAYER_CAPABILITY_NO_CROP = (1 << 12), /**< if a layer has no cropping capability */
} tdm_layer_capability;
+typedef enum {
+ TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCALE = (1 << 1), /**< if a hwc window video has scale capability */
+ TDM_HWC_WINDOW_VIDEO_CAPABILITY_TRANSFORM = (1 << 2), /**< if a hwc window video has transform capability */
+ TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCANOUT = (1 << 3), /**< if a hwc_window video allows a scanout buffer only */
+} tdm_hwc_window_video_capability;
+
/**
* @brief The pp capability enumeration
*/
return ret;
}
+
+EXTERN tdm_error
+tdm_hwc_window_video_get_capability(tdm_hwc_window *hwc_window,
+ tdm_hwc_window_video_capability *video_capability)
+{
+ tdm_func_hwc_window *func_hwc_window = NULL;
+
+ HWC_WINDOW_FUNC_ENTRY();
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ func_hwc_window = &private_display->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_video_get_capability) {
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ }
+
+ ret = func_hwc_window->hwc_window_video_get_capability(private_hwc_window->hwc_window_backend,
+ video_capability);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
+EXTERN tdm_error
+tdm_hwc_window_video_get_supported_format(tdm_hwc_window *hwc_window,
+ const tbm_format **formats,
+ int *count)
+{
+ tdm_func_hwc_window *func_hwc_window = NULL;
+
+ HWC_WINDOW_FUNC_ENTRY();
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ func_hwc_window = &private_display->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_video_get_supported_format) {
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ }
+
+ ret = func_hwc_window->hwc_window_video_get_supported_format(private_hwc_window->hwc_window_backend,
+ formats, count);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}