002-1.2.0-0012-clients-Improve-Samsung-BD-J5500-support.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. From d894885bc1f6d9d43d5421663cdff7b993d0304e Mon Sep 17 00:00:00 2001
  2. From: Justin Maggard <jmaggard@netgear.com>
  3. Date: Mon, 1 May 2017 17:49:16 -0700
  4. Subject: [PATCH] clients: Improve Samsung BD-J5500 support
  5. From SF user Andrea Odetti:
  6. The Samsung BD J5500 player does not accept some of the DLNA_PN values
  7. used by minidlna for *.mp4 files.
  8. For instance AVC_MP4_MP_HD_720p_AAC and AVC_MP4_BL_L31_HD_AAC are
  9. problematic as the player would simply ignore the files and not show
  10. them.
  11. AVC_MP4_HP_HD_AAC works.
  12. All the files play normally from a USB key.
  13. I've noticed as well that NULL works always, and this is the approach I
  14. have followed.
  15. So I changed minidlna and added a flag to disable DLNA_PN, and this
  16. flag is only used for a Samsung BD J5500 in order not to break other
  17. players, which can handle DLNA_PN properly.
  18. So when a J5500 is connected we simply set DLNA_PN to NULL and
  19. everything works well.
  20. ---
  21. clients.c | 8 +++++++-
  22. clients.h | 2 ++
  23. upnpsoap.c | 3 +++
  24. 3 files changed, 12 insertions(+), 1 deletion(-)
  25. diff --git a/clients.c b/clients.c
  26. index 5b9ba5d..e045ad8 100644
  27. --- a/clients.c
  28. +++ b/clients.c
  29. @@ -63,6 +63,13 @@ struct client_type_s client_types[] =
  30. EUserAgent
  31. },
  32. + { ESamsungBDJ5500,
  33. + FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE | FLAG_CAPTION_RES | FLAG_SKIP_DLNA_PN,
  34. + "Samsung BD J5500",
  35. + "[BD]J5500",
  36. + EUserAgent
  37. + },
  38. +
  39. /* Samsung Series [CDE] BDPs and TVs must be separated, or some of our
  40. * advertised extra features trigger a folder browsing bug on BDPs. */
  41. /* User-Agent: DLNADOC/1.50 SEC_HHP_BD-D5100/1.0 */
  42. @@ -324,4 +331,3 @@ AddClientCache(struct in_addr addr, int type)
  43. return NULL;
  44. }
  45. -
  46. diff --git a/clients.h b/clients.h
  47. index 35d819a..f9818f5 100644
  48. --- a/clients.h
  49. +++ b/clients.h
  50. @@ -37,6 +37,7 @@
  51. #define FLAG_AUDIO_ONLY 0x00000400
  52. #define FLAG_FORCE_SORT 0x00000800
  53. #define FLAG_CAPTION_RES 0x00001000
  54. +#define FLAG_SKIP_DLNA_PN 0x00002000 /* during browsing */
  55. /* Response-related flags */
  56. #define FLAG_HAS_CAPTIONS 0x80000000
  57. #define RESPONSE_FLAGS 0xF0000000
  58. @@ -69,6 +70,7 @@ enum client_types {
  59. ESamsungSeriesB,
  60. ESamsungSeriesCDEBDP,
  61. ESamsungSeriesCDE,
  62. + ESamsungBDJ5500,
  63. ESonyBDP,
  64. ESonyBravia,
  65. ESonyInternetTV,
  66. diff --git a/upnpsoap.c b/upnpsoap.c
  67. index 0c2b9af..9ee0b90 100644
  68. --- a/upnpsoap.c
  69. +++ b/upnpsoap.c
  70. @@ -905,6 +905,9 @@ callback(void *args, int argc, char **argv, char **azColName)
  71. else
  72. dlna_flags |= DLNA_FLAG_TM_I;
  73. + if( passed_args->flags & FLAG_SKIP_DLNA_PN )
  74. + dlna_pn = NULL;
  75. +
  76. if( dlna_pn )
  77. snprintf(dlna_buf, sizeof(dlna_buf), "DLNA.ORG_PN=%s;"
  78. "DLNA.ORG_OP=01;"
  79. --
  80. 2.11.0