Lines Matching refs:job_info
37 static void _get_pclm_media_size_name(pcl_job_info_t *job_info, media_size_t media_size, in _get_pclm_media_size_name() argument
53 _get_pclm_media_size_name(job_info, US_LETTER, media_name); in _get_pclm_media_size_name()
60 static void _get_pclm_media_size(pcl_job_info_t *job_info, media_size_t media_size, in _get_pclm_media_size() argument
86 _get_pclm_media_size(job_info, US_LETTER, myPageInfo); in _get_pclm_media_size()
90 static wJob_t _start_job(wJob_t job_handle, pcl_job_info_t *job_info, media_size_t media_size, in _start_job() argument
96 if (job_info == NULL) { in _start_job()
100 if (job_info->job_handle != _WJOBH_NONE) { in _start_job()
101 if (job_info->wprint_ifc != NULL) { in _start_job()
104 job_info->job_handle = _WJOBH_NONE; in _start_job()
107 if ((job_info->wprint_ifc == NULL) || (job_info->print_ifc == NULL)) { in _start_job()
116 job_info->job_handle = job_handle; in _start_job()
118 _START_JOB(job_info, "pdf"); in _start_job()
120 job_info->resolution = resolution; in _start_job()
121 job_info->media_size = media_size; in _start_job()
122 job_info->standard_scale = (float) resolution / (float) STANDARD_SCALE_FOR_PDF; in _start_job()
125 job_info->pclm_output_buffer = NULL; in _start_job()
126 job_info->seed_row = job_info->pcl_buff = NULL; // unused in _start_job()
127 job_info->pixel_width = job_info->pixel_height = job_info->page_number = job_info->num_rows = 0; in _start_job()
129 memset((void *) &job_info->pclm_page_info, 0x0, sizeof(PCLmPageSetup)); in _start_job()
130 _get_pclm_media_size_name(job_info, media_size, &job_info->pclm_page_info.mediaSizeName[0]); in _start_job()
133 job_info->pclm_page_info.mediaWidthOffset = 0.0f; in _start_job()
134 job_info->pclm_page_info.mediaHeightOffset = 0.0f; in _start_job()
136 job_info->pclm_page_info.mediaWidthOffset = (left_margin * (float) STANDARD_SCALE_FOR_PDF); in _start_job()
137 job_info->pclm_page_info.mediaHeightOffset = (top_margin * (float) STANDARD_SCALE_FOR_PDF); in _start_job()
140 LOGI("_start_job(), mediaHeightOffsets W %f H %f", job_info->pclm_page_info.mediaWidthOffset, in _start_job()
141 job_info->pclm_page_info.mediaHeightOffset); in _start_job()
143 job_info->pclm_page_info.pageOrigin = top_left; // REVISIT in _start_job()
145 job_info->monochrome = (color_space == COLOR_SPACE_MONO); in _start_job()
146 job_info->pclm_page_info.dstColorSpaceSpefication = deviceRGB; in _start_job()
148 job_info->pclm_page_info.dstColorSpaceSpefication = grayScale; in _start_job()
150 job_info->pclm_page_info.dstColorSpaceSpefication = deviceRGB; in _start_job()
152 job_info->pclm_page_info.dstColorSpaceSpefication = adobeRGB; in _start_job()
155 job_info->pclm_page_info.stripHeight = job_info->strip_height; in _start_job()
156 job_info->pclm_page_info.destinationResolution = res600; in _start_job()
158 job_info->pclm_page_info.destinationResolution = res300; in _start_job()
160 job_info->pclm_page_info.destinationResolution = res600; in _start_job()
162 job_info->pclm_page_info.destinationResolution = res1200; in _start_job()
166 job_info->pclm_page_info.duplexDisposition = duplex_longEdge; in _start_job()
168 job_info->pclm_page_info.duplexDisposition = duplex_shortEdge; in _start_job()
170 job_info->pclm_page_info.duplexDisposition = simplex; in _start_job()
173 job_info->pclm_page_info.mirrorBackside = false; in _start_job()
174 job_info->pclmgen_obj = CreatePCLmGen(); in _start_job()
175 PCLmStartJob(job_info->pclmgen_obj, (void **) &job_info->pclm_output_buffer, &outBuffSize); in _start_job()
176 _WRITE(job_info, (const char *) job_info->pclm_output_buffer, outBuffSize); in _start_job()
177 return job_info->job_handle; in _start_job()
180 static int _start_page(pcl_job_info_t *job_info, int pixel_width, int pixel_height) { in _start_page() argument
181 PCLmPageSetup *page_info = &job_info->pclm_page_info; in _start_page()
182 ubyte *pclm_output_buff = job_info->pclm_output_buffer; in _start_page()
185 _START_PAGE(job_info, pixel_width, pixel_height); in _start_page()
186 job_info->pixel_width = pixel_width; in _start_page()
188 page_info->sourceHeight = (float) pixel_height / job_info->standard_scale; in _start_page()
189 page_info->sourceWidth = (float) pixel_width / job_info->standard_scale; in _start_page()
194 if (job_info->num_components == 3) { in _start_page()
207 job_info->scan_line_width = pixel_width * job_info->num_components; in _start_page()
208 int res1 = PCLmGetMediaDimensions(job_info->pclmgen_obj, page_info->mediaSizeName, page_info); in _start_page()
209 page_info->SourceWidthPixels = MIN(pixel_width, job_info->pclm_page_info.mediaWidthInPixels); in _start_page()
211 job_info->pclm_scan_line_width = in _start_page()
212 job_info->pclm_page_info.mediaWidthInPixels * job_info->num_components; in _start_page()
215 "widthPixels=%d, heightPixels=%d", res1, job_info->pclm_page_info.mediaSizeName, in _start_page()
216 job_info->pclm_page_info.mediaWidth, job_info->pclm_page_info.mediaHeight, in _start_page()
217 job_info->pclm_page_info.mediaWidthInPixels, in _start_page()
218 job_info->pclm_page_info.mediaHeightInPixels); in _start_page()
220 PCLmStartPage(job_info->pclmgen_obj, page_info, (void **) &pclm_output_buff, &outBuffSize); in _start_page()
221 _WRITE(job_info, (const char *) pclm_output_buff, outBuffSize); in _start_page()
223 job_info->page_number++; in _start_page()
224 return job_info->page_number; in _start_page()
227 static int _print_swath(pcl_job_info_t *job_info, char *rgb_pixels, int start_row, int num_rows, in _print_swath() argument
230 _PAGE_DATA(job_info, (const unsigned char *) rgb_pixels, (num_rows * bytes_per_row)); in _print_swath()
232 if (job_info->monochrome) { in _print_swath()
246 job_info->page_number, job_info->strip_height * job_info->scan_line_width, start_row, in _print_swath()
249 if (job_info->scan_line_width > job_info->pclm_scan_line_width) { in _print_swath()
251 char *src_pixels = rgb_pixels + job_info->scan_line_width; in _print_swath()
252 char *dest_pixels = rgb_pixels + job_info->pclm_scan_line_width; in _print_swath()
253 for (i = 1; i < num_rows; i++, src_pixels += job_info->scan_line_width, in _print_swath()
254 dest_pixels += job_info->pclm_scan_line_width) { in _print_swath()
255 memmove(dest_pixels, src_pixels, job_info->pclm_scan_line_width); in _print_swath()
263 PCLmEncapsulate(job_info->pclmgen_obj, rgb_pixels, in _print_swath()
264 job_info->strip_height * MIN(job_info->scan_line_width, job_info->pclm_scan_line_width), in _print_swath()
265 num_rows, (void **) &job_info->pclm_output_buffer, &outBuffSize); in _print_swath()
266 _WRITE(job_info, (const char *) job_info->pclm_output_buffer, outBuffSize); in _print_swath()
271 static int _end_page(pcl_job_info_t *job_info, int page_number) { in _end_page() argument
276 _start_page(job_info, job_info->pixel_width, job_info->strip_height); in _end_page()
277 size_t blank_data_size = (size_t) job_info->strip_height * job_info->pixel_width * in _end_page()
278 job_info->num_components; in _end_page()
281 PCLmEncapsulate(job_info->pclmgen_obj, blank_data, blank_data_size, job_info->strip_height, in _end_page()
282 (void **) &job_info->pclm_output_buffer, &outBuffSize); in _end_page()
284 _WRITE(job_info, (const char *) job_info->pclm_output_buffer, outBuffSize); in _end_page()
287 PCLmEndPage(job_info->pclmgen_obj, (void **) &job_info->pclm_output_buffer, &outBuffSize); in _end_page()
288 _WRITE(job_info, (const char *) job_info->pclm_output_buffer, outBuffSize); in _end_page()
289 _END_PAGE(job_info); in _end_page()
294 static int _end_job(pcl_job_info_t *job_info) { in _end_job() argument
298 PCLmEndJob(job_info->pclmgen_obj, (void **) &job_info->pclm_output_buffer, &outBuffSize); in _end_job()
299 _WRITE(job_info, (const char *) job_info->pclm_output_buffer, outBuffSize); in _end_job()
300 PCLmFreeBuffer(job_info->pclmgen_obj, job_info->pclm_output_buffer); in _end_job()
301 DestroyPCLmGen(job_info->pclmgen_obj); in _end_job()
302 _END_JOB(job_info); in _end_job()