SakamonWeb
New
Tools
Index
Edit
Mediatomb/Construction
<<install>> <<<get source>>> [1.|../pkg/mediatomb/mediatomb-0.12.1.tar.gz] [MediaTomb - Free UPnP MediaServer|http://mediatomb.cc/] [2.|../pkg/mediatomb/mediatomb-seek.patch] [seek-patch|https://sourceforge.net/p/mediatomb/patches/19/] ... enable seek play when transcoding. <<<make>>> make binary from the source code (version 0.12.1) <pre> # 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 </pre> <<<bug fix>>> <<<<promblem 1>>>> <pre> ../src/zmm/object.h:51:32: エラー: declaration of ‘operator new’ as non-function static void* operator new (size_t size); </pre> src/zmm/object.h <pre> #include <new> // for size_t +#include <cstddef> #include "atomic.h" </pre> <<<<promblem 2>>>> <pre> ../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 </pre> 他にも類似エラー多発. 「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>>>> <pre> ../upnp/src/genlib/net/http/webserver.c:336:16: 警告: ‘gMediaTypes’ は静的ですが、静的ではないインライン関数 ‘get_content_type’ 内で使用されます type = gMediaTypes[APPLICATION_INDEX]; </pre> tombupnp/upnp/src/genlib/net/http/webserver.c <pre> -XINLINE int +static XINLINE int get_content_type( IN const char *filename, OUT DOMString * content_type ) </pre> <<<configuration>>> MySQLにmediatombのdatabaseを作成、ユーザと権限の設定を行う。 <pre> $ mysql -u root -p mysql mysql> create database mediatomb mysql> grant all on mediatomb.* to 'mediatomb'@'localhost' identified by 'mediatomb'; </pre> <pre> $ mysql -u mediatomb -p mediatomb < /usr/local/share/mediatomb/mysql.sql </pre> mediatomb を起動すると、~/.mediatomb/ ディレクトリに適切なconfig.xml が作成される. このファイルに databaseのパスワード他、必要な設定を追加/修正を行う <pre> # su - mediatomb -c "/usr/local/mediatomb-0.12.1/bin/mediatomb -i $IPADDRESS -p $PORT -d" </pre> <pre> --- 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"/> </pre> <<case of sony>> <<<get patch>>> [1.|../pkg/mediatomb/mediatomb-0_12_1_bravia_support_0_1_patch.txt] [mediatomb-0_12_1_bravia_support_0_1_patch.txt |http://blog-imgs-30.fc2.com/h/o/r/horip/mediatomb-0_12_1_bravia_support_0_1_patch.txt] <<<make>>> make binary from the source code (version 0.12.1) <pre> # 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 ... </pre> パッチが競合するので、手作業でパッチをあてる <pre> 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)); </pre> <pre> # ./configure --prefix=/usr/local/mediatomb-0.12.1 --disable-sqlite3 # make # make install </pre>
Sign:
freeze
sage
Attachment
New:
Sign:
Rename
Title:
Sign: