Name

XvQueryBestSize - determine the optimum drawable region size

Syntax

#include

XXvvQQuueerryyBBeessttSSiizzee(_d_p_y_, _p_o_r_t_, _m_o_t_i_o_n_, _v_w_, _v_h_, _d_w_, _d_h_, _p___d_w_, _p___d_h)

Display _*_d_p_y;
XvPortID _p_o_r_t;
Bool _m_o_t_i_o_n;
unsigned int _v_w_, _v_h;
uunnssiiggnneedd iinntt _d_w_, _d_h_;
uunnssiiggnneedd iinntt _*_p___d_w_, _*_p___d_h_;

Arguments

_d_p_y Specifies the display screen on which the
Xv Server is to accept requests from Xv clients. If the display option is not specified, Xv uses the display screen specified by your DISPLAY environment variable. The display option has the format hostname:number. Using two colons (::) instead of one (:) indicates that DECnet is to be used for transport.
_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(3X) 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(3X) completed successfully.
[XvBadExtension] Returned if the Xv extension is unavailable.
[XvBadAlloc] Returned if XvQueryBestSize(3X) failed to allocate memory to process
the request.

Diagnostics

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