tdm_hwc_window_unset_flags(tdm_hwc_window *hwc_window, tdm_hwc_window_flag flags);
/**
+ * @brief Get the available property array of a video hwc window object.
+ * @param[in] hwc window A video hwc window object
+ * @param[out] props The available property array
+ * @param[out] count The count of properties
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_video_get_available_properties(tdm_hwc_window *hwc_window,
+ const tdm_prop **props, int *count);
+
+/**
+ * @brief Get the property which has a given id.
+ * @param[in] hwc window A video hwc window object
+ * @param[in] id The property id
+ * @param[out] value The value
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_video_get_property(tdm_hwc_window *hwc_window, uint32_t id,
+ tdm_value *value);
+
+/**
+ * @brief Set the property which has a given id.
+ * @param[in] hwc window A video hwc window object
+ * @param[in] id The property id
+ * @param[in] value The value
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_video_set_property(tdm_hwc_window *hwc_window, uint32_t id,
+ tdm_value value);
+
+/**
* @brief Get the window video capability
* @param[in] hwc_window A window object
* @param[out] video_capability A hwc window video capability
tdm_error (*hwc_window_video_get_supported_format)(tdm_hwc_window *hwc_window,
const tbm_format **formats,
int *count);
+
+ /**
+ * @brief Get the available property array of a video hwc window object.
+ * @param[in] hwc window A video hwc window object
+ * @param[out] props The available property array
+ * @param[out] count The count of properties
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_video_get_available_properties)(
+ tdm_hwc_window *hwc_window,
+ const tdm_prop **props, int *count);
+
+ /**
+ * @brief Get the property which has a given id.
+ * @param[in] hwc window A video hwc window object
+ * @param[in] id The property id
+ * @param[out] value The value
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_video_get_property)(tdm_hwc_window *hwc_window,
+ uint32_t id, tdm_value *value);
+
+ /**
+ * @brief Set the property which has a given id.
+ * @param[in] hwc window A video hwc window object
+ * @param[in] id The property id
+ * @param[in] value The value
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_video_set_property)(tdm_hwc_window *hwc_window,
+ uint32_t id, tdm_value value);
+
} tdm_func_hwc_window;
/**
return ret;
}
+
+EXTERN tdm_error
+tdm_hwc_window_video_get_available_properties(tdm_hwc_window *hwc_window,
+ const tdm_prop **props, int *count)
+{
+ tdm_func_hwc_window *func_hwc_window = NULL;
+
+ HWC_WINDOW_FUNC_ENTRY();
+
+ TDM_RETURN_VAL_IF_FAIL(props != NULL, TDM_ERROR_INVALID_PARAMETER);
+ TDM_RETURN_VAL_IF_FAIL(count != NULL, TDM_ERROR_INVALID_PARAMETER);
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ func_hwc_window = &private_display->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_video_get_available_properties) {
+ /* LCOV_EXCL_START */
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
+ }
+
+ ret = func_hwc_window->hwc_window_video_get_available_properties(private_hwc_window->hwc_window_backend,
+ props, count);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
+EXTERN tdm_error
+tdm_hwc_window_video_get_property(tdm_hwc_window *hwc_window,
+ unsigned int id, tdm_value *value)
+{
+ tdm_func_hwc_window *func_hwc_window = NULL;
+
+ HWC_WINDOW_FUNC_ENTRY();
+
+ TDM_RETURN_VAL_IF_FAIL(value != NULL, TDM_ERROR_INVALID_PARAMETER);
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ func_hwc_window = &private_display->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_video_get_property) {
+ /* LCOV_EXCL_START */
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
+ }
+
+ ret = func_hwc_window->hwc_window_video_get_property(private_hwc_window->hwc_window_backend,
+ id, value);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
+EXTERN tdm_error
+tdm_hwc_window_video_set_property(tdm_hwc_window *hwc_window,
+ unsigned int id, tdm_value value)
+{
+ 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_set_property) {
+ /* LCOV_EXCL_START */
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
+ }
+
+ ret = func_hwc_window->hwc_window_video_set_property(private_hwc_window->hwc_window_backend,
+ id, value);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}