aboutsummaryrefslogtreecommitdiff
path: root/multimedia/minidlna/patches/005-added-support-RMVB.patch
blob: ddf354f2d4053dde7d566249d84b4e1045b72829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From e4a045e92b864dc148ca46be94668c5b67132405 Mon Sep 17 00:00:00 2001
From: VergLsm <vision.lsm.2012@gmail.com>
Date: Fri, 31 Jan 2020 10:01:12 +0000
Subject: [PATCH] Added support RMVB.

---
 metadata.c       | 4 ++++
 upnpglobalvars.h | 3 ++-
 utils.c          | 3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)

--- a/metadata.c
+++ b/metadata.c
@@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const
 			xasprintf(&m.mime, "video/x-matroska");
 		else if( strcmp(ctx->iformat->name, "flv") == 0 )
 			xasprintf(&m.mime, "video/x-flv");
+		else if( strcmp(ctx->iformat->name, "rm") == 0 )
+			xasprintf(&m.mime, "video/x-pn-realvideo");
+		else if( strcmp(ctx->iformat->name, "rmvb") == 0 )
+			xasprintf(&m.mime, "video/x-pn-realvideo");
 		if( m.mime )
 			goto video_no_dlna;
 
--- a/upnpglobalvars.h
+++ b/upnpglobalvars.h
@@ -172,7 +172,8 @@
 	"http-get:*:audio/x-wav:*," \
 	"http-get:*:audio/x-flac:*," \
 	"http-get:*:audio/x-dsd:*," \
-	"http-get:*:application/ogg:*"
+	"http-get:*:application/ogg:*,"\
+	"http-get:*:video/x-pn-realvideo:*"
 
 #define DLNA_FLAG_DLNA_V1_5      0x00100000
 #define DLNA_FLAG_HTTP_STALLING  0x00200000
--- a/utils.c
+++ b/utils.c
@@ -377,6 +377,8 @@ mime_to_ext(const char * mime)
 				return "3gp";
 			else if( strncmp(mime+6, "x-tivo-mpeg", 11) == 0 )
 				return "TiVo";
+			else if( strcmp(mime+6, "x-pn-realvideo") == 0 )
+				return "rm";
 			break;
 		case 'i':
 			if( strcmp(mime+6, "jpeg") == 0 )
@@ -401,6 +403,7 @@ is_video(const char * file)
 		ends_with(file, ".m2t") || ends_with(file, ".mkv")   ||
 		ends_with(file, ".vob") || ends_with(file, ".ts")    ||
 		ends_with(file, ".flv") || ends_with(file, ".xvid")  ||
+		ends_with(file, ".rm") || ends_with(file, ".rmvb")  ||
 #ifdef TIVO_SUPPORT
 		ends_with(file, ".TiVo") ||
 #endif