|
NAMEtarget_seek - Request a change playback or presentation position for a frameserver.SYNOPSISniltarget_seek( vid:tgt, number:step ) target_seek( vid:tgt, number:step, bool:relative ) target_seek( vid:tgt, number:step, bool:relative ) target_seek( vid:tgt, number:step, bool:relative, bool:time ) target_seek( vid:tgt, number:step, bool:relative, bool:time=false ) target_seek( vid:tgt, number:step, bool:relative, bool:time=false, number:yaxis ) target_seek( vid:tgt, number:step, bool:relative, bool:time=false, number:yaxis, number:zaxis ) DESCRIPTIONRequest an absolute or relative step sized change in active content position in either time or space. Frameservers communicate this capability and the meaning of the ranges through the 'content_state' event. This feature can be used to implement things like scrollbars, as well as client side defined UI 'scaling'. If seeking in time (default), the relative (default) step is expected to be an offset in miliseconds. If setting an absolute time position, the absolute step is floating point in the 0..1 range. If seeking in space (panning) the relative (default) is in a discrete +- steps on a target defined scale. Absolute seeking is a float in the 0..1 range from start (0) to end (1). The sz axis is a hint on magnification where, the absolute value will treat 1 as normal scale, < 1 as minification and > 1 as magnification. The boolean arguments relative and time has constants defined as SEEK_SPACE | SEEK_TIME and SEEK_ABSOLUTE | SEEK_RELATIVE .EXAMPLEfunction target_seek0() vid = launch_avfeed("file=test.mkv", "", function(source, status) if status.kind == "resized" then show_image(source) resize_image(source, status.width, status.height) end end ) target_seek(vid, 100) -- seek +100ms end EXAMPLEfunction target_seek1() vid = launch_avfeed("file=test.mkv", "", function(source, status) if status.kind == "resized" then show_image(source) resize_image(source, status.width, status.height) end end ) end function main_clock_pulse() target_seek(vid, 1, SEEK_RELATIVE, SEEK_SPACE, 1) -- dx,dy += 1 every tick end end EXAMPLEfunction target_seek2() vid = launch_avfeed("file=test.mkv", "", function(source, status) if status.kind == "resized" then show_image(source) resize_image(source, status.width, status.height) end end ) end function main_clock_pulse() target_seek(vid, 0, SEEK_ABSOLUTE, SEEK_SPACE, 0, math.random(0.1, 3)) -- randomized zoom each tick end end MISUSEfunction target_seek0() vid = launch_avfeed("file=test.mkv", "", function(source, status) if status.kind == "resized" then show_image(source) resize_image(source, status.width, status.height) end end ) end target_seek(BADID) end
Visit the GSP FreeBSD Man Page Interface. |