Overview Image Sources Components XML Config Slow Control Image File Formats API Source Repository VSv2 Conference Submissions Contact

AVINE Video System

TINE Property Interface of Raw2Jpeg

The Raw2Jpeg component provides 3 TINE devices: 'Server', 'Source' and 'Output' contain similar properties like SGP devices of the same name.

Table of Contents

 

Property Interface of TINE-device 'Server'

TINE Property In/Out Data Types Description Special Error codes
AliveSince out 1 NAME64 (any string)1 string showing last startup date and time of SGP  
LastSwitchResult out 300 TEXT (any string)1, also accepts INT32 human readable string showing result of last switching from current to new input source OR general meaning of string encoded into an integer

Integer Code String3
0 switching of input is currently ongoing
1 switching of input successfully completed
-1 switching of input failed
-2 switching of input failed but server will keep running, because it's configured to do so
 
LastSwitchTime out 1 NAME64 (any string)1 human readable string showing the timestamp when last switching attempt occured  
Name out 1 NAME64 (any string)1 returns name of SGP instance  
Sources out n NAME64 Returns array of strings showing names of all input sources which can be connected to this Raw2Jpeg instance. Needs syslist.xml file. If the TINE client asks for less than N elements, as much elements as the client asks for are returned. 526: error looking up input sources
SourcesType out NAME64 (any string)1 or INT32 returns which type the input source is

Code String
0 ImageSource
1 InputSource

For SGP-type of component, input source is always 0/'ImageSource'. For Layer-type of component, input source is always 1/'InputSource'.

 
Status out INT32 or any string1 returns code or string in which condition the server currently is

Integer Code Recommended Colour for Code String
0 Red Reinitialization failed.
1 Green Everything is fine.
2 Yellow Some internal warning.
3 Orange Many warnings happened
4 Blue Currently no input source connected.
 
Type out 1 NAME64 (any string)1 returns string which type of Layer this is: 'Raw2Jpeg'  
Version out 1 NAME64 (any string)1 string showing type, version no and build date of server binary, e.g. " Raw2Jpeg beta dev (b175(ReleaseIntel) - Jul 12, 2011)"  

Footnotes:
1 possible are data types CF_TEXT, CF_NAME8, CF_NAME16, CF_NAME32, CF_NAME48, CF_NAME64, longer text may be cutted automatically to fit datatype constraints
2 the magic is INT32 1

Property Interface of TINE-device 'Source'

TINE Property In/Out Data Types Description Special Error codes
AvailableSince out 1 NAME64 (any string)1 returns a human readable string since when the current input source is already connected to this server. e.g. 'available since 16.08.2011 11:56:50'  
FrameRate out 1 FLOAT or DOUBLE shows the current number of frames per second the server is estimating, average value based on number of frames that were received from input device in the last 5 seconds  
ID out 1 INT32 shows the unique ID (0..99999999) of the last image received recently, e.g. 120 (ID=0 means 'no image source' which in fact means here no image has been received yet or a timeout occured)

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with ID=0. So clients can 'guess' that there is no data available at the moment.
 
InputAddress out 1 NAME64 (any string)1 returns a string which gives an expert technical information about details of input source connection, e.g. 'shm:/PITZ/FG6S.PJAIGigE/Output/Frame.Sched'  
InputName out 1 NAME64 (any string)1 returns 'Name' string of the current input device, e.g. 'FG6S.PJAIGigE'  
LastImageHeader out 188 Bytes Returns the latest successfully received image header. Note: This function has been implemented for internal use/debugging/testing and should not be used. 517: No frame taken yet.
Name out 1 NAME64 (any string)1 returns the name of the image source extracted from the last image received in past, e.g. 'Low.Scr3'

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with 'Not Connected'. So clients can 'guess' that there is no data available at the moment.
 
Status out INT32 or any string1 returns code or string in which condition the input device currently is

Integer Code Recommended Colour for Code String
0 Red Re-)Initialization of input failed.
1 Green Everything is fine.
2 Yellow New frames are not coming in.
3 Orange Video frames cannot be transcoded/incompatible.
4 Blue Currently no input source connected.
 
Switch in/out in: 1 NAME64 (any string)1
out: INT32
switch to some new input source, its name is passed as input parameter, possible source name may2 be seen at TINE-device 'Server', property 'Sources'. In case return code is 513 (success), return value will be a transaction ID, which can be passed later on to property 'SwitchResult' to obtain information about result of the switching attempt.
513: OK. Name accepted. Switching will be tried. Server will be restarted for this.
525: Failed. Name was not accepted.
SwitchResult in/out in: INT32
out: 1 NAME64 (any string)1 or INT32
one has to pass a proper transaction id and then will get back the return code or human readable string containing information about success/failure of the switching attempt

Integer Code String3
0 switching of input is currently ongoing
1 switching of input successfully completed
-1 switching of input failed
-2 switching of input failed but server will keep running, because it's configured to do so
515: bad magic passed on input

Footnotes:
1 possible are data types CF_TEXT, CF_NAME8, CF_NAME16, CF_NAME32, CF_NAME48, CF_NAME64, longer text may be cutted automatically to fit datatype constraints
2 The possible image source (input device) names can only be read out if a syslist.xml file is present.
3 the returned string does not exactly look like this, but similar

Property Interface of TINE-device 'Output'

TINE Property In/Out Data Types Description Special Error codes
Frame out IMAGE will return the latest available jpeg video frame (bits and header), recommended to be used for single requests as well as fallback solution (with long timeout e.g. 4000 ms) in case Frame.Sched does not work

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with Tine return code 517. So clients can 'guess' that there is no data available at the moment.
517: if no frame is available at the moment
Frame.Sched out IMAGE will return the latest available jpeg video frame (bits and header), uses scheduled mode of TINE so that frame is quickly transferred to client as soon as it's available, recommended to be used for clients that need high update rate or low latency

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with Tine return code 517. So clients can 'guess' that there is no data available at the moment.
517: if no frame is available at the moment
516: frame was already sent out (a scheduled frame in principle cannot be asked a couple of times per update cycle)
Header out 188 bytes debug-type property, will return the latest available video header contents converted to array of 188 bytes

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with Tine return code 517. So clients can 'guess' that there is no data available at the moment.
517: if no header data is available at the moment
Header.Sched out 188 bytes debug-type property, will return the latest available video header contents converted to array of 188 bytes, uses scheduled mode of TINE so that recent header update is transferred to client(s) with low latency

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with Tine return code 517. So clients can 'guess' that there is no data available at the moment.
517: if no header is available at the moment
516: header was already sent out (a scheduled header in principle cannot be asked a couple of times per update cycle)
Format out INT32 or any string1 returns the image output format (should be JPEG here)

Integer Code String
0 CF_IMAGE_FORMAT_GRAY
1 CF_IMAGE_FORMAT_RGB
2 CF_IMAGE_FORMAT_RGBA
3 CF_IMAGE_FORMAT_RGB15
4 CF_IMAGE_FORMAT_RGB16
5 CF_IMAGE_FORMAT_JPEG
6 CF_IMAGE_FORMAT_TIFF
7 CF_IMAGE_FORMAT_YUV411
8 CF_IMAGE_FORMAT_YUV422
9 CF_IMAGE_FORMAT_YUV444
10 CF_IMAGE_FORMAT_HUFFYUV
11 CF_IMAGE_FORMAT_BMP
12 CF_IMAGE_FORMAT_BAYER
anything else Unknown Image Format

In order to avoid confusion and do not allow that clients will get output data (video) that was acquired a long time ago, a timeout mechanism has been implemented. If for a certain period of time no new frame has been received on input side of this Layer component (<ServerSettings>/<oFrameTimeoutMilliseconds> in xml config file), the only image that might be left in an internal buffer is deleted and all properties showing contents of this 'last image'-buffer will be reset. In case such timeout has happened, this property will respond with Tine return code 517. So clients can 'guess' that there is no data available at the moment.
517: if no image is available at the moment
FormatParameter in/out 1 INT32 For JPEG compression, using this property one can change the method of downscaling of frame bits for grayscale data, before JPEG compression is applied, on-the-fly. If grayscale data consists of 8 bits or less, downscaling is not necessary and thus, not performed. If grayscale data consists of more than 8 bits, downscaling to 8 bits is performed. This is necessary because grayscale JPEG image does not provides more than 8 bits per pixel.

Integer Code Description
0 simple downscaling (always take most significant 8 bits based on theoretical maximum of pixel value)
1 adaptive downscaling (estimate each image and take most significant 8 bits based on maximum pixel value that was found in image)

Note: If other value than 1 is set, simple downscaling is performed.
 
FormatQuality in/out 1 INT32 Using this INT32[1..100] one can set/get the current JPEG compression factor. 100 means best quality (but biggest data size of compressed image), 1 means worst quality (but smalles data size of compressed image).  
SizeInOutPercent out 1 IIFF (CF_IIFF) This function will return the result of the latest successful compression:
INT 1: total size in bytes of input image (raw)
INT 2: total size of bytes of output image (jpeg)
FLOAT 1: ratio of INT 2/INT 1
FLOAT 2: unused

In case there is no image in internal 'last image' buffer, the structure is returned empty (all zeroes).
 

Last modified: Aug 23, 2011