Harlequin RIP SDK

Support for shared memory framebuffers for eHVD elements. This allows a Scalable RIP to share eHVD elements across the entire RIP farm, without needing coordination from a raster manager or central controller. More...

#include "std.h"
#include "rrevents.h"
#include "skinras.h"
#include "hvdlib.h"

Data Structures

struct  shmfb_framebuffer_data
 Structure type for use as type for data pointer when using framebuffer support to manage shared memory rasters. More...
 

Macros

#define SHMFB_RASTER_NAME_MAX   1024
 

Typedefs

typedef struct HVD_shmfb_raster HVD_shmfb_raster
 
typedef struct shmfb_framebuffer_data shmfb_framebuffer_data
 Structure type for use as type for data pointer when using framebuffer support to manage shared memory rasters. More...
 

Functions

HVD_shmfb_rastershmfb_raster_create (const uint8 cache_id[256], const uint8 setup_id[256], const uint8 id[16], unsigned int index, RasterDescription *pRD, size_t rasterSize, size_t userSize, HqnResult *perr)
 Function to create raster handles for passing to HVD_monitor_add_raster() when using shared memory rasters. More...
 
uint8shmfb_raster_buffer (HVD_shmfb_raster *raster, size_t start, size_t length)
 Get the data address from a shared memory raster handle. More...
 
void * shmfb_raster_userdata (HVD_shmfb_raster *raster)
 Get the user data address from a shared memory raster handle. More...
 
void shmfb_raster_error (HVD_shmfb_raster **ppraster)
 The RIP failed to construct a raster. Mark it with error, and release the raster handle. More...
 
void shmfb_raster_release (HVD_element *pElement, void *hraster)
 Function to use as HVD_raster_release_fn callback when using shared memory elements. More...
 
HqBool shmfb_recovery_filter (HVD_element *pElement, HVD_recovery_reason_t reason)
 Function to use as HVD_recovery_filter_fn callback when using shared memory elements. More...
 
HVD_cache_fnsshmfb_HVD_cache_fns (void)
 
const RasterDescriptionshmfb_raster_description (void *elementRaster)
 Function to use as hvd_output_page_params::raster_description_fn when using shared memory elements. More...
 
void * shmfb_element_raster_open (void *elementRaster, struct RASTER_PLANE *plane, HqnResult *perr)
 Function to use as hvd_output_page_params::element_raster_open when using shared memory elements. More...
 
const uint8shmfb_element_raster_map (void *context, void *elementRaster, unsigned int *pstartline, unsigned int *pnlines, HqnResult *perr)
 
void shmfb_element_raster_close (void *context, void *elementRaster)
 
void * shmfb_acquire (size_t size, uint32 id, void *data, HqnResult *perr)
 Function to use as frame_acquire_fn when using framebuffer support to manage shared memory rasters. More...
 
void shmfb_release (void *handle, size_t size, void *data)
 Function to use as frame_release_fn when using framebuffer support to manage shared memory rasters. More...
 
uint8shmfb_raster (void *handle, size_t offset, size_t size)
 Function to use as frame_raster_fn when using framebuffer support to manage shared memory rasters. More...
 

Detailed Description

Support for shared memory framebuffers for eHVD elements. This allows a Scalable RIP to share eHVD elements across the entire RIP farm, without needing coordination from a raster manager or central controller.

This is the interface between the shared memory eHVD element framebuffers and raster backends.

The framebuffer must be configured to use one handle per sheet, rather than a handle per frame.

Macro Definition Documentation

◆ SHMFB_RASTER_NAME_MAX

#define SHMFB_RASTER_NAME_MAX   1024

Limit for length of storage for shared memory raster object names. This is RR_CACHE_ID_LENGTH + RR_SETUP_ID_LENGTH + RR_ELEMENT_ID_LENGTH plus some space for prefixes, separators, and a raster index component. However, different platforms have restrictions that will constrain the actual length of names created to less than this.

Typedef Documentation

◆ HVD_shmfb_raster

typedef struct HVD_shmfb_raster HVD_shmfb_raster

Shared memory HVD raster data.

Function Documentation

◆ shmfb_raster_buffer()

uint8* shmfb_raster_buffer ( HVD_shmfb_raster raster,
size_t  start,
size_t  length 
)

Get the data address from a shared memory raster handle.

Parameters
[in]rasterA raster handle previously created by shmfb_raster_create().
[in]startThe start offset of the portion of the data to return.
[in]lengthThe length of the portion of the data to return.
Returns
The address of a raster buffer holding portions of the raster starting at offset start and extending for length. This buffer cannot extend beyond the number of bytes passed in the rasterSize parameter to shmfb_raster_create().

Only one raster buffer can be active at a time; calling this function will invalidate the pointer returned by a previous call.

◆ shmfb_raster_create()

HVD_shmfb_raster* shmfb_raster_create ( const uint8  cache_id[256],
const uint8  setup_id[256],
const uint8  id[16],
unsigned int  index,
RasterDescription pRD,
size_t  rasterSize,
size_t  userSize,
HqnResult perr 
)

Function to create raster handles for passing to HVD_monitor_add_raster() when using shared memory rasters.

Parameters
[in]cache_idThe cache ID that the raster is being created for.
[in]setup_idThe setup ID that the raster is being created for.
[in]idThe element ID that the raster is attached to.
[in]indexThe index of the raster to create.
[in]pRDThe raster description the raster is being created for.
[in]rasterSizeThe size of the raster data to allocate for this separation. The address of the raster buffer can be recovered using shmfb_raster_buffer().
[in]userSizeThe size of the user data to allocate for this separation. The address of the user data can be recovered using shmfb_raster_userdata().
[out]perrA location in which an error code is stored, if the raster handle could not be acquired or created.
Returns
The shared memory raster handle, or NULL if a raster handle could not be acquired or created.

If the pointer returned is non-NULL, then *perr is not modified. If the pointer returned is NULL, then *perr is set to a code greater than MON_CLASS_ERROR indicating the error that occurred. The subclass, PS error type, and UID for the error can be deconstructed using the macros in monevent.h.

◆ shmfb_raster_error()

void shmfb_raster_error ( HVD_shmfb_raster **  ppraster)

The RIP failed to construct a raster. Mark it with error, and release the raster handle.

Parameters
[in]pprasterA location to find the raster previously created by shmfb_raster_create().

◆ shmfb_raster_userdata()

void* shmfb_raster_userdata ( HVD_shmfb_raster raster)

Get the user data address from a shared memory raster handle.

Parameters
[in]rasterA raster handle previously created by shmfb_raster_create().
Returns
The address of the user data. This buffer can store the number of bytes passed in the userSize parameter to shmfb_raster_create().