summaryrefslogtreecommitdiff
path: root/src/modules/ethumb
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-12 05:21:36 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-12 05:21:36 +0000
commita4e4c3041ee4eafee168f51348d2399cede29ff6 (patch)
treeca2f1ec94f9c4733b25250d0365c7cd7e620357c /src/modules/ethumb
parent8e9303e1a422bcf12eb8a406cd3f808b8a9695f0 (diff)
ethumb: improve plugin handling.
be more like emotion, delay plugin load and change the api to register/unregister, more future-proof. SVN revision: 82681
Diffstat (limited to 'src/modules/ethumb')
-rw-r--r--src/modules/ethumb/emotion/emotion.c76
1 files changed, 62 insertions, 14 deletions
diff --git a/src/modules/ethumb/emotion/emotion.c b/src/modules/ethumb/emotion/emotion.c
index 12750883d8..651dc15f85 100644
--- a/src/modules/ethumb/emotion/emotion.c
+++ b/src/modules/ethumb/emotion/emotion.c
@@ -407,20 +407,64 @@ _thumb_cancel(Ethumb *e EINA_UNUSED, void *data)
407 free(_plugin); 407 free(_plugin);
408} 408}
409 409
410EAPI Ethumb_Plugin * 410static const char *extensions[] = { /* based on emotion's list */
411ethumb_plugin_get(void) 411 "264",
412{ 412 "3g2",
413 static const char *extensions[] = { "avi", "mp4", "ogv", "mov", "mpg", "wmv", 413 "3gp",
414 NULL }; 414 "3gp2",
415 static Ethumb_Plugin plugin = 415 "3gpp",
416 { 416 "3gpp2",
417 extensions, 417 "3p2",
418 _thumb_generate, 418 "asf",
419 _thumb_cancel 419 "avi",
420 }; 420 "bdm",
421 421 "bdmv",
422 return &plugin; 422 "clpi",
423} 423 "clp",
424 "fla",
425 "flv",
426 "m1v",
427 "m2v",
428 "m2t",
429 "m4v",
430 "mkv",
431 "mov",
432 "mp2",
433 "mp2ts",
434 "mp4",
435 "mpe",
436 "mpeg",
437 "mpg",
438 "mpl",
439 "mpls",
440 "mts",
441 "mxf",
442 "nut",
443 "nuv",
444 "ogg",
445 "ogm",
446 "ogv",
447 "rm",
448 "rmj",
449 "rmm",
450 "rms",
451 "rmx",
452 "rmvb",
453 "swf",
454 "ts",
455 "weba",
456 "webm",
457 "wmv",
458 NULL
459};
460static const Ethumb_Plugin plugin =
461 {
462 ETHUMB_PLUGIN_API_VERSION,
463 "emotion",
464 extensions,
465 _thumb_generate,
466 _thumb_cancel
467};
424 468
425static Eina_Bool 469static Eina_Bool
426_module_init(void) 470_module_init(void)
@@ -450,6 +494,8 @@ _module_init(void)
450 494
451 emotion_init(); 495 emotion_init();
452 496
497 ethumb_plugin_register(&plugin);
498
453 _init_count = 1; 499 _init_count = 1;
454 return EINA_TRUE; 500 return EINA_TRUE;
455 501
@@ -472,6 +518,8 @@ _module_shutdown(void)
472 _init_count--; 518 _init_count--;
473 if (_init_count > 0) return; 519 if (_init_count > 0) return;
474 520
521 ethumb_plugin_unregister(&plugin);
522
475 emotion_shutdown(); 523 emotion_shutdown();
476 524
477 eina_prefix_free(_pfx); 525 eina_prefix_free(_pfx);