Implementation of a framebuffer output 'device'. More...
#include "hhrsdk.h"
#include "skintest.h"
#include "hvdreport.h"
#include "libtiffrast.h"
#include "frametiffrast.h"
Data Structures | |
struct | FRAME_TIFF_RASTER_handle |
All output backends based on the rasthand.h prototypes must define a handle structure, which allows state information to persist across raster callback sequences. This example only needs a record of the underlying TIFF raster handle. More... | |
Macros | |
#define | FRAME_TIFF_FILEFORMAT "%f-%p%?-N%?-S%?-T.framebuffer.tif" |
The default file name format for files produced by the TIFF framebuffer raster output back end. More... | |
#define | FRAME_TIFF_ELEMENT_FILEFORMAT "%i%?-N%?-S%?-03r.framebuffer.tif" |
The file name format for all eHVD element output files produced by the TIFF framebuffer raster output back end. More... | |
Typedefs | |
typedef struct FRAME_TIFF_RASTER_handle | FRAME_TIFF_RASTER_handle |
All output backends based on the rasthand.h prototypes must define a handle structure, which allows state information to persist across raster callback sequences. This example only needs a record of the underlying TIFF raster handle. | |
Functions | |
static FRAME_TIFF_RASTER_handle * | FRAME_TIFF_RASTER_new_handle (uint8 *ps_filename) |
Allocate memory for the raster handle structure. More... | |
static RASTER_result | FRAME_TIFF_RASTER_start (void *pJobContext, RasterDescription *pRD, RASTER_handle *pHandle) |
This function is called once at the start of each sheet in each job. More... | |
static RASTER_result | FRAME_TIFF_RASTER_write_data (void *pJobContext, RASTER_handle rh, RasterDescription *pRD, void *data, int32 topline, int32 lines, int32 bytesperline, int32 channel) |
For each page, multiple calls are made to this function, each delivering raster data for the page. More... | |
static RASTER_result | FRAME_TIFF_RASTER_finish (void *pJobContext, RASTER_handle *pHandle, RasterDescription *pRD, RASTER_result result) |
This function is called once at the end of each sheet in each job. More... | |
static RASTER_result | FRAME_TIFF_RASTER_job_end (void *pJobContext, RASTER_handle *pHandle) |
This function is called after the last sheet has been closed. More... | |
static RASTER_result | FRAME_TIFF_RasterBandSize (void *pJobContext, RASTER_BANDSIZE *bandsize) |
This function allows the raster backend to increase the raster stride (byte offset between the start address of successive raster lines). More... | |
static RASTER_result | FRAME_TIFF_RasterRequirements (void *pJobContext, RASTER_REQUIREMENTS *pRasterRequirements, RasterDescription *pRD) |
This function gives the raster backend the details of the raster it's about to be handed. More... | |
static RASTER_result | FRAME_TIFF_RasterDestination (void *pJobContext, RASTER_DESTINATION *pRasterDestination, int32 sheetIndex) |
This function allows the raster backend to provide a memory address range into which to render. More... | |
static HVD_result | frame_tiff_mem_output_page (HVD_page_output *page) |
Callback function for libHVD to output an HVD page. More... | |
static HVD_result | frame_tiff_shm_output_page (HVD_page_output *page) |
Callback function for libHVD to output an HVD page. More... | |
Implementation of a framebuffer output 'device'.
The main purpose of this example is to illustrate use of a handler-allocated framebuffer to receive the raster data from the RIP. It shows support for three different interleaving styles:
A real implementation would probably pick the most appropriate of these and the RIP would always be configured to use the corresponding interleaving style, rather than support multiple interleaving styles.
The RIP could instead be configured to produce band-interleaved raster data, and a framebuffer implementation can be written to handle that if it is the most convenient format. This example does not support band-interleaved raster data.
This example also shows:
The raster handling functions piggyback on the LIBTIFF
backend so that output can be easily viewed. A real implementation would probably pass the data to some other process for post-RIP manipulation.
The FRAMETIFF writer supports the same parameters for configuration as the standard TIFF writer, see libtiffrast_raster_params. When doing this the key used inside RasterParams
must be /FRAMETIFF
rather than /LIBTIFF
.
#define FRAME_TIFF_ELEMENT_FILEFORMAT "%i%?-N%?-S%?-03r.framebuffer.tif" |
The file name format for all eHVD element output files produced by the TIFF framebuffer raster output back end.
The additional .framebuffer
tag is used to distinguish between the output of this back end and the output of the other TIFF back ends.
This file name format cannot be overridden from the command line.
#define FRAME_TIFF_FILEFORMAT "%f-%p%?-N%?-S%?-T.framebuffer.tif" |
The default file name format for files produced by the TIFF framebuffer raster output back end.
The additional .framebuffer
tag is used to distinguish between the output of this back end and the output of the other TIFF back ends.
|
static |
Callback function for libHVD to output an HVD page.
[in] | page | The output page description from libHVD. |
HVD_SUCCESS | The page was output successfully |
|
static |
This function is called once at the end of each sheet in each job.
See RASTER_FINISH_EX in rasthand.h
|
static |
This function is called after the last sheet has been closed.
See RASTER_JOB_END_EX in rasthand.h
|
static |
Allocate memory for the raster handle structure.
|
static |
This function is called once at the start of each sheet in each job.
See RASTER_START_EX in rasthand.h
|
static |
For each page, multiple calls are made to this function, each delivering raster data for the page.
See RASTER_WRITE_DATA_EX in rasthand.h
|
static |
This function allows the raster backend to increase the raster stride (byte offset between the start address of successive raster lines).
For illustrative purposes this example forces the stride to be a multiple of 32 bytes.
A real implementation may not need to implement this function, in which case the API pointer should be set to NULL.
|
static |
This function allows the raster backend to provide a memory address range into which to render.
See SwLeRASTERDESTINATION in skinkit.h
|
static |
This function gives the raster backend the details of the raster it's about to be handed.
The framebuffer memory is allocated here once the page dimensions are known.
See SwLeRASTERREQUIREMENTS in skinkit.h
|
static |
Callback function for libHVD to output an HVD page.
[in] | page | The output page description from libHVD. |
HVD_SUCCESS | The page was output successfully |