Re: [PATCH] upnp: add support for thumbnails



On 21/01/2011 08:53, Iago Toral wrote:
>
> On Thu, 20 Jan 2011 17:26:54 +0100, Guillaume Emont
> <gemont igalia com> wrote:
> (...)
>> +static gboolean
>> +has_thumbnail_marker (xmlNode *node)
>> +{
>> +  gchar *dlna_stuff;
>> +  gboolean ret;
>> +
>> +  dlna_stuff = didl_res_get_protocol_info (node, 3);
>> +  ret = strstr("JPEG_TN", dlna_stuff) != NULL;
>> +
>> +  g_free (dlna_stuff);
>> +  return ret;
>> +}
>> +
> (...)
>
> if this is the only code required to support other image formats, then
> I see no reason to ignore PNG_* or JPEG_SM, even if they are not that
> common, or am I missing something?
In get_thumbnail(), this function is only used to give priority to a
JPEG_TN over other <res> that don't provide such a marker, to get out of
the loop earlier. Right now, PNG_* and JPEG_SM are supported by the
"last <res/> with an image/* mimetype" rule, only, in case a JPEG_TN is
there, it is given priority (or maybe we could remove that altogether,
and only apply the last <res/> rule, which would make the code simpler).
>
> Iago
> _______________________________________________
> grilo-list mailing list
> grilo-list gnome org
> http://mail.gnome.org/mailman/listinfo/grilo-list
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]