先日のTrusty化したGT110bで忘れていたMediaTombと昨年2月以来の再戦。
昨年2月に導入したリビジョン 2104にfix_libav_0.7_support.patch、libavformat_0.11_support.patch、mediatomb-seek.patchの3パッチを適用したソースツリーをrebuildしたところ
yano@GT110b:~/software/MediaTomb/mediatomb-r2104$ makeというエラーで止ってしまった。どうやらGCC 4.6由来の問題らしく、MediaTomb / Patches / #25 Fix build error with GCC 4.6に倣ってmediatomb-0.12.1-gcc46.patchを適用。すると、今度は
~~ 中略 ~~
g++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I.. -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG -pthread -g -O2 -MT libmediatomb_a-autoscan.o -MD -MP -MF .deps/libmediatomb_a-autoscan.Tpo -c -o libmediatomb_a-autoscan.o `test -f '../src/autoscan.cc' || echo './'`../src/autoscan.cc
In file included from ../src/zmm/zmm.h:37:0,
from ../src/zmmf/zmmf.h:35,
from ../src/autoscan.h:36,
from ../src/autoscan.cc:36:
../src/zmm/object.h:51:32: error: declaration of ‘operator new’ as non-function
static void* operator new (size_t size);
^
../src/zmm/object.h:51:27: error: expected ‘;’ at end of member declaration
static void* operator new (size_t size);
^
../src/zmm/object.h:51:39: error: expected ‘)’ before ‘size’
static void* operator new (size_t size);
^
make[2]: *** [libmediatomb_a-autoscan.o] Error 1
make[2]: Leaving directory `/home/yano/software/MediaTomb/mediatomb-r2104/build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yano/software/MediaTomb/mediatomb-r2104'
make: *** [all] Error 2
yano@GT110b:~/software/MediaTomb/mediatomb-r2104$ makeというエラー発生。特にパッチが出ているような雰囲気は無いので、use ‘this->search’ insteadと言われるとおりthis->を付与して解決。 ./src/hash/dbo_hash.hだけでなく./src/hash/dbr_hash.h、./src/hash/dso_hash.hも同様だったので、mediatomb-hash_socpe.patchを作っておく。
~~ 中略 ~~
make[2]: Entering directory `/home/yano/software/MediaTomb/mediatomb-r2104/build'
g++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I.. -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG -pthread -g -O2 -MT libmediatomb_a-action_request.o -MD -MP -MF .deps/libmediatomb_a-action_request.Tpo -c -o libmediatomb_a-action_request.o `test -f '../src/action_request.cc' || echo './'`../src/action_request.cc
mv -f .deps/libmediatomb_a-action_request.Tpo .deps/libmediatomb_a-action_request.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I.. -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG -pthread -g -O2 -MT libmediatomb_a-autoscan.o -MD -MP -MF .deps/libmediatomb_a-autoscan.Tpo -c -o libmediatomb_a-autoscan.o `test -f '../src/autoscan.cc' || echo './'`../src/autoscan.cc
mv -f .deps/libmediatomb_a-autoscan.Tpo .deps/libmediatomb_a-autoscan.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I.. -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG -pthread -g -O2 -MT libmediatomb_a-autoscan_inotify.o -MD -MP -MF .deps/libmediatomb_a-autoscan_inotify.Tpo -c -o libmediatomb_a-autoscan_inotify.o `test -f '../src/autoscan_inotify.cc' || echo './'`../src/autoscan_inotify.cc
In file included from ../src/hash.h:49:0,
from ../src/autoscan_inotify.h:36,
from ../src/autoscan_inotify.cc:38:
../src/hash/dbo_hash.h: In instantiation of ‘zmm::Ref<VT> DBOHash<KT, VT>::get(KT) [with KT = int; VT = AutoscanInotify::Wd]’:
../src/autoscan_inotify.cc:229:48: required from here
../src/hash/dbo_hash.h:165:39: error: ‘search’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
bool found = search(key, &slot);
^
../src/hash/dbo_hash.h:165:39: note: declarations in dependent base ‘DHashBase<int, dbo_hash_slot<int, AutoscanInotify::Wd> >’ are not found by unqualified lookup
../src/hash/dbo_hash.h:165:39: note: use ‘this->search’ instead
../src/hash/dbo_hash.h: In instantiation of ‘bool DBOHash<KT, VT>::remove(KT) [with KT = int; VT = AutoscanInotify::Wd]’:
../src/autoscan_inotify.cc:329:39: required from here
../src/hash/dbo_hash.h:109:32: error: ‘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:32: note: declarations in dependent base ‘DHashBase<int, dbo_hash_slot<int, AutoscanInotify::Wd> >’ are not found by unqualified lookup
../src/hash/dbo_hash.h:109:32: note: use ‘this->search’ instead
../src/hash/dbo_hash.h: In instantiation of ‘void DBOHash<KT, VT>::put(KT, zmm::Ref<VT>) [with KT = int; VT = AutoscanInotify::Wd]’:
../src/autoscan_inotify.cc:392:35: required from here
../src/hash/dbo_hash.h:139:26: error: ‘search’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
search(key, &slot);
^
../src/hash/dbo_hash.h:139:26: note: declarations in dependent base ‘DHashBase<int, dbo_hash_slot<int, AutoscanInotify::Wd> >’ are not found by unqualified lookup
../src/hash/dbo_hash.h:139:26: note: use ‘this->search’ instead
make[2]: *** [libmediatomb_a-autoscan_inotify.o] Error 1
make[2]: Leaving directory `/home/yano/software/MediaTomb/mediatomb-r2104/build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yano/software/MediaTomb/mediatomb-r2104'
make: *** [all] Error 2
*** ./src/hash/dbo_hash.h.orig 2012-10-22 00:50:27.000000000 +0900
--- ./src/hash/dbo_hash.h 2014-07-25 16:30:36.721645351 +0900
***************
*** 106,112 ****
inline bool remove(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
! if (! search(key, &slot))
return false;
slot->key = deletedKey;
slot->value->release();
--- 106,112 ----
inline bool remove(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
! if (! this->search(key, &slot))
return false;
slot->key = deletedKey;
slot->value->release();
***************
*** 136,142 ****
inline void put(KT key, zmm::Ref<VT> value)
{
struct dbo_hash_slot<KT, VT> *slot;
! search(key, &slot);
put(key, (hash_slot_t)slot, value);
}
void put(KT key, hash_slot_t destSlot, zmm::Ref<VT> value)
--- 136,142 ----
inline void put(KT key, zmm::Ref<VT> value)
{
struct dbo_hash_slot<KT, VT> *slot;
! this->search(key, &slot);
put(key, (hash_slot_t)slot, value);
}
void put(KT key, hash_slot_t destSlot, zmm::Ref<VT> value)
***************
*** 162,168 ****
inline zmm::Ref<VT> get(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
! bool found = search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
--- 162,168 ----
inline zmm::Ref<VT> get(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
! bool found = this->search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
***************
*** 174,180 ****
inline zmm::Ref<VT> get(KT key, hash_slot_t *destSlot)
{
struct dbo_hash_slot<KT, VT> **slot = (struct dbo_hash_slot<KT, VT> **)destSlot;
! bool found = search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else
--- 174,180 ----
inline zmm::Ref<VT> get(KT key, hash_slot_t *destSlot)
{
struct dbo_hash_slot<KT, VT> **slot = (struct dbo_hash_slot<KT, VT> **)destSlot;
! bool found = this->search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else
*** ./src/hash/dbr_hash.h.orig 2012-10-22 00:50:27.000000000 +0900
--- ./src/hash/dbr_hash.h 2014-07-25 16:31:48.843639371 +0900
***************
*** 124,130 ****
inline bool remove(KT key)
{
struct dbr_hash_slot<KT> *slot;
! if (! search(key, &slot))
return false;
slot->key = deletedKey;
int array_slot = slot->array_slot;
--- 124,130 ----
inline bool remove(KT key)
{
struct dbr_hash_slot<KT> *slot;
! if (! this->search(key, &slot))
return false;
slot->key = deletedKey;
int array_slot = slot->array_slot;
***************
*** 134,140 ****
return true;
}
data_array[array_slot] = data_array[--this->count];
! if (! search(data_array[array_slot], &slot))
{
log_debug("DBR-Hash-Error: (%d; array_slot=%d; count=%d)\n", data_array[array_slot], array_slot, this->count);
throw zmm::Exception(_("DBR-Hash-Error: key in data_array not found in hashtable"));
--- 134,140 ----
return true;
}
data_array[array_slot] = data_array[--this->count];
! if (! this->search(data_array[array_slot], &slot))
{
log_debug("DBR-Hash-Error: (%d; array_slot=%d; count=%d)\n", data_array[array_slot], array_slot, this->count);
throw zmm::Exception(_("DBR-Hash-Error: key in data_array not found in hashtable"));
***************
*** 146,152 ****
inline void put(KT key)
{
struct dbr_hash_slot<KT> *slot;
! if (! search(key, &slot))
{
#ifdef TOMBDEBUG
if (this->count >= realCapacity)
--- 146,152 ----
inline void put(KT key)
{
struct dbr_hash_slot<KT> *slot;
! if (! this->search(key, &slot))
{
#ifdef TOMBDEBUG
if (this->count >= realCapacity)
***************
*** 194,200 ****
inline bool exists(KT key)
{
struct dbr_hash_slot<KT> *slot;
! return search(key, &slot);
}
/*
--- 194,200 ----
inline bool exists(KT key)
{
struct dbr_hash_slot<KT> *slot;
! return this->search(key, &slot);
}
/*
***************
*** 202,208 ****
inline bool exists(KT key, hash_slot_t *destSlot)
{
! return search(key, (KT **)destSlot);
}
*/
};
--- 202,208 ----
inline bool exists(KT key, hash_slot_t *destSlot)
{
! return this->search(key, (KT **)destSlot);
}
*/
};
*** ./src/hash/dso_hash.h.orig 2012-10-22 00:50:27.000000000 +0900
--- ./src/hash/dso_hash.h 2014-07-25 16:33:00.461619216 +0900
***************
*** 100,106 ****
inline bool remove(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
! if (! search(key, &slot))
return false;
slot->key->release();
slot->value->release();
--- 100,106 ----
inline bool remove(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
! if (! this->search(key, &slot))
return false;
slot->key->release();
slot->value->release();
***************
*** 112,118 ****
inline void put(zmm::String key, zmm::Ref<VT> value)
{
struct dso_hash_slot<VT> *slot;
! search(key, &slot);
put(key, (hash_slot_t)slot, value);
}
void put(zmm::String key, hash_slot_t destSlot, zmm::Ref<VT> value)
--- 112,118 ----
inline void put(zmm::String key, zmm::Ref<VT> value)
{
struct dso_hash_slot<VT> *slot;
! this->search(key, &slot);
put(key, (hash_slot_t)slot, value);
}
void put(zmm::String key, hash_slot_t destSlot, zmm::Ref<VT> value)
***************
*** 141,147 ****
inline zmm::Ref<VT> get(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
! bool found = search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
--- 141,147 ----
inline zmm::Ref<VT> get(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
! bool found = this->search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
***************
*** 153,159 ****
inline zmm::Ref<VT> get(zmm::String key, hash_slot_t *destSlot)
{
struct dso_hash_slot<VT> **slot = (struct dso_hash_slot<VT> **)destSlot;
! bool found = search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else
--- 153,159 ----
inline zmm::Ref<VT> get(zmm::String key, hash_slot_t *destSlot)
{
struct dso_hash_slot<VT> **slot = (struct dso_hash_slot<VT> **)destSlot;
! bool found = this->search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else
makeが通ったら、sudo make install、sudo service mediatomb startでREGZAからの視聴&Seekも今まで通りできる事を確認。
ついでにFFmpegも最新版を入れておいた方が良かろうと2.3を導入。
【参照】
●MediaTomb - Free UPnP MediaServer http://mediatomb.cc/
●FFmpeg http://www.ffmpeg.org/
●MediaTomb | Free Audio & Video software downloads at SourceForge.net http://sourceforge.net/projects/mediatomb/
┣MediaTomb / Patches
┣#19 Add time-based seek capability to transcoded streams 2010年4月30日
┗#25 Fix build error with GCC 4.6 2011年2月5日
●Bugs : “mediatomb” package : Ubuntu https://bugs.launchpad.net/ubuntu/+source/mediatomb
┗Bug #784431 “mediatomb build failure when libavformat-dev >= 4:0...” 2011年5月18日
●pkg-multimedia-maintainers Info Page http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers
┗Bug#677959: mediatomb: fails to build against current version of libavformat 2012年6月18日
●Wikipedia http://ja.wikipedia.org/wiki/
┗FFmpeg