• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/minidlna/ffmpeg-0.5.1/vhook/

Lines Matching refs:ci

112     ContextInfo *ci;
113 ci = (ContextInfo *) ctx;
115 if (ci->cache) {
116 imlib_context_set_image(ci->cache->image);
118 av_free(ci->cache);
121 if (ci->imageOverlaid) {
122 imlib_context_set_image(ci->imageOverlaid);
125 ff_eval_free(ci->eval_x);
126 ff_eval_free(ci->eval_y);
127 ff_eval_free(ci->eval_r);
128 ff_eval_free(ci->eval_g);
129 ff_eval_free(ci->eval_b);
130 ff_eval_free(ci->eval_a);
132 av_free(ci->expr_x);
133 av_free(ci->expr_y);
134 av_free(ci->expr_R);
135 av_free(ci->expr_G);
136 av_free(ci->expr_B);
137 av_free(ci->expr_A);
138 sws_freeContext(ci->toRGB_convert_ctx);
139 sws_freeContext(ci->fromRGB_convert_ctx);
147 ContextInfo *ci;
157 ci = (ContextInfo *) *ctxp;
159 ci->x = 0.0;
160 ci->y = 0.0;
161 ci->expr_x = "0.0";
162 ci->expr_y = "0.0";
180 ci->expr_R = av_strdup(optarg);
181 ci->eval_colors = 1;
184 ci->expr_G = av_strdup(optarg);
185 ci->eval_colors = 1;
188 ci->expr_B = av_strdup(optarg);
189 ci->eval_colors = 1;
192 ci->expr_A = av_strdup(optarg);
204 ci->text = av_strdup(optarg);
207 ci->file = av_strdup(optarg);
210 ci->expr_x = av_strdup(optarg);
213 ci->expr_y = av_strdup(optarg);
216 ci->fileImage = av_strdup(optarg);
224 if (ci->eval_colors && !(ci->expr_R && ci->expr_G && ci->expr_B))
230 if (ci->text || ci->file) {
231 ci->fn = imlib_load_font(font);
232 if (!ci->fn) {
236 imlib_context_set_font(ci->fn);
244 if (ci->eval_colors)
268 ci->r = r;
269 ci->g = g;
270 ci->b = b;
281 } else if (ci->eval_colors) {
282 if (!(ci->eval_r = ff_parse(ci->expr_R, const_names, NULL, NULL, NULL, NULL, &error))){
283 av_log(NULL, AV_LOG_ERROR, "Couldn't parse R expression '%s': %s\n", ci->expr_R, error);
286 if (!(ci->eval_g = ff_parse(ci->expr_G, const_names, NULL, NULL, NULL, NULL, &error))){
287 av_log(NULL, AV_LOG_ERROR, "Couldn't parse G expression '%s': %s\n", ci->expr_G, error);
290 if (!(ci->eval_b = ff_parse(ci->expr_B, const_names, NULL, NULL, NULL, NULL, &error))){
291 av_log(NULL, AV_LOG_ERROR, "Couldn't parse B expression '%s': %s\n", ci->expr_B, error);
296 if (ci->expr_A) {
297 if (!(ci->eval_a = ff_parse(ci->expr_A, const_names, NULL, NULL, NULL, NULL, &error))){
298 av_log(NULL, AV_LOG_ERROR, "Couldn't parse A expression '%s': %s\n", ci->expr_A, error);
302 ci->a = 255;
305 if (!(ci->eval_colors || ci->eval_a))
306 imlib_context_set_color(ci->r, ci->g, ci->b, ci->a);
309 if (ci->fileImage) {
310 ci->imageOverlaid = imlib_load_image_immediately(ci->fileImage);
311 if (!(ci->imageOverlaid)){
312 av_log(NULL, AV_LOG_ERROR, "Couldn't load image '%s'\n", ci->fileImage);
315 imlib_context_set_image(ci->imageOverlaid);
316 ci->imageOverlaid_width = imlib_image_get_width();
317 ci->imageOverlaid_height = imlib_image_get_height();
320 if (!(ci->eval_x = ff_parse(ci->expr_x, const_names, NULL, NULL, NULL, NULL, &error))){
321 av_log(NULL, AV_LOG_ERROR, "Couldn't parse x expression '%s': %s\n", ci->expr_x, error);
325 if (!(ci->eval_y = ff_parse(ci->expr_y, const_names, NULL, NULL, NULL, NULL, &error))){
326 av_log(NULL, AV_LOG_ERROR, "Couldn't parse y expression '%s': %s\n", ci->expr_y, error);
333 static Imlib_Image get_cached_image(ContextInfo *ci, int width, int height)
337 for (cache = ci->cache; cache; cache = cache->next) {
345 static void put_cached_image(ContextInfo *ci, Imlib_Image image, int width, int height)
352 cache->next = ci->cache;
353 ci->cache = cache;
358 ContextInfo *ci = (ContextInfo *) ctx;
363 image = get_cached_image(ci, width, height);
367 put_cached_image(ci, image, width, height);
376 ci->toRGB_convert_ctx = sws_getCachedContext(ci->toRGB_convert_ctx,
380 if (ci->toRGB_convert_ctx == NULL) {
388 sws_scale(ci->toRGB_convert_ctx,
398 const char *tbp = ci->text;
406 ci->frame_number, // frame number (starting at zero)
409 ci->imageOverlaid_height, // image height
410 ci->imageOverlaid_width, // image width
411 ci->x, // previous x
412 ci->y, // previous y
416 if (ci->file) {
417 int fd = open(ci->file, O_RDONLY);
436 else if (!(ci->imageOverlaid))
439 ci->x = ff_parse_eval(ci->eval_x, const_values, ci);
440 ci->y = ff_parse_eval(ci->eval_y, const_values, ci);
441 y = ci->y;
443 if (ci->eval_a) {
444 ci->a = ff_parse_eval(ci->eval_a, const_values, ci);
447 if (ci->eval_colors) {
448 ci->r = ff_parse_eval(ci->eval_r, const_values, ci);
449 ci->g = ff_parse_eval(ci->eval_g, const_values, ci);
450 ci->b = ff_parse_eval(ci->eval_b, const_values, ci);
453 if (ci->eval_colors || ci->eval_a) {
454 imlib_context_set_color(ci->r, ci->g, ci->b, ci->a);
457 if (!(ci->imageOverlaid))
463 imlib_text_draw_with_return_metrics(ci->x, y, p, &wid, &hig, &h_a, &v_a);
467 if (ci->imageOverlaid) {
469 imlib_blend_image_onto_image(ci->imageOverlaid, 0,
470 0, 0, ci->imageOverlaid_width, ci->imageOverlaid_height,
471 ci->x, ci->y, ci->imageOverlaid_width, ci->imageOverlaid_height);
476 ci->fromRGB_convert_ctx = sws_getCachedContext(ci->fromRGB_convert_ctx,
480 if (ci->fromRGB_convert_ctx == NULL) {
487 sws_scale(ci->fromRGB_convert_ctx,
491 ci->frame_number++;