Difference between revisions of "Unit Video"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo Video interface unit'''
 +
 
 +
This unit provides both the Video device interface and the generic USB video device driver.
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Video specific constants''' <code> VIDEO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIDEO_NAME_PREFIX = 'Video';</code>
 +
| Name prefix for Video Devices
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Video device types''' <code> VIDEO_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIDEO_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Video device states''' <code> VIDEO_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIDEO_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>VIDEO_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Video device flags''' <code> VIDEO_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIDEO_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Video logging''' <code> VIDEO_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIDEO_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| Video debugging messages
 +
|-
 +
| <code>VIDEO_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| Video informational messages, such as a device being attached or detached
 +
|-
 +
| <code>VIDEO_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| Video error messages
 +
|-
 +
| <code>VIDEO_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No Video messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Video properties'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVideoProperties = ^TVideoProperties;</code>
 +
 
 +
<code>TVideoProperties = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Device flags (eg VIDEO_FLAG_????)
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Video enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TVideoEnumerate = function(Video:PVideoDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''Video notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TVideoNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Video device get properties'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TVideoDeviceGetProperties = function(Video:PVideoDevice; Properties:PVideoProperties):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Video device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVideoDevice = ^TVideoDevice;</code>
 +
 
 +
<code>TVideoDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| The Device entry for this Video device
 +
|-
 +
|colspan="2"|''Video Properties''
 +
|-
 +
| <code>VideoId:LongWord; </code>
 +
| Unique Id of this Video device in the Video device table
 +
|-
 +
| <code>VideoState:LongWord;</code>
 +
| Video device state (eg VIDEO_STATE_ENABLED)
 +
|-
 +
| <code>DeviceGetProperties:TVideoDeviceGetProperties;</code>
 +
| A Device specific DeviceGetProperties method implementing the standard Video device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Properties:TVideoProperties;</code>
 +
| Device properties
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PVideoDevice;</code>
 +
| Previous entry in Video device table
 +
|-
 +
| <code>Next:PVideoDevice;</code>
 +
| Next entry in Video device table
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Video logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>VIDEO_DEFAULT_LOG_LEVEL:LongWord = VIDEO_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for Video messages. Only messages with level greater than or equal to this will be printed.
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>VIDEO_LOG_ENABLED:Boolean; </code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''Initialization functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure VideoInit;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the Video unit and Video device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Called only during system startup
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Video device functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceGetProperties(Video:PVideoDevice; Properties:PVideoProperties):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified Video device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Video'''
 +
| The Video device to get properties from
 +
|-
 +
! '''Properties'''
 +
| Pointer to a TVideoProperties structure to fill in
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceCreate:PVideoDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Video device entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| Pointer to new Video device entry or nil if Video device could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceCreateEx(Size:LongWord):PVideoDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Video device entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| Size in bytes to allocate for new Video device (Including the Video device entry)
 +
|-
 +
! '''Return'''
 +
| Pointer to new Video device entry or nil if Video device could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceDestroy(Video:PVideoDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Video device entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceRegister(Video:PVideoDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Video device in the Video device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceDeregister(Video:PVideoDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Video device from the Video device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceFind(VideoId:LongWord):PVideoDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceFindByName(const Name:String):PVideoDevice; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceFindByDescription(const Description:String):PVideoDevice; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceEnumerate(Callback:TVideoEnumerate; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceNotification(Video:PVideoDevice; Callback:TVideoNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Video helper functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoGetCount:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current Video device count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceGetDefault:PVideoDevice; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default Video device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceSetDefault(Video:PVideoDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default Video device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VideoDeviceCheck(Video:PVideoDevice):PVideoDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Video device is in the Video device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure VideoLog(Level:LongWord; Video:PVideoDevice; const AText:String);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure VideoLogInfo(Video:PVideoDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure VideoLogError(Video:PVideoDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure VideoLogDebug(Video:PVideoDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Revision as of 01:14, 21 June 2017

Return to Unit Reference


Description


Ultibo Video interface unit

This unit provides both the Video device interface and the generic USB video device driver.

Constants



Video specific constants VIDEO_*
VIDEO_NAME_PREFIX = 'Video'; Name prefix for Video Devices


Video device types VIDEO_TYPE_*
VIDEO_TYPE_NONE = 0;  


Video device states VIDEO_STATE_*
VIDEO_STATE_DISABLED = 0;  
VIDEO_STATE_ENABLED = 1;  


Video device flags VIDEO_FLAG_*
VIDEO_FLAG_NONE = $00000000;  


Video logging VIDEO_LOG_*
VIDEO_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG; Video debugging messages
VIDEO_LOG_LEVEL_INFO = LOG_LEVEL_INFO; Video informational messages, such as a device being attached or detached
VIDEO_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR; Video error messages
VIDEO_LOG_LEVEL_NONE = LOG_LEVEL_NONE; No Video messages


Type definitions



Video properties

PVideoProperties = ^TVideoProperties;

TVideoProperties = record

Flags:LongWord; Device flags (eg VIDEO_FLAG_????)

Video enumeration callback

TVideoEnumerate = function(Video:PVideoDevice; Data:Pointer):LongWord;

Video notification callback

TVideoNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

Video device get properties

TVideoDeviceGetProperties = function(Video:PVideoDevice; Properties:PVideoProperties):LongWord;

Video device

PVideoDevice = ^TVideoDevice;

TVideoDevice = record

Device Properties
Device:TDevice; The Device entry for this Video device
Video Properties
VideoId:LongWord; Unique Id of this Video device in the Video device table
VideoState:LongWord; Video device state (eg VIDEO_STATE_ENABLED)
DeviceGetProperties:TVideoDeviceGetProperties; A Device specific DeviceGetProperties method implementing the standard Video device interface (Or nil if the default method is suitable)
Statistics Properties
 
Driver Properties
Lock:TMutexHandle; Device lock
Properties:TVideoProperties; Device properties
Internal Properties
Prev:PVideoDevice; Previous entry in Video device table
Next:PVideoDevice; Next entry in Video device table


Public variables



Video logging

VIDEO_DEFAULT_LOG_LEVEL:LongWord = VIDEO_LOG_LEVEL_DEBUG; Minimum level for Video messages. Only messages with level greater than or equal to this will be printed.
VIDEO_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

procedure VideoInit;
Description: Initialize the Video unit and Video device table
Note Called only during system startup


Video device functions

function VideoDeviceGetProperties(Video:PVideoDevice; Properties:PVideoProperties):LongWord;
Description: Get the properties for the specified Video device
Video The Video device to get properties from
Properties Pointer to a TVideoProperties structure to fill in
Return ERROR_SUCCESS if completed or another error code on failure


function VideoDeviceCreate:PVideoDevice;
Description: Create a new Video device entry
Return Pointer to new Video device entry or nil if Video device could not be created


function VideoDeviceCreateEx(Size:LongWord):PVideoDevice;
Description: Create a new Video device entry
Size Size in bytes to allocate for new Video device (Including the Video device entry)
Return Pointer to new Video device entry or nil if Video device could not be created


function VideoDeviceDestroy(Video:PVideoDevice):LongWord;
Description: Destroy an existing Video device entry
Note None documented


function VideoDeviceRegister(Video:PVideoDevice):LongWord;
Description: Register a new Video device in the Video device table
Note None documented


function VideoDeviceDeregister(Video:PVideoDevice):LongWord;
Description: Deregister a Video device from the Video device table
Note None documented


function VideoDeviceFind(VideoId:LongWord):PVideoDevice;
Description: To be documented
Note None documented


function VideoDeviceFindByName(const Name:String):PVideoDevice; inline;
Description: To be documented
Note None documented


function VideoDeviceFindByDescription(const Description:String):PVideoDevice; inline;
Description: To be documented
Note None documented


function VideoDeviceEnumerate(Callback:TVideoEnumerate; Data:Pointer):LongWord;
Description: To be documented
Note None documented


function VideoDeviceNotification(Video:PVideoDevice; Callback:TVideoNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
Note None documented


Video helper functions

function VideoGetCount:LongWord; inline;
Description: Get the current Video device count
Note None documented


function VideoDeviceGetDefault:PVideoDevice; inline;
Description: Get the current default Video device
Note None documented


function VideoDeviceSetDefault(Video:PVideoDevice):LongWord;
Description: Set the current default Video device
Note None documented


function VideoDeviceCheck(Video:PVideoDevice):PVideoDevice;
Description: Check if the supplied Video device is in the Video device table
Note None documented


procedure VideoLog(Level:LongWord; Video:PVideoDevice; const AText:String);
Description: To be documented
Note None documented


procedure VideoLogInfo(Video:PVideoDevice; const AText:String); inline;
Description: To be documented
Note None documented


procedure VideoLogError(Video:PVideoDevice; const AText:String); inline;
Description: To be documented
Note None documented


procedure VideoLogDebug(Video:PVideoDevice; const AText:String); inline;
Description: To be documented
Note None documented


Return to Unit Reference