Mediatomb/Construction
install
get source
1. MediaTomb - Free UPnP MediaServer
2. seek-patch ... enable seek play when transcoding.
make
make binary from the source code (version 0.12.1)
# tar xvfz mediatomb-0.12.1.tar.gz # cd mediatomb-0.12.1 # patch -p0 < mediatomb-seek.patch # ./configure --prefix=/usr/local/mediatomb-0.12.1 --disable-sqlite3 # make # make install
bug fix
promblem 1
../src/zmm/object.h:51:32: エラー: declaration of ‘operator new’ as non-function
static void* operator new (size_t size);
src/zmm/object.h
#include <new> // for size_t +#include <cstddef> #include "atomic.h"
promblem 2
../src/hash/dbo_hash.h:109:21: エラー: ‘search’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
if (! search(key, &slot))
^
../src/hash/dbo_hash.h:109:21: 備考: declarations in dependent base ‘DHashBase<int, dbo_hash_slot<int, AutoscanInotify::Wd> >’ are not found by unqualified lookup
../src/hash/dbo_hash.h:109:21: 備考: use ‘this->search’ instead
他にも類似エラー多発. 「use ‘this->search’ instead」に従って、「search」を「this->search」へ置換。 対象ファイルは下記の3つ
src/hash/dbo_hash.h
src/hash/dbr_hash.h
src/hash/dso_hash.h
promblem 3
../upnp/src/genlib/net/http/webserver.c:336:16: 警告: ‘gMediaTypes’ は静的ですが、静的ではないインライン関数 ‘get_content_type’ 内で使用されます
type = gMediaTypes[APPLICATION_INDEX];
tombupnp/upnp/src/genlib/net/http/webserver.c
-XINLINE int
+static XINLINE int
get_content_type( IN const char *filename,
OUT DOMString * content_type )
configuration
MySQLにmediatombのdatabaseを作成、ユーザと権限の設定を行う。
$ mysql -u root -p mysql mysql> create database mediatomb mysql> grant all on mediatomb.* to 'mediatomb'@'localhost' identified by 'mediatomb';
$ mysql -u mediatomb -p mediatomb < /usr/local/share/mediatomb/mysql.sql
mediatomb を起動すると、~/.mediatomb/ ディレクトリに適切なconfig.xml が作成される.
このファイルに databaseのパスワード他、必要な設定を追加/修正を行う
# su - mediatomb -c "/usr/local/mediatomb-0.12.1/bin/mediatomb -i $IPADDRESS -p $PORT -d"
--- config.xml.dist 2017-10-09 11:01:30.000000000 +0900
+++ config.xml 2017-10-09 11:38:28.000000000 +0900
@@ -14,10 +14,11 @@
<mysql enabled="yes">
<host>localhost</host>
<username>mediatomb</username>
+ <password>mediatomb</password>
<database>mediatomb</database>
</mysql>
</storage>
- <protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
+ <protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
<!--
Uncomment the lines below to get rid of jerky avi playback on the
DSM320 or to enable subtitles support on the DSM units
@@ -44,6 +45,8 @@
</extended-runtime-options>
</server>
<import hidden-files="no">
+ <filesystem-charset>UTF-8</filesystem-charset>
+ <metadata-charset>CP932</metadata-charset>
<scripting script-charset="UTF-8">
<virtual-layout type="builtin"/>
</scripting>
@@ -69,9 +72,17 @@
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<!-- Uncomment the line below for PS3 divx support -->
- <!-- <map from="avi" to="video/divx"/> -->
+ <map from="avi" to="video/divx"/>
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
<!-- <map from="avi" to="video/avi"/> -->
+ <map from="jpg" to="image/jpeg"/>
+ <map from="jpeg" to="image/jpeg"/>
+ <map from="gif" to="image/gif"/>
+ <map from="png" to="image/png"/>
+ <map from="m4v" to="video/mp4"/>
+ <map from="mpg" to="video/mpeg"/>
+ <map from="m2t" to="video/mpeg"/>
+ <map from="m2ts" to="video/mpeg"/>
</extension-mimetype>
<mimetype-upnpclass>
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
case of sony
make
make binary from the source code (version 0.12.1)
# tar xvfz mediatomb-0.12.1.tar.gz # cd mediatomb-0.12.1 # patch -p0 < mediatomb-0_12_1_bravia_support_0_1_patch.txt # patch -p0 < mediatomb-seek.patch ... Hunk #2 FAILED at 328. 1 out of 2 hunks FAILED -- saving rejects to file src/transcoding/transcode_ext_handler.cc.rej ...
パッチが競合するので、手作業でパッチをあてる
Index: src/transcoding/transcode_ext_handler.cc
===================================================================
--- src/transcoding/transcode_ext_handler.cc (revision 2102)
+++ src/transcoding/transcode_ext_handler.cc (working copy)
@@ -327,8 +328,12 @@
}
chmod(fifo_name.c_str(), S_IWUSR | S_IRUSR);
-
- arglist = parseCommandLine(profile->getArguments(), location, fifo_name);
+
+ if (seek_pos < 0) {
+ log_debug("Warning: negative seek %f requested, ignoring\n", seek_pos);
+ seek_pos = 0;
+ }
+ arglist = parseCommandLine(profile->getArguments(), location, fifo_name, seek_pos);
log_info("Arguments: %s\n", profile->getArguments().c_str());
Ref<TranscodingProcessExecutor> main_proc(new TranscodingProcessExecutor(profile->getCommand(), arglist));
# ./configure --prefix=/usr/local/mediatomb-0.12.1 --disable-sqlite3 # make # make install
---
update at 2018/07/13 09:29:57
※注:当サイトは特定環境において確認できた事象のみを記述しています。他の環境での動作は一切保証しません。