Add support for JPEG as a valid artwork output format

Reduce CPU usage by avoiding unneeded JPEG -> PNG conversions; it appears
all the clients we care about support JPEG as well as PNG.
This commit is contained in:
Julien BLACHE
2011-03-30 18:27:23 +02:00
parent 5cf5cac9c2
commit c7209ab699
4 changed files with 119 additions and 51 deletions

View File

@@ -2,10 +2,17 @@
#ifndef __ARTWORK_H__
#define __ARTWORK_H__
int
artwork_get_item(int id, int max_w, int max_h, struct evbuffer *evbuf);
#define ART_CAN_PNG (1 << 0)
#define ART_CAN_JPEG (1 << 1)
#define ART_FMT_PNG 1
#define ART_FMT_JPEG 2
int
artwork_get_group(int id, int max_w, int max_h, struct evbuffer *evbuf);
artwork_get_item(int id, int max_w, int max_h, int format, struct evbuffer *evbuf);
int
artwork_get_group(int id, int max_w, int max_h, int format, struct evbuffer *evbuf);
#endif /* !__ARTWORK_H__ */