add webm/rm/rmvb support

This commit is contained in:
lqs 2019-04-21 09:48:00 +00:00 committed by Gleb Smirnoff
parent cfb775682b
commit a1c8a1856d
3 changed files with 15 additions and 2 deletions

View File

@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const 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 )
xasprintf(&m.mime, "application/vnd.rn-realmedia");
else if( strcmp(ctx->iformat->name, "rmvb") == 0 )
xasprintf(&m.mime, "application/vnd.rn-realmedia-vbr");
if( m.mime )
goto video_no_dlna;
@ -1538,6 +1542,10 @@ video_no_dlna:
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, "application/vnd.rn-realmedia");
else if( strcmp(ctx->iformat->name, "rmvb") == 0 )
xasprintf(&m.mime, "application/vnd.rn-realmedia-vbr");
else
DPRINTF(E_WARN, L_METADATA, "%s: Unhandled format: %s\n", path, ctx->iformat->name);
}

View File

@ -172,7 +172,10 @@
"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:*:application/vnd.rn-realmedia:*" \
"http-get:*:application/vnd.rn-realmedia-vbr:*" \
"http-get:*:video/webm:*"
#define DLNA_FLAG_DLNA_V1_5 0x00100000
#define DLNA_FLAG_HTTP_STALLING 0x00200000

View File

@ -404,7 +404,9 @@ is_video(const char * file)
#ifdef TIVO_SUPPORT
ends_with(file, ".TiVo") ||
#endif
ends_with(file, ".mov") || ends_with(file, ".3gp"));
ends_with(file, ".mov") || ends_with(file, ".3gp") ||
ends_with(file, ".rm") || ends_with(file, ".rmvb") ||
ends_with(file, ".webm"));
}
int