* Fix FF/REW of AVI files on Samsung Series B TV's.
This commit is contained in:
parent
e7438c1e77
commit
eff8bf22db
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
||||
1.0.21 - Released 00-MONTH-2011
|
||||
--------------------------------
|
||||
- Fix FF/REW of AVI files on Samsung Series B TV's.
|
||||
- Fix a crash bug when playing music on TiVo.
|
||||
- Add the ability to change the root media container.
|
||||
- Add WAV/RIFF INFO tag parsing support for the most common tags.
|
||||
|
@ -80,6 +80,7 @@ enum client_types {
|
||||
ELGDevice,
|
||||
ENetgearEVA2000,
|
||||
ESamsungSeriesA,
|
||||
ESamsungSeriesB,
|
||||
EStandardDLNA150 = 100
|
||||
};
|
||||
|
||||
|
40
minissdp.c
40
minissdp.c
@ -44,6 +44,7 @@
|
||||
#include "upnpreplyparse.h"
|
||||
#include "getifaddr.h"
|
||||
#include "minissdp.h"
|
||||
#include "utils.h"
|
||||
#include "log.h"
|
||||
|
||||
/* SSDP ip/port */
|
||||
@ -357,9 +358,9 @@ ParseUPnPClient(char *location)
|
||||
int content_len = sizeof(buf);
|
||||
struct NameValueParserData xml;
|
||||
int client;
|
||||
enum client_types type = -1;
|
||||
enum client_types type = 0;
|
||||
uint32_t flags = 0;
|
||||
char *model;
|
||||
char *model, *serial;
|
||||
|
||||
if (strncmp(location, "http://", 7) != 0)
|
||||
return;
|
||||
@ -442,17 +443,29 @@ close:
|
||||
nread -= off - buf;
|
||||
ParseNameValue(off, nread, &xml);
|
||||
model = GetValueFromNameValueList(&xml, "modelName");
|
||||
serial = GetValueFromNameValueList(&xml, "serialNumber");
|
||||
if( model )
|
||||
{
|
||||
DPRINTF(E_DEBUG, L_SSDP, "Model: %s\n", model);
|
||||
if (strstr(model, "Roku SoundBridge"))
|
||||
if( strstr(model, "Roku SoundBridge") )
|
||||
{
|
||||
type = ERokuSoundBridge;
|
||||
flags |= FLAG_AUDIO_ONLY;
|
||||
}
|
||||
else if( strcmp(model, "Samsung DTV DMR") == 0 && serial )
|
||||
{
|
||||
DPRINTF(E_DEBUG, L_SSDP, "Serial: %s\n", serial);
|
||||
/* The Series B I saw was 20081224DMR. Series A should be older than that. */
|
||||
if( atoi(serial) > 20081200 )
|
||||
{
|
||||
type = ESamsungSeriesB;
|
||||
flags |= FLAG_SAMSUNG;
|
||||
flags |= FLAG_DLNA;
|
||||
flags |= FLAG_NO_RESIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( type < 0 )
|
||||
if( !type )
|
||||
return;
|
||||
client = SearchClientCache(dest.sin_addr, 1);
|
||||
/* Add this client to the cache if it's not there already. */
|
||||
@ -542,18 +555,23 @@ ProcessSSDPRequest(int s, unsigned short port)
|
||||
while(man[man_len]!='\r' && man[man_len]!='\n') man_len++;
|
||||
}
|
||||
}
|
||||
if (!loc || !srv || !man || (strncmp(man, "ssdp:alive", man_len) != 0))
|
||||
if( !loc || !srv || !man || (strncmp(man, "ssdp:alive", man_len) != 0) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (strncmp(srv, "Allegro-Software-RomPlug", 24) == 0)
|
||||
if( strncmp(srv, "Allegro-Software-RomPlug", 24) == 0 ||
|
||||
strstr(loc, "SamsungMRDesc.xml") )
|
||||
{
|
||||
/* Check if the client is already in cache */
|
||||
i = SearchClientCache(sendername.sin_addr, 1);
|
||||
if( i >= 0 && clients[i].type < EStandardDLNA150 )
|
||||
if( i >= 0 )
|
||||
{
|
||||
clients[i].age = time(NULL);
|
||||
return;
|
||||
if( clients[i].type < EStandardDLNA150 &&
|
||||
clients[i].type != ESamsungSeriesA )
|
||||
{
|
||||
clients[i].age = time(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ParseUPnPClient(loc);
|
||||
}
|
||||
@ -562,7 +580,7 @@ ProcessSSDPRequest(int s, unsigned short port)
|
||||
else if(memcmp(bufr, "M-SEARCH", 8) == 0)
|
||||
{
|
||||
int st_len = 0, mx_len = 0, mx_val = 0;
|
||||
//DPRINTF(E_DEBUG, L_SSDP, "Received SSDP request:\n%.*s", n, bufr);
|
||||
//DPRINTF(E_DEBUG, L_SSDP, "Received SSDP request:\n%.*s\n", n, bufr);
|
||||
for(i=0; i < n; i++)
|
||||
{
|
||||
if( bufr[i] == '*' )
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#define MINIDLNA_VERSION "1.0.20.2"
|
||||
#define MINIDLNA_VERSION "1.0.20.3"
|
||||
|
||||
#ifdef NETGEAR
|
||||
# define SERVER_NAME "ReadyDLNA"
|
||||
|
15
upnphttp.c
15
upnphttp.c
@ -494,9 +494,11 @@ next_header:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( (clients[n].type < EStandardDLNA150) && (h->req_client == EStandardDLNA150) )
|
||||
else if( (clients[n].type < EStandardDLNA150 && h->req_client == EStandardDLNA150) ||
|
||||
(clients[n].type == ESamsungSeriesB && h->req_client == ESamsungSeriesA) )
|
||||
{
|
||||
/* If we know the client and our new detection is generic, use our cached info */
|
||||
/* If we detected a Samsung Series B earlier, don't overwrite it with Series A info */
|
||||
h->reqflags |= clients[n].flags;
|
||||
h->req_client = clients[n].type;
|
||||
return;
|
||||
@ -1702,13 +1704,18 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
||||
off_t total, offset, size;
|
||||
sqlite_int64 id;
|
||||
int sendfh;
|
||||
static struct { sqlite_int64 id; char path[PATH_MAX]; char mime[32]; char dlna[96]; } last_file = { 0 };
|
||||
static struct { sqlite_int64 id;
|
||||
enum client_types client;
|
||||
char path[PATH_MAX];
|
||||
char mime[32];
|
||||
char dlna[96];
|
||||
} last_file = { 0, 0 };
|
||||
#if USE_FORK
|
||||
pid_t newpid = 0;
|
||||
#endif
|
||||
|
||||
id = strtoll(object, NULL, 10);
|
||||
if( id != last_file.id )
|
||||
if( id != last_file.id || h->req_client != last_file.client )
|
||||
{
|
||||
sprintf(sql_buf, "SELECT PATH, MIME, DLNA_PN from DETAILS where ID = '%lld'", id);
|
||||
ret = sql_get_table(db, sql_buf, &result, &rows, NULL);
|
||||
@ -1727,6 +1734,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
||||
}
|
||||
/* Cache the result */
|
||||
last_file.id = id;
|
||||
last_file.client = h->req_client;
|
||||
strncpy(last_file.path, result[3], sizeof(last_file.path)-1);
|
||||
if( result[4] )
|
||||
{
|
||||
@ -1894,6 +1902,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
||||
"Server: " MINIDLNA_SERVER_STRING "\r\n\r\n",
|
||||
date, last_file.dlna);
|
||||
|
||||
//DEBUG DPRINTF(E_DEBUG, L_HTTP, "RESPONSE: %s\n", str.data);
|
||||
if( send_data(h, str.data, str.off, MSG_MORE) == 0 )
|
||||
{
|
||||
if( h->req_command != EHead )
|
||||
|
Loading…
x
Reference in New Issue
Block a user