![]() |
![]()
| ![]() |
![]()
NAMEaccept_target - accept a pending target request for a new segment SYNOPSISvid:new_vid, aid:new_aid, int:cookie
DESCRIPTIONA connected frameserver is provided with one segment by default, but additional ones can be requested. If that happens, a segment_request event is sent through to the callback associated with the frameserver. If this request goes unhandled in the callback implementation, a rejection reply will be sent. By calling accept_target in immediate response to a segment_request, a new segment will be allocated and sent to the frameserver. The type of this segment will follow the one present in the request, and it is the responsibility of the script to determine that this is one that is supported. To filter the segkind field, prefer to use a whitelisting approach. The optional arguments setw , seth can be used to change the initial dimensions of the new segment from the ones requested in the segreq event (see launch_target ). The frameserver can still perform a resize to ignore these values, but it saves a possible displayhint->resize cycle with the initial 1-2 frame setup latency that would impose. The optional argument callback sets the event handler for the new segment, but can also be changed with calls to target_updatehandler . On success, the function returns reference handles to the new audio and video resources, along with an identification token that might be used by the client for reparenting in viewport events. NOTES
EXAMPLEfunction accept_target0() SEE ALSO:target_alloc(3)
|