minidlna支持共享rmvb文件

之前将盒子作为下载机,为了能够直接播放上面的电影和电视,就通过minidlna,将视频共享出来,这样能够支持通过nexus 10平板播放这些电影。但是,即使升级到了1.1.0版本,minidlna还是不能将设置的视频目录中的rmvb文件共享出来。

参照网上搜索到的让 minidlna 支持 rmvb、gb2312 mp3 标签这篇文章,根据里面的patch,修改了1.1.0版本的minidlna之后,可以在平板上看见rmvb文件了。

由于前文提到的补丁,是针对1.0版本的minidlna,参照补丁修改的位置,自己对补丁进行了修改,重新写了一个ebuild文件之后,搞定了。新的补丁文件:

diff -ur minidlna-1.1.0/metadata.c minidlna-1.1.0.new/metadata.c
--- minidlna-1.1.0/metadata.c   2013-03-09 08:03:03.000000000 +0800
+++ minidlna-1.1.0.new/metadata.c       2013-09-07 20:19:31.700278182 +0800
@@ -903,6 +903,8 @@
                        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 -ur minidlna-1.1.0/upnpglobalvars.h minidlna-1.1.0.new/upnpglobalvars.h
--- minidlna-1.1.0/upnpglobalvars.h     2013-04-05 07:39:12.000000000 +0800
+++ minidlna-1.1.0.new/upnpglobalvars.h 2013-09-07 20:21:40.564283420 +0800
@@ -168,7 +168,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 -ur minidlna-1.1.0/utils.c minidlna-1.1.0.new/utils.c                                                                                                                          
--- minidlna-1.1.0/utils.c      2013-04-03 07:29:21.000000000 +0800                                                                                                                
+++ minidlna-1.1.0.new/utils.c  2013-09-07 20:18:40.796283001 +0800                                                                                                                
@@ -375,6 +375,7 @@                                                                                                                                                                
                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

ebuild文件就是在src_prepare阶段,增加了:epatch “${FILESDIR}”/${PN}-1.1.0-rmvb.patch,打上这个补丁即可。

, 相关的文章:
  • 抱歉,暂无相关文章。

暂无评论

写评论