* 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
|
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.
|
- Fix a crash bug when playing music on TiVo.
|
||||||
- Add the ability to change the root media container.
|
- Add the ability to change the root media container.
|
||||||
- Add WAV/RIFF INFO tag parsing support for the most common tags.
|
- Add WAV/RIFF INFO tag parsing support for the most common tags.
|
||||||
|
@ -80,6 +80,7 @@ enum client_types {
|
|||||||
ELGDevice,
|
ELGDevice,
|
||||||
ENetgearEVA2000,
|
ENetgearEVA2000,
|
||||||
ESamsungSeriesA,
|
ESamsungSeriesA,
|
||||||
|
ESamsungSeriesB,
|
||||||
EStandardDLNA150 = 100
|
EStandardDLNA150 = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
|
32
minissdp.c
32
minissdp.c
@ -44,6 +44,7 @@
|
|||||||
#include "upnpreplyparse.h"
|
#include "upnpreplyparse.h"
|
||||||
#include "getifaddr.h"
|
#include "getifaddr.h"
|
||||||
#include "minissdp.h"
|
#include "minissdp.h"
|
||||||
|
#include "utils.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
/* SSDP ip/port */
|
/* SSDP ip/port */
|
||||||
@ -357,9 +358,9 @@ ParseUPnPClient(char *location)
|
|||||||
int content_len = sizeof(buf);
|
int content_len = sizeof(buf);
|
||||||
struct NameValueParserData xml;
|
struct NameValueParserData xml;
|
||||||
int client;
|
int client;
|
||||||
enum client_types type = -1;
|
enum client_types type = 0;
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
char *model;
|
char *model, *serial;
|
||||||
|
|
||||||
if (strncmp(location, "http://", 7) != 0)
|
if (strncmp(location, "http://", 7) != 0)
|
||||||
return;
|
return;
|
||||||
@ -442,6 +443,7 @@ close:
|
|||||||
nread -= off - buf;
|
nread -= off - buf;
|
||||||
ParseNameValue(off, nread, &xml);
|
ParseNameValue(off, nread, &xml);
|
||||||
model = GetValueFromNameValueList(&xml, "modelName");
|
model = GetValueFromNameValueList(&xml, "modelName");
|
||||||
|
serial = GetValueFromNameValueList(&xml, "serialNumber");
|
||||||
if( model )
|
if( model )
|
||||||
{
|
{
|
||||||
DPRINTF(E_DEBUG, L_SSDP, "Model: %s\n", model);
|
DPRINTF(E_DEBUG, L_SSDP, "Model: %s\n", model);
|
||||||
@ -450,9 +452,20 @@ close:
|
|||||||
type = ERokuSoundBridge;
|
type = ERokuSoundBridge;
|
||||||
flags |= FLAG_AUDIO_ONLY;
|
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;
|
return;
|
||||||
client = SearchClientCache(dest.sin_addr, 1);
|
client = SearchClientCache(dest.sin_addr, 1);
|
||||||
/* Add this client to the cache if it's not there already. */
|
/* Add this client to the cache if it's not there already. */
|
||||||
@ -546,15 +559,20 @@ ProcessSSDPRequest(int s, unsigned short port)
|
|||||||
{
|
{
|
||||||
return;
|
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 */
|
/* Check if the client is already in cache */
|
||||||
i = SearchClientCache(sendername.sin_addr, 1);
|
i = SearchClientCache(sendername.sin_addr, 1);
|
||||||
if( i >= 0 && clients[i].type < EStandardDLNA150 )
|
if( i >= 0 )
|
||||||
|
{
|
||||||
|
if( clients[i].type < EStandardDLNA150 &&
|
||||||
|
clients[i].type != ESamsungSeriesA )
|
||||||
{
|
{
|
||||||
clients[i].age = time(NULL);
|
clients[i].age = time(NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ParseUPnPClient(loc);
|
ParseUPnPClient(loc);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -562,7 +580,7 @@ ProcessSSDPRequest(int s, unsigned short port)
|
|||||||
else if(memcmp(bufr, "M-SEARCH", 8) == 0)
|
else if(memcmp(bufr, "M-SEARCH", 8) == 0)
|
||||||
{
|
{
|
||||||
int st_len = 0, mx_len = 0, mx_val = 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++)
|
for(i=0; i < n; i++)
|
||||||
{
|
{
|
||||||
if( bufr[i] == '*' )
|
if( bufr[i] == '*' )
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
|
|
||||||
#define MINIDLNA_VERSION "1.0.20.2"
|
#define MINIDLNA_VERSION "1.0.20.3"
|
||||||
|
|
||||||
#ifdef NETGEAR
|
#ifdef NETGEAR
|
||||||
# define SERVER_NAME "ReadyDLNA"
|
# define SERVER_NAME "ReadyDLNA"
|
||||||
|
15
upnphttp.c
15
upnphttp.c
@ -494,9 +494,11 @@ next_header:
|
|||||||
break;
|
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 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->reqflags |= clients[n].flags;
|
||||||
h->req_client = clients[n].type;
|
h->req_client = clients[n].type;
|
||||||
return;
|
return;
|
||||||
@ -1702,13 +1704,18 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
off_t total, offset, size;
|
off_t total, offset, size;
|
||||||
sqlite_int64 id;
|
sqlite_int64 id;
|
||||||
int sendfh;
|
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
|
#if USE_FORK
|
||||||
pid_t newpid = 0;
|
pid_t newpid = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
id = strtoll(object, NULL, 10);
|
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);
|
sprintf(sql_buf, "SELECT PATH, MIME, DLNA_PN from DETAILS where ID = '%lld'", id);
|
||||||
ret = sql_get_table(db, sql_buf, &result, &rows, NULL);
|
ret = sql_get_table(db, sql_buf, &result, &rows, NULL);
|
||||||
@ -1727,6 +1734,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
}
|
}
|
||||||
/* Cache the result */
|
/* Cache the result */
|
||||||
last_file.id = id;
|
last_file.id = id;
|
||||||
|
last_file.client = h->req_client;
|
||||||
strncpy(last_file.path, result[3], sizeof(last_file.path)-1);
|
strncpy(last_file.path, result[3], sizeof(last_file.path)-1);
|
||||||
if( result[4] )
|
if( result[4] )
|
||||||
{
|
{
|
||||||
@ -1894,6 +1902,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
|||||||
"Server: " MINIDLNA_SERVER_STRING "\r\n\r\n",
|
"Server: " MINIDLNA_SERVER_STRING "\r\n\r\n",
|
||||||
date, last_file.dlna);
|
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( send_data(h, str.data, str.off, MSG_MORE) == 0 )
|
||||||
{
|
{
|
||||||
if( h->req_command != EHead )
|
if( h->req_command != EHead )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user