之前将盒子作為下載下傳機,為了能夠直接播放上面的電影和電視,就通過minidlna,将視訊共享出來,這樣能夠支援通過nexus 10平闆播放這些電影。但是,即使更新到了1.1.0版本,minidlna還是不能将設定的視訊目錄中的rmvb檔案共享出來。
參照網上搜尋到的讓 minidlna 支援 rmvb、gb2312 mp3 标簽這篇文章,根據裡面的patch,修改了1.1.0版本的minidlna之後,可以在平闆上看見rmvb檔案了。
由于前文提到的更新檔,是針對1.0版本的minidlna,參照更新檔修改的位置,自己對更新檔進行了修改,重新寫了一個ebuild檔案之後,搞定了。新的更新檔檔案:
[cce lang=”diff” ]
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
[/cce]
ebuild檔案就是在src_prepare階段,增加了:epatch “${filesdir}”/${pn}-1.1.0-rmvb.patch,打上這個更新檔即可。
轉載自:https://coolex.info/blog/414.html