Created
January 13, 2015 03:38
-
-
Save elleryq/378b0748382db8faad26 to your computer and use it in GitHub Desktop.
Add realmedia support in minidlna-1.1.4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/metadata.c b/metadata.c | |
| index f3987c6..6012c06 100644 | |
| --- a/metadata.c | |
| +++ b/metadata.c | |
| @@ -841,6 +841,8 @@ GetVideoMetadata(const char *path, char *name) | |
| 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 ) | |
| + asprintf(&m.mime, "video/x-pn-realvideo"); | |
| if( m.mime ) | |
| goto video_no_dlna; | |
| diff --git a/upnpglobalvars.h b/upnpglobalvars.h | |
| index 224c374..0cf7007 100644 | |
| --- a/upnpglobalvars.h | |
| +++ b/upnpglobalvars.h | |
| @@ -169,7 +169,8 @@ | |
| "http-get:*:audio/mp4:*," \ | |
| "http-get:*:audio/x-wav:*," \ | |
| "http-get:*:audio/x-flac:*," \ | |
| - "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 | |
| diff --git a/utils.c b/utils.c | |
| index d728136..37bcd84 100644 | |
| --- a/utils.c | |
| +++ b/utils.c | |
| @@ -357,6 +357,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 ) | |
| @@ -381,6 +383,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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment