Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / multimedia / mediatomb / patches / patch-src_tools.cc
blob3ca188003493ede4b02c4490172a23a40886982c
1 $NetBSD$
3 Add SONY Bravia support
4 http://blog-imgs-30.fc2.com/h/o/r/horip/mediatomb-0_12_1_bravia_support_0_1_patch.txt
6 --- src/tools.cc.orig 2010-03-25 14:58:11.000000000 +0000
7 +++ src/tools.cc
8 @@ -435,7 +435,41 @@ String mime_types_to_CSV(Ref<Array<Strin
9 if (i > 0)
10 *buf << ",";
11 String mimeType = mimeTypes->get(i);
12 - *buf << "http-get:*:" << mimeType << ":*";
13 +// *buf << "http-get:*:" << mimeType << ":*";
15 + *buf << "http-get:*:" << mimeType;
17 + log_debug("mimeType: %s..\n", mimeType.c_str() );
18 +// log_debug("mimeType: %d\n", strcmp(mimeType.c_str(),"video/mpeg"));
20 + // Add ORG_PN for mimetype that are unnecessary to be trancodeed. // horipiri
21 + // Insert video/mpeg if mimeType=video/avi for BRAVIA's server diagnose. // horipiri
22 + if (strstr(mimeType.c_str(),"video/mpeg")){
23 + *buf << ":DLNA.ORG_PN=MPEG_PS_NTSC";
24 + }
25 + else if ( (strstr(mimeType.c_str(),"video/avi"))
26 + || (strstr(mimeType.c_str(),"video/x-flv"))
27 + ) {
28 + *buf << ":*,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC";
29 + }
30 + else if (strstr(mimeType.c_str(),"audio/L16")){
31 + *buf << ":DLNA.ORG_PN=LPCM";
32 + }
33 + else if (strstr(mimeType.c_str(),"audio/mpeg")){
34 + *buf << ":DLNA.ORG_PN=MP3";
35 + }
36 + else if (strstr(mimeType.c_str(),"application/ogg")){
37 + *buf << ":*,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3";
38 + }
39 + else if (strstr(mimeType.c_str(),"image/jpeg")){
40 + *buf << ":DLNA.ORG_PN=JPEG_LRG";
41 + }
42 + else if (strstr(mimeType.c_str(),"video/vnd.dlna.mpeg-tts")){
43 + *buf << ":DLNA.ORG_PN=MPEG_TS_SD_60_AC3_T";
44 + }
45 + else {
46 + *buf << ":*";
47 + }
50 return buf->toString();