* Add a no-resize flag, which tells us to to advertise downscaled images. Useful for clients like Samsung TVs, which can use large images well, but will use downscaled small images when given a choice.
This commit is contained in:
parent
4073837a34
commit
c4170af521
@ -21,7 +21,7 @@
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#define MINIDLNA_VERSION "1.0.16"
|
||||
#define MINIDLNA_VERSION "1.0.16.1"
|
||||
|
||||
#define CLIENT_CACHE_SLOTS 20
|
||||
#define USE_FORK 1
|
||||
|
@ -251,6 +251,7 @@ intervening space) by either an integer or the keyword "infinite". */
|
||||
{
|
||||
h->req_client = ESamsungTV;
|
||||
h->reqflags |= FLAG_DLNA;
|
||||
h->reqflags |= FLAG_NO_RESIZE;
|
||||
//h->reqflags |= FLAG_MIME_AVI_DIVX;
|
||||
}
|
||||
else if(strstr(p, "bridgeCo-DMP/3"))
|
||||
@ -1492,7 +1493,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
|
||||
"Connection: close\r\n"
|
||||
"Date: %s\r\n"
|
||||
"EXT:\r\n"
|
||||
"contentFeatures.dlna.org: DLNA.ORG_PN=JPEG_%s\r\n"
|
||||
"contentFeatures.dlna.org: DLNA.ORG_PN=JPEG_%s;DLNA.ORG_CI=1\r\n"
|
||||
"Server: " MINIDLNA_SERVER_STRING "\r\n",
|
||||
size, date, dlna_pn);
|
||||
|
||||
|
@ -86,6 +86,7 @@ struct upnphttp {
|
||||
#define FLAG_MIME_AVI_DIVX 0x00200000
|
||||
#define FLAG_MIME_AVI_AVI 0x00400000
|
||||
#define FLAG_MIME_FLAC_FLAC 0x00800000
|
||||
#define FLAG_NO_RESIZE 0x01000000
|
||||
|
||||
/* New_upnphttp() */
|
||||
struct upnphttp *
|
||||
|
@ -493,6 +493,12 @@ static void add_resized_res(int srcw, int srch, int reqw, int reqh, char *dlna_p
|
||||
int dsth = reqh;
|
||||
char str_buf[256];
|
||||
|
||||
|
||||
if( passed_args->flags & FLAG_NO_RESIZE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ret = sprintf(str_buf, "<res ");
|
||||
memcpy(passed_args->resp+passed_args->size, &str_buf, ret+1);
|
||||
passed_args->size += ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user