Implementation
Functions are implemented as XML messages over an ethernet socket.
It is standard XML so can also be sent like this....
<call> <name>StoreFrameCache</name> <params>
<int>4000</int> </params> </call>
i.e. CR / LF and other formating is irrelevant.
ASCII data should be escaped i.e. < and & should be
replaced by < and & respectively
XYZ control
Platinum sends set of parameters to control a spatial convertor
<!-- Call
SetValuesAtTime(timestamp,x,y,z,x_aspect,y_aspect,rotate,x_flip,y_flip)
-->
<!-- timestamp is frame count that change must happen or 0x80000000
which means immediate -->
<!-- in this example 0x15F90 is 90000 which is 1:00:00:00 at 25fps
-->
<!-- in this example DVS_X could be IQ_X and parameters can be
changed, extended using a separate parameter file etc -->
<call>
<name>SetValuesAtTime</name>
<params>
<hex>15F90</hex>
<keyname>DVS_X</keyname><hex>8000</hex>
<keyname>DVS_Y</keyname><hex>8000</hex>
<keyname>DVS_Z</keyname><hex>8000</hex>
<keyname>DVS_X_ASPECT</keyname><hex>8000</hex>
<keyname>DVS_Y_ASPECT</keyname><hex>8000</hex>
<keyname>DVS_ROTATE</keyname><hex>8000</hex>
<keyname>DVS_X_FLIP</keyname><int>0</int>
<keyname>DVS_Y_FLIP</keyname><int>0</int>
</params>
</call>
Get current timeline
Platinum sends a request for the current timeline to be returned as a
CMX edl
<!-- Call CMXRead() -->
<call>
<name>CMXRead</name>
<params>
</params>
</call>
<!-- Response from CMXRead() -->
<response>
<name>CMXRead</name>
<params>
<fps>25</fps>
<string>TITLE: unknown
001 Reel1 V C 00:59:59:00
01:00:05:08 01:00:00:00 01:00:06:08
002 BLK V C 00:00:00:00
00:00:02:00 01:00:06:08 01:00:08:08
003 Reel1 V C 01:00:03:08
01:00:08:07 01:00:08:08 01:00:13:07
004 BLK V C 00:00:00:00
00:00:02:00 01:00:13:07 01:00:15:07
005 Reel1 V C 01:00:06:07
01:00:14:03 01:00:15:07 01:00:23:03
006 BLK V C 00:00:00:00
00:00:02:00 01:00:23:03 01:00:25:03
</string>
</params>
</call
Virtual Conform (by sending CMX file)
Platinum sends a subset of the original EDL to the disk to allow easy
switching between overlength source and record timelines.
When received the timeline is thrown away and a new one created,
exactly as if the operator was driving the disk's gui.
If possible rendered effects should be cached to speed conforming. New
renders will not be needed as the Platinum is not re-editing the
effects.
<!-- Call CMXConform(keyname type, fps, length,edl) -->
<!-- keyname is always CMX_LIST -->
<!-- fps is 24, 25, 30 -->
<!-- length is CMX filelength in bytes -->
<call>
<name>CMXConform</name>
<params>
<keyname>CMX_LIST</keyname>
<fps>25</fps>
<int>length</int>
<string>TITLE: unknown
001 Reel1 V C 00:59:59:00
01:00:05:08 01:00:00:00 01:00:06:08
002 BLK V C 00:00:00:00
00:00:02:00 01:00:06:08 01:00:08:08
003 Reel1 V C 01:00:03:08
01:00:08:07 01:00:08:08 01:00:13:07
004 BLK V C 00:00:00:00
00:00:02:00 01:00:13:07 01:00:15:07
005 Reel1 V C 01:00:06:07
01:00:14:03 01:00:15:07 01:00:23:03
006 BLK V C 00:00:00:00
00:00:02:00 01:00:23:03 01:00:25:03
</string>
</params>
</call>
FilmCache
A clip is created for storage of reference frames at installation. This
is a single persistant clip, that should be able to store frames of any
resolution. It is not necessary to play this clip, merely store and
recall.
A useful size would be 10,000 frames.
<!-- Call StoreFrameCache(int frameNumber) -->
<!-- frameNumber is 0..(frameCacheSize - 1) -->
<!-- Store current processed frame at full resolution into a
FilmCache clip -->
<call>
<name>StoreFrameCache</name>
<params>
<int>4000</int>
</params>
</call>
<!-- Call RecallFrameCache(int frameNumber) -->
<!-- frameNumber is 0..(frameCacheSize - 1) -->
<!-- Recall frame from FilmCache clip at full resolution into
reference store -->
<call>
<name>RecallFrameCache</name>
<params>
<int>4000</int>
</params>
</call>
Processed frame transfer
<!-- Call GetProcessedFrame(xsize, ysize, bitsize, encoding) -->
<!-- xsize is 0..(maximagewidth - 1) -->
<!-- ysize is 0..(maximageheight - 1) -->
<!-- bitsize is 8 or 10 (possibly 16 in future) -->
<!-- encoding is base64 or raw -->
<!-- Gets output (corrected) frame, re-res it, and return to
Platinum -->
<!-- Size of data returned is xsize * ysize * bytes_per_pixel -->
<!-- * 4/3 if encoding is base64 -->
<!-- bytes_per_pixel is 3 for 8bit data, 4 for 10bit data or 6 for
16bit data. -->
<call>
<name>GetProcessedFrame</name>
<params>
<int>1920</int>
<int>1080</int>
<int>8</int>
<encoding>base64</encoding>
</params>
</call>
<!-- Response from GetProcessedFrame() -->
<!-- Similar to response from GetStoredFrame, but no frameno. -->
<!-- If returning base64 data... -->
<response>
<name>GetProcessedFrame</name>
<status>0</status>
<params>
<int>1920</int>
<int>1080</int>
<int>8</int>
<encoding>base64</encoding>
<base64>(base64 encoded data of size x * y * (bytes_per_pixel)
* 4/3 ASCII chars)</base64>
</params>
</response>
Reference store (wipe position and mode)
<!-- Call ReferenceStoreControl(String type, String mode, int value)
-->
<!-- type is wipe or mix -->
<!-- if wipe, mode is horizontal or vertical -->
<!-- if mix, mode is normal -->
<!-- value is 0..65535, if no wipe available, then non-zero value
means show reference -->
<call>
<name>ReferenceStoreControl</name>
<params>
<string>wipe</string>
<string>horizontal</string>
<int>32768</int>
</params>
</call>
Full resolution frame transfer (grabbing frames)
<!-- Call GetStoredFrame(int frameNumber, xsize, ysize, bitsize,
encoding) -->
<!-- frameNumber is 0..(frameCacheSize - 1) -->
<!-- xsize is 0..(maximagewidth - 1) -->
<!-- ysize is 0..(maximageheight - 1) -->
<!-- bitsize is 8 or 10 (possibly 16 in future) -->
<!-- encoding is base64 or raw (raw data sent after command, use
only if problems with size of XML packet and parsing) -->
<!-- Get frame from current clip, re-res it, and return to Platinum
-->
<!-- NOTE: will need a project path at later date, at first assume
current clip -->
<!-- Size of data returned is xsize * ysize * bytes_per_pixel -->
<!-- * 4/3 if encoding is base64 -->
<!-- bytes_per_pixel is 3 for 8bit data, 4 for 10bit data or 6 for
16bit data. -->
<call>
<name>GetStoredFrame</name>
<params>
<int>90000</int>
<int>1920</int>
<int>1080</int>
<int>10</int>
<encoding>raw</encoding>
</params>
</call>
<!-- Response from GetStoredFrame() -->
<!-- status: 0 for OK, other for error number -->
<!-- frameNumber is 0..(frameCacheSize - 1) -->
<!-- xsize is 0..(maximagewidth - 1) -->
<!-- ysize is 0..(maximageheight - 1) -->
<!-- bitsize is 8 or 10 (possibly 16 in future) -->
<!-- encoding is base64 or raw -->
<!-- If returning base64 data... (preferred option) -->
<response>
<name>GetStoredFrame</name>
<status>0</status>
<params>
<int>90000</int>
<int>1920</int>
<int>1080</int>
<int>10</int>
<encoding>base64</encoding>
<base64>(base64 encoded data of size x * y * (bytes_per_pixel)
* 4/3 ASCII chars)</base64>
</params>
</response>
<!-- If returning raw data... -->
<response>
<name>GetStoredFrame</name>
<status>0</status>
<params>
<int>90000</int>
<int>1920</int>
<int>1080</int>
<int>10</int>
<encoding>raw</encoding>
</params>
</response>
[raw data of size x * y * (bytes_per_pixel)]
Full resolution frame transfer (sending frames)
<!-- Call PutStoredFrame(int frameNumber, xsize, ysize, bitsize,
encoding) -->
<!-- frameNumber is 0..(frameCacheSize - 1) -->
<!-- xsize is 0..(maximagewidth - 1) -->
<!-- ysize is 0..(maximageheight - 1) -->
<!-- bitsize is 8 or 10 (possibly 16 in future) -->
<!-- encoding is base64 or raw (raw data sent after command, use
only if problems with size of XML packet and parsing) -->
<!-- Send a frame from Platinum to the current clip and re-res it
-->
<!-- NOTE: will need a project path at later date, at first assume
current clip -->
<!-- Size of data sent is xsize * ysize * (3 for 8bit, 4 for 10bit,
6 for 16bit) -->
<!-- * 4/3 if encoding is base64 -->
<!-- If sending base64 data...(preferred option) -->
<call>
<name>PutStoredFrame</name>
<params>
<int>90000</int>
<int>1920</int>
<int>1080</int>
<int>10</int>
<encoding>base64</encoding>
<base64>(base64 encoded data of size x * y * (bytes_per_pixel)
* 4/3 ASCII chars)</base64>
</params>
</call>
<!-- If sending raw data... -->
<call>
<name>PutStoredFrame</name>
<params>
<int>90000</int>
<int>1920</int>
<int>1080</int>
<int>10</int>
<encoding>raw</encoding>
</params>
</call>
[raw data of size x * y * (bytes_per_pixel)]
(note: Platinum expects a response between the closing </call>
and the data to indicate that the server is ready to receive data)