const tbm_format **formats, int *count);
/**
+ * @brief Get the capture available size of a display object.
+ * @details -1 means that a TDM backend module doesn't define the value.
+ * @param[in] dpy A display object
+ * @param[out] min_w The minimum width which TDM can handle
+ * @param[out] min_h The minimum height which TDM can handle
+ * @param[out] max_w The maximum width which TDM can handle
+ * @param[out] max_h The maximum height which TDM can handle
+ * @param[out] preferred_align The preferred align width which TDM can handle
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_display_get_capture_available_size(tdm_display *dpy, int *min_w, int *min_h,
+ int *max_w, int *max_h, int *preferred_align);
+
+/**
+ * @brief Get the max layer counts which a display object can show on screen.
+ * @details -1 means that a TDM backend module doesn't define the value.
+ * @param[in] dpy A display object
+ * @param[out] count The max count of layers
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_display_get_max_layer_count(tdm_display *dpy, int *max_count);
+
+/**
* @brief Get the output counts which a display object has.
* @param[in] dpy A display object
* @param[out] count The count of outputs
}
EXTERN tdm_error
+tdm_display_get_capture_available_size(tdm_display *dpy, int *min_w, int *min_h,
+ int *max_w, int *max_h, int *preferred_align)
+{
+ DISPLAY_FUNC_ENTRY();
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ if (!(private_display->capabilities & TDM_DISPLAY_CAPABILITY_CAPTURE)) {
+ TDM_ERR("no capture capability");
+ _pthread_mutex_unlock(&private_display->lock);
+ return TDM_ERROR_NO_CAPABILITY;
+ }
+
+ if (min_w)
+ *min_w = private_display->caps_capture.min_w;
+ if (min_h)
+ *min_h = private_display->caps_capture.min_h;
+ if (max_w)
+ *max_w = private_display->caps_capture.max_w;
+ if (max_h)
+ *max_h = private_display->caps_capture.max_h;
+ if (preferred_align)
+ *preferred_align = private_display->caps_capture.preferred_align;
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
+EXTERN tdm_error
+tdm_display_get_max_layer_count(tdm_display *dpy, int *max_count)
+{
+ DISPLAY_FUNC_ENTRY();
+
+ TDM_RETURN_VAL_IF_FAIL(max_count != NULL, TDM_ERROR_INVALID_PARAMETER);
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ *max_count = private_display->caps_display.max_layer_count;
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
+EXTERN tdm_error
tdm_display_get_output_count(tdm_display *dpy, int *count)
{
tdm_private_output *private_output = NULL;