User Tools

Site Tools


video

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
video [2022/11/29 15:17]
James Sentman
video [2022/12/01 17:05] (current)
James Sentman [Stream Stalled Handler:] as number check for string parameter
Line 8: Line 8:
  
 Those plugins can then load camera API plugins to provide an interface to the controls of specific cameras or brands of cameras. This allows you the most flexibility in getting the video into XTension and still having control of the camera features though scripting in XTension. I can add more stream types and more camera API support without having to change any of the existing ones now. Those plugins can then load camera API plugins to provide an interface to the controls of specific cameras or brands of cameras. This allows you the most flexibility in getting the video into XTension and still having control of the camera features though scripting in XTension. I can add more stream types and more camera API support without having to change any of the existing ones now.
 +
 +**Note:** the new video system requires a more recent OS version than is required by the program overall. You must be running at least MacOS 10.15 Catalina in order to use these plugins.
  
 ----- -----
Line 81: Line 83:
 Most computers now days use SSD drives which are wonderfully fast but do not last forever under heavy use. Recording video all the time uses a lot of disk sectors over and over again slowly reducing their lifespan faster than they would normally. I would recommend that video recording be done to external drives, preferably of the spinning platter type, or at least SSDs that are not internal to the Mac and therefore irreplaceable. Since the plugin instances each have their own recording directory you could easily place each video camera on a separate external drive if you wished. I would not recommend recording video to the internal drive of a modern Mac. Most computers now days use SSD drives which are wonderfully fast but do not last forever under heavy use. Recording video all the time uses a lot of disk sectors over and over again slowly reducing their lifespan faster than they would normally. I would recommend that video recording be done to external drives, preferably of the spinning platter type, or at least SSDs that are not internal to the Mac and therefore irreplaceable. Since the plugin instances each have their own recording directory you could easily place each video camera on a separate external drive if you wished. I would not recommend recording video to the internal drive of a modern Mac.
  
 +-----
 +=====Script Handlers:​=====
 +====Stream Stalled Handler:​====
 +All Camera types implement a script handler that is called when the stream stalls. It is passed a count of the attempts to recover since it went down. This way  you can ignore a single stall that is recovered by closing and opening the connection again but can take other measures to recover if the camera does not recover on the first try. 
 +
 +Use the “Insert...” toolbar item on the Edit Interface Script window to insert the template for the event.
 +<​code>​
 +(* S T R E A M   S T A L L E D
 +
 + This handler is called when a camera stops sending frames. StallCount is passed that is the count
 + of stalls in a row. This way you can tell if a camera is not recovering and take other action like
 + rebooting or power cycling it if needed. The count will increase until the interface is restarted or
 + the camera starts responding again.
 +*)
 +
 +on streamStalled( stallCount)
 + write log "​Attempted to restore camera " & stallCount & " times.”
 +        if (stallCount as number) > 4 then
 +            write log “running a failed camera restart"​
 +            -- send it a reboot, power cycle or whatever to bring it back online
 +
 +        end if
 +end streamStalled
 +
 +</​code>​
  
 ----- -----
video.1669735033.txt.gz · Last modified: 2022/11/29 15:17 by James Sentman