DESY ACOP Beans Home

de.desy.acop.video.displayer
Class VideoHeaderV2

java.lang.Object
  extended by de.desy.acop.video.displayer.VideoHeaderV2

public final class VideoHeaderV2
extends java.lang.Object

VideoHeaderV2 implements marshaling of a Video System v2 (VSv2) data array (usually just received via the network) to a Video System v3 TINE IMAGE datatype for usage with the rest of Video System v3 Java code.

Note:This class is only a very basic construct and might be substantially changed in future. It fits its purpose currently but will not win a price for meaningful class design!

Version:
$Id: Templates.xml,v 1.10 2008/06/20 16:10:13 sweisse Exp $
Author:
Stefan Weisse, David Melkumyan

Field Summary
static int HDRSIZE
          size in bytes of a VSv2 header that each VSv2 data array starts off with
static long HUFFYUV_FOURCC
          video codec typical FOURCC (four character code) of HUFFYUV 'HFYU'
 
Constructor Summary
VideoHeaderV2()
           
 
Method Summary
 boolean packageV2BlobIntoIMAGE(java.lang.String cameraPortName, byte[] imageV2blob, de.desy.tine.types.IMAGE destTineImage)
          interprets an input array (aImageV2blob) as a Video System v2 data block (header plus possibly additional format header plus image bits).
 boolean parseImageV2blob(byte[] buf)
          interprets an input array (buffer) as a Video System v2 header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HDRSIZE

public static final int HDRSIZE
size in bytes of a VSv2 header that each VSv2 data array starts off with

See Also:
Constant Field Values

HUFFYUV_FOURCC

public static final long HUFFYUV_FOURCC
video codec typical FOURCC (four character code) of HUFFYUV 'HFYU'

See Also:
Constant Field Values
Constructor Detail

VideoHeaderV2

public VideoHeaderV2()
Method Detail

packageV2BlobIntoIMAGE

public boolean packageV2BlobIntoIMAGE(java.lang.String cameraPortName,
                                      byte[] imageV2blob,
                                      de.desy.tine.types.IMAGE destTineImage)
interprets an input array (aImageV2blob) as a Video System v2 data block (header plus possibly additional format header plus image bits). In case validity checking succeeds, the contained image information is wrapped into a VSv3 TINE IMAGE datatype for use with all other Java Video code parts. As a Video System v2 header does not deliver a good string to be used as VSv3 header camera port (mounting place e.g.) identification, this member in IMAGE datatype is taken from aCamPort parameter.

Parameters:
cameraPortName - camera port description to be put in resulting IMAGE aDestImage
imageV2blob - input data set (should contain VSv2 image data block)
destTineImage - TINE IMAGE datatype output
Returns:
  • true - success
  • false - error importing blob (most probably validity checking failed)

parseImageV2blob

public boolean parseImageV2blob(byte[] buf)
interprets an input array (buffer) as a Video System v2 header. In case validity checking succeeds, the contained image information is stored into local class variables.

Parameters:
buf - VSv2 header as byte array
Returns:
  • true - success
  • false - error, no class variable is updated (most probably validity checking failed)


Copyright © 2010. All Rights Reserved.