diff options
author | Leandro Dorileo <leandro.maciel.dorileo@intel.com> | 2014-01-17 10:41:41 -0200 |
---|---|---|
committer | Leandro Dorileo <leandro.maciel.dorileo@intel.com> | 2014-01-29 10:15:44 -0200 |
commit | 517acaa121ac187e40edfe700d21b8a3a25fa8d4 (patch) | |
tree | 60d99ba0d1e620313cc830215d2c0e562d2f6e4e | |
parent | 395dc50400e37948cc891c3b77e8b5b988b0db12 (diff) | |
download | lightmediascanner-517acaa121ac187e40edfe700d21b8a3a25fa8d4.tar.gz lightmediascanner-517acaa121ac187e40edfe700d21b8a3a25fa8d4.tar.bz2 lightmediascanner-517acaa121ac187e40edfe700d21b8a3a25fa8d4.zip |
png: remove all the dlna stuff
Remove all the dlna sutff and likewise the jpeg plugin we set the
container field so we can know - in the dlna layer - the rules to
apply.
-rw-r--r-- | src/plugins/png/png.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/src/plugins/png/png.c b/src/plugins/png/png.c index d02d55e..fdcd11a 100644 --- a/src/plugins/png/png.c +++ b/src/plugins/png/png.c @@ -41,37 +41,10 @@ #include <string.h> #include <strings.h> -static const struct lms_string_size dlna_mime = - LMS_STATIC_STRING_SIZE("image/png"); -static const struct lms_string_size dlna_sm_ico = - LMS_STATIC_STRING_SIZE("PNG_SM_ICO"); -static const struct lms_string_size dlna_lrg_ico = - LMS_STATIC_STRING_SIZE("PNG_LRG_ICO"); -static const struct lms_string_size dlna_tn = - LMS_STATIC_STRING_SIZE("PNG_TN"); -static const struct lms_string_size dlna_lrg = - LMS_STATIC_STRING_SIZE("PNG_LRG"); - -static void -_fill_dlna_profile(struct lms_image_info *info) -{ - const unsigned short w = info->width; - const unsigned short h = info->height; - - info->dlna_mime = dlna_mime; - - if (w == 0 || h == 0) - return; - - if (w == 48 && h == 48) - info->dlna_profile = dlna_sm_ico; - else if (w == 120 && h == 120) - info->dlna_profile = dlna_lrg_ico; - else if (w <= 160 && h <= 160) - info->dlna_profile = dlna_tn; - else if (w <= 4096 && h <= 4096) - info->dlna_profile = dlna_lrg; -} +#define DECL_STR(cname, str) \ + static const struct lms_string_size cname = LMS_STATIC_STRING_SIZE(str) + +DECL_STR(_container_png, "png"); static inline unsigned int _chunk_to_uint(unsigned char *buf) @@ -180,9 +153,8 @@ _parse(struct plugin *plugin, struct lms_context *ctxt, const struct lms_file_in if (info.artist.str) lms_charset_conv(ctxt->cs_conv, &info.artist.str, &info.artist.len); - _fill_dlna_profile(&info); - info.id = finfo->id; + info.container = _container_png; r = lms_db_image_add(plugin->img_db, &info); done: |