141 |
status = encore(enchandle, ENC_OPT_INIT, &enc_param, NULL); |
status = encore(enchandle, ENC_OPT_INIT, &enc_param, NULL); |
142 |
enchandle = enc_param.handle; |
enchandle = enc_param.handle; |
143 |
|
|
144 |
/* if (status) */ |
// if (status) |
145 |
printf("Encore INIT return %d, handle=%lx\n", status, enchandle); |
printf("Encore INIT return %d, handle=%lx\n", status, enchandle); |
146 |
|
|
147 |
return status; |
return status; |
151 |
{ int status; |
{ int status; |
152 |
|
|
153 |
status = encore(enchandle, ENC_OPT_RELEASE, NULL, NULL); |
status = encore(enchandle, ENC_OPT_RELEASE, NULL, NULL); |
154 |
/* if (status) */ |
// if (status) |
155 |
printf("Encore RELEASE return %d\n", status); |
printf("Encore RELEASE return %d\n", status); |
156 |
|
|
157 |
return status; |
return status; |
198 |
int status; |
int status; |
199 |
|
|
200 |
DEC_PARAM dec_param; |
DEC_PARAM dec_param; |
201 |
|
DEC_SET dec_set; |
202 |
|
|
203 |
dec_param.x_dim = XDIM; |
dec_param.x_dim = XDIM; |
204 |
dec_param.y_dim = YDIM; |
dec_param.y_dim = YDIM; |
207 |
dec_param.time_incr = 20; |
dec_param.time_incr = 20; |
208 |
|
|
209 |
status = decore(dechandle, DEC_OPT_INIT, &dec_param, NULL); |
status = decore(dechandle, DEC_OPT_INIT, &dec_param, NULL); |
210 |
/* if (status) */ |
// if (status) |
211 |
printf("Decore INIT return %d\n", status); |
printf("Decore INIT return %d\n", status); |
212 |
|
|
213 |
/* We don't do any postprocessing here... */ |
// We don't do any postprocessing here... |
214 |
|
|
215 |
/* dec_set.postproc_level = 0; |
/* dec_set.postproc_level = 0; |
216 |
status = decore(dechandle, DEC_OPT_SETPP, &dec_set, NULL); |
status = decore(dechandle, DEC_OPT_SETPP, &dec_set, NULL); |
245 |
{ |
{ |
246 |
int status; |
int status; |
247 |
status = decore(dechandle, DEC_OPT_RELEASE, NULL, NULL); |
status = decore(dechandle, DEC_OPT_RELEASE, NULL, NULL); |
248 |
/* if (status) */ |
// if (status) |
249 |
printf("Decore RELEASE return %d\n", status); |
printf("Decore RELEASE return %d\n", status); |
250 |
return status; |
return status; |
251 |
} |
} |
262 |
unsigned char *rgb_buffer = NULL; |
unsigned char *rgb_buffer = NULL; |
263 |
|
|
264 |
int status; |
int status; |
265 |
|
int frame_size; |
266 |
int m4v_size; |
int m4v_size; |
267 |
|
|
268 |
char filename[256]; |
char filename[256]; |
295 |
/*********************************************************************/ |
/*********************************************************************/ |
296 |
|
|
297 |
status = enc_init(); |
status = enc_init(); |
298 |
/* if (status) */ |
// if (status) |
299 |
printf("Encore INIT return %d, handle=%lx\n", status, enchandle); |
printf("Encore INIT return %d, handle=%lx\n", status, enchandle); |
300 |
|
|
301 |
status = dec_init(); |
status = dec_init(); |
302 |
/* if (status) */ |
// if (status) |
303 |
printf("Decore INIT return %d\n", status); |
printf("Decore INIT return %d\n", status); |
304 |
|
|
305 |
|
|
368 |
/* Stop XviD */ |
/* Stop XviD */ |
369 |
|
|
370 |
dec_stop(); |
dec_stop(); |
371 |
/* if (status) */ |
// if (status) |
372 |
printf("Encore RELEASE return %d\n", status); |
printf("Encore RELEASE return %d\n", status); |
373 |
|
|
374 |
enc_stop(); |
enc_stop(); |
375 |
/* if (status) */ |
// if (status) |
376 |
printf("Decore RELEASE return %d\n", status); |
printf("Decore RELEASE return %d\n", status); |
377 |
|
|
378 |
free_all_memory: |
free_all_memory: |