Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
target_seek(3)			  Arcan Lua API 		  target_seek(3)

NAME
     target_seek  -  Request  a  change  playback or presentation position for a
     frameserver.

SYNOPSIS
     nil
     target_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,  num-
     ber:xaxis )
     target_seek(  vid:tgt,  number:step,  bool:relative,  bool:time=false, num-
     ber:xaxis, number:zaxis )

DESCRIPTION
     Request an absolute or relative step  sized change in active content  posi-
     tion  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 de-
     fined  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 zaxis  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 .

EXAMPLE
     function 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

EXAMPLE
     function 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

EXAMPLE
     function 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

MISUSE
     function 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

targetcontrol			   August 2026			  target_seek(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=target_seek&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help