Difference between revisions of "Unit Codec"
From Ultibo.org
Line 132: | Line 132: | ||
<code>TCodecDevice = record</code> | <code>TCodecDevice = 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 Codec device | ||
+ | |- | ||
+ | |colspan="2"|''Codec Properties'' | ||
+ | |- | ||
+ | | <code>CodecId:LongWord;</code> | ||
+ | | Unique Id of this Codec device in the Codec device table | ||
+ | |- | ||
+ | | <code>CodecState:LongWord;</code> | ||
+ | | Codec dveice state (eg CODEC_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceProperties:TCodecDeviceProperties;</code> | ||
+ | | A Device specific DeviceProperties method implementing the standard Codec device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Properties:TCodecProperties;</code> | ||
+ | | Device properties | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PCodecDevice;</code> | ||
+ | | Previous entry in Codec device table | ||
+ | |- | ||
+ | | <code>Next:PCodecDevice;</code> | ||
+ | | Next entry in Codec device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Codec device''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PCodecDevice = ^TCodecDevice;</code> | ||
+ | |||
+ | <code>TCodecDevice = 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 Codec device | ||
+ | |- | ||
+ | |colspan="2"|''Codec Properties'' | ||
+ | |- | ||
+ | | <code>CodecId:LongWord;</code> | ||
+ | | Unique Id of this Codec device in the Codec device table | ||
+ | |- | ||
+ | | <code>CodecState:LongWord;</code> | ||
+ | | Codec dveice state (eg CODEC_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceProperties:TCodecDeviceProperties;</code> | ||
+ | | A Device specific DeviceProperties method implementing the standard Codec device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Properties:TCodecProperties;</code> | ||
+ | | Device properties | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PCodecDevice;</code> | ||
+ | | Previous entry in Codec device table | ||
+ | |- | ||
+ | | <code>Next:PCodecDevice;</code> | ||
+ | | Next entry in Codec device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Codec device''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | PCodecDevice = ^TCodecDevice; | ||
+ | |||
+ | TCodecDevice = record | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" |
Revision as of 04:00, 9 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo Codec interface unit
To be documented
Constants
[Expand]
Codec specific constants
CODEC_*
[Expand]
Codec device type constants
CODEC_TYPE_*
[Expand]
Codec device state constants
CODEC_STATE_*
[Expand]
Codec device flag constants
CODEC_FLAG_*
[Expand]
Codec logging constants
CODEC_LOG_*
Type definitions
Codec properties
[Expand]
PCodecProperties = ^TCodecProperties; TCodecProperties = record
Codec enumeration callback
TCodecEnumerate = function(Codec:PCodecDevice;Data:Pointer):LongWord;
|
Codec notification callback
TCodecNotification = function(Device:PDevice;Data:Pointer;Notification:LongWord):LongWord;
|
Codec device properties
TCodecDeviceProperties = function(Codec:PCodecDevice;Properties:PCodecProperties):LongWord;
|
Codec device
Codec device
Codec device
Public variables
Codec logging
CODEC_DEFAULT_LOG_LEVEL:LongWord = CODEC_LOG_LEVEL_DEBUG;
|
Minimum level for Codec messages. Only messages with level greater than or equal to this will be printed. |
CODEC_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
Codec device functions
[Expand]
function CodecDeviceProperties(Codec:PCodecDevice; Properties:PCodecProperties):LongWord;
Description: Get the properties for the specified Codec device
[Expand]
function CodecDeviceCreateEx(Size:LongWord):PCodecDevice;
Description: Create a new Codec device entry
[Expand]
function CodecDeviceDestroy(Codec:PCodecDevice):LongWord;
Description: Destroy an existing Codec device entry
[Expand]
function CodecDeviceRegister(Codec:PCodecDevice):LongWord;
Description: Register a new Codec device in the Codec device table
[Expand]
function CodecDeviceDeregister(Codec:PCodecDevice):LongWord;
Description: Deregister an Codec device from the Codec device table
[Expand]
function CodecDeviceFindByName(const Name:String):PCodecDevice; inline;
Description: To be documented
[Expand]
function CodecDeviceFindByDescription(const Description:String):PCodecDevice; inline;
Description: To be documented
[Expand]
function CodecDeviceEnumerate(Callback:TCodecEnumerate; Data:Pointer):LongWord;
Description: To be documented
[Expand]
function CodecDeviceNotification(Codec:PCodecDevice; Callback:TCodecNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
Codec helper functions
[Expand]
function CodecDeviceGetDefault:PCodecDevice; inline;
Description: Get the current default Codec device
[Expand]
function CodecDeviceSetDefault(Codec:PCodecDevice):LongWord;
Description: Set the current default Codec device
[Expand]
function CodecDeviceCheck(Codec:PCodecDevice):PCodecDevice;
Description: Check if the supplied Codec device is in the Codec device table
[Expand]
procedure CodecLog(Level:LongWord; Codec:PCodecDevice; const AText:String);
Description: To be documented
[Expand]
procedure CodecLogInfo(Codec:PCodecDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure CodecLogError(Codec:PCodecDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure CodecLogDebug(Codec:PCodecDevice; const AText:String); inline;
Description: To be documented
Return to Unit Reference