Name

XvQueryBestSize - determine the optimum drawable region size

Syntax

#include


XvQueryBestSize(Display *dpy, XvPort port, Bool motion,
                unsigned int vw, unsigned int vh,
                unsigned int dw, unsigned int dh,
                unsigned int *p_dw, unsigned int *p_dh);

Arguments

_d_p_y Specifies the connection to the X server.
_p_o_r_t Defines the port associated with the display and adaptor for which
the optimum size is to be calculated.
_m_o_t_i_o_n Specifies _T_r_u_e if the destination size needs to support
full motion, and _F_a_l_s_e if the destination size need only support still images.
_v_w_,_v_h Specifies the size of the source video region desired.
_d_w_,_d_h Specifies the size of the destination drawable region desired.
_p___d_w_,_p___d_h Pointers to where the closest destination sizes supported by the server are
returned.

Description

Some ports may be able to scale incoming or outgoing video. XvQueryBestSize(3) returns the size of the closest destination region that is supported by the adaptor. The returned size is guaranteed to be smaller than the requested size if a smaller size is supported.

Returned Values

[Success] Returned if XvQueryBestSize(3) completed successfully.
[XvBadExtension] Returned if the Xv extension is unavailable.
[XvBadAlloc] Returned if XvQueryBestSize(3) failed to allocate memory to process
the request.

Diagnostics

[XvBadPort] Generated if the requested port does not exist.