You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.0 KiB

  1. From e4a045e92b864dc148ca46be94668c5b67132405 Mon Sep 17 00:00:00 2001
  2. From: VergLsm <vision.lsm.2012@gmail.com>
  3. Date: Fri, 31 Jan 2020 10:01:12 +0000
  4. Subject: [PATCH] Added support RMVB.
  5. ---
  6. metadata.c | 4 ++++
  7. upnpglobalvars.h | 3 ++-
  8. utils.c | 3 +++
  9. 3 files changed, 9 insertions(+), 1 deletion(-)
  10. diff --git a/metadata.c b/metadata.c
  11. index 9cd86dc..2d13480 100644
  12. --- a/metadata.c
  13. +++ b/metadata.c
  14. @@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const char *name)
  15. xasprintf(&m.mime, "video/x-matroska");
  16. else if( strcmp(ctx->iformat->name, "flv") == 0 )
  17. xasprintf(&m.mime, "video/x-flv");
  18. + else if( strcmp(ctx->iformat->name, "rm") == 0 )
  19. + xasprintf(&m.mime, "video/x-pn-realvideo");
  20. + else if( strcmp(ctx->iformat->name, "rmvb") == 0 )
  21. + xasprintf(&m.mime, "video/x-pn-realvideo");
  22. if( m.mime )
  23. goto video_no_dlna;
  24. diff --git a/upnpglobalvars.h b/upnpglobalvars.h
  25. index 1a2fb5e..2cbe24c 100644
  26. --- a/upnpglobalvars.h
  27. +++ b/upnpglobalvars.h
  28. @@ -172,7 +172,8 @@
  29. "http-get:*:audio/x-wav:*," \
  30. "http-get:*:audio/x-flac:*," \
  31. "http-get:*:audio/x-dsd:*," \
  32. - "http-get:*:application/ogg:*"
  33. + "http-get:*:application/ogg:*,"\
  34. + "http-get:*:video/x-pn-realvideo:*"
  35. #define DLNA_FLAG_DLNA_V1_5 0x00100000
  36. #define DLNA_FLAG_HTTP_STALLING 0x00200000
  37. diff --git a/utils.c b/utils.c
  38. index dc936f9..006f611 100644
  39. --- a/utils.c
  40. +++ b/utils.c
  41. @@ -377,6 +377,8 @@ mime_to_ext(const char * mime)
  42. return "3gp";
  43. else if( strncmp(mime+6, "x-tivo-mpeg", 11) == 0 )
  44. return "TiVo";
  45. + else if( strcmp(mime+6, "x-pn-realvideo") == 0 )
  46. + return "rm";
  47. break;
  48. case 'i':
  49. if( strcmp(mime+6, "jpeg") == 0 )
  50. @@ -401,6 +403,7 @@ is_video(const char * file)
  51. ends_with(file, ".m2t") || ends_with(file, ".mkv") ||
  52. ends_with(file, ".vob") || ends_with(file, ".ts") ||
  53. ends_with(file, ".flv") || ends_with(file, ".xvid") ||
  54. + ends_with(file, ".rm") || ends_with(file, ".rmvb") ||
  55. #ifdef TIVO_SUPPORT
  56. ends_with(file, ".TiVo") ||
  57. #endif
  58. --
  59. 2.20.1