Remove mediatomb, it's dead upstream, and uses an ancient spidermonkey

that will hit the attic.

Someone not liking the other upnp alternatives we have in tree might
look at porting
https://github.com/gerbera/gerbera#differences-to-mediatomb-so-far which
seems like the natural 'successor'
This commit is contained in:
landry 2018-05-18 20:18:36 +00:00
parent 9ada21029f
commit 76c6a395d1
21 changed files with 1 additions and 822 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.104 2018/05/09 10:10:44 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.105 2018/05/18 20:18:36 landry Exp $
SUBDIR =
SUBDIR += assimp
@ -40,7 +40,6 @@
SUBDIR += lives
SUBDIR += lsdvd
SUBDIR += mediainfo
SUBDIR += mediatomb
SUBDIR += ming
SUBDIR += minidlna
SUBDIR += mjpegtools

View File

@ -1,48 +0,0 @@
# $OpenBSD: Makefile,v 1.28 2018/01/11 19:27:04 rpe Exp $
COMMENT = UPnP media server
VER = 0.12.1
DISTNAME = mediatomb-${VER}
REVISION = 18
CATEGORIES = multimedia
HOMEPAGE = http://mediatomb.cc/
# GPLv2
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += avformat avutil c crypto curl exif expat ffmpegthumbnailer
WANTLIB += iconv intl m magic mozjs mp4v2 nghttp2 pthread sqlite3 ssl
WANTLIB += ${COMPILER_LIBCXX} tag z
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=mediatomb/}
LIB_DEPENDS = audio/taglib \
databases/sqlite3 \
devel/libmagic \
graphics/ffmpeg>=20121026 \
graphics/ffmpegthumbnailer \
graphics/libexif \
lang/spidermonkey>=1.9v0 \
net/curl \
multimedia/libmp4v2
CONFIGURE_STYLE = autoconf
AUTOCONF_VERSION = 2.63
CONFIGURE_ARGS = --disable-inotify \
--disable-lastfmlib \
--disable-mysql
# Add "-I${WRKSRC}/src" to make mediatomb find its own dictionary.h first.
CONFIGURE_ENV = CPPFLAGS="-I${WRKSRC}/src -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
ac_cv_header_execinfo_h=no \
ac_cv_header_lwres_netdb_h=no
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mediatomb/
${SUBST_DATA} ${FILESDIR}/config.xml \
${PREFIX}/share/examples/mediatomb/config.xml
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (mediatomb-0.12.1.tar.gz) = MRY8NKe50clzUYFzfLMTBvKfHyoDNftPU+zM+PYvEc0=
SIZE (mediatomb-0.12.1.tar.gz) = 1240612

View File

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
<server>
<ui enabled="yes" show-tooltips="yes">
<accounts enabled="no" session-timeout="30">
<account user="mediatomb" password="mediatomb"/>
</accounts>
</ui>
<name>MediaTomb</name>
<home>/var/db/mediatomb</home>
<webroot>${TRUEPREFIX}/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="yes">
<database-file>mediatomb.db</database-file>
</sqlite3>
</storage>
<protocolInfo extend="no"/><!-- 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
-->
<!--
<custom-http-headers>
<add header="X-User-Agent: redsonic"/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
-->
<!-- Uncomment the line below if you have a Telegent TG100 -->
<!--
<upnp-string-limit>101</upnp-string-limit>
-->
<extended-runtime-options>
<ffmpegthumbnailer enabled="no">
<thumbnail-size>128</thumbnail-size>
<seek-percentage>5</seek-percentage>
<filmstrip-overlay>yes</filmstrip-overlay>
<workaround-bugs>no</workaround-bugs>
<image-quality>8</image-quality>
</ffmpegthumbnailer>
<mark-played-items enabled="no" suppress-cds-updates="yes">
<string mode="prepend">*</string>
<mark>
<content>video</content>
</mark>
</mark-played-items>
</extended-runtime-options>
</server>
<import hidden-files="no">
<scripting script-charset="UTF-8">
<common-script>${TRUEPREFIX}/share/mediatomb/js/common.js</common-script>
<playlist-script>${TRUEPREFIX}/share/mediatomb/js/playlists.js</playlist-script>
<virtual-layout type="builtin">
<import-script>${TRUEPREFIX}/share/mediatomb/js/import.js</import-script>
</virtual-layout>
</scripting>
<mappings>
<extension-mimetype ignore-unknown="no">
<map from="mp3" to="audio/mpeg"/>
<map from="ogx" to="application/ogg"/>
<map from="ogv" to="video/ogg"/>
<map from="oga" to="audio/ogg"/>
<map from="ogg" to="audio/ogg"/>
<map from="ogm" to="video/ogg"/>
<map from="asf" to="video/x-ms-asf"/>
<map from="asx" to="video/x-ms-asf"/>
<map from="wma" to="audio/x-ms-wma"/>
<map from="wax" to="audio/x-ms-wax"/>
<map from="wmv" to="video/x-ms-wmv"/>
<map from="wvx" to="video/x-ms-wvx"/>
<map from="wm" to="video/x-ms-wm"/>
<map from="wmx" to="video/x-ms-wmx"/>
<map from="m3u" to="audio/x-mpegurl"/>
<map from="pls" to="audio/x-scpls"/>
<map from="flv" to="video/x-flv"/>
<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"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
<!-- <map from="avi" to="video/avi"/> -->
</extension-mimetype>
<mimetype-upnpclass>
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
<map from="video/*" to="object.item.videoItem"/>
<map from="image/*" to="object.item.imageItem"/>
</mimetype-upnpclass>
<mimetype-contenttype>
<treat mimetype="audio/mpeg" as="mp3"/>
<treat mimetype="application/ogg" as="ogg"/>
<treat mimetype="audio/x-flac" as="flac"/>
<treat mimetype="image/jpeg" as="jpg"/>
<treat mimetype="audio/x-mpegurl" as="playlist"/>
<treat mimetype="audio/x-scpls" as="playlist"/>
<treat mimetype="audio/x-wav" as="pcm"/>
<treat mimetype="audio/L16" as="pcm"/>
<treat mimetype="video/x-msvideo" as="avi"/>
<treat mimetype="video/mp4" as="mp4"/>
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="application/x-iso9660" as="dvd"/>
<treat mimetype="application/x-iso9660-image" as="dvd"/>
</mimetype-contenttype>
</mappings>
<online-content>
<YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
<favorites user="mediatomb"/>
<standardfeed feed="most_viewed" time-range="today"/>
<playlists user="mediatomb"/>
<uploads user="mediatomb"/>
<standardfeed feed="recently_featured" time-range="today"/>
</YouTube>
</online-content>
</import>
<transcoding enabled="no">
<mimetype-profile-mappings>
<transcode mimetype="video/x-flv" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="oggflac2raw"/>
<transcode mimetype="audio/x-flac" using="oggflac2raw"/>
</mimetype-profile-mappings>
<profiles>
<profile name="oggflac2raw" enabled="no" type="external">
<mimetype>audio/L16</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="vlcmpeg" enabled="no" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
<buffer size="14400000" chunk-size="512000" fill-size="120000"/>
</profile>
</profiles>
</transcoding>
</config>

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-acinclude_m4,v 1.1.1.1 2010/09/21 13:28:31 edd Exp $
--- acinclude.m4.orig Mon Mar 22 10:39:51 2010
+++ acinclude.m4 Mon Apr 5 19:53:46 2010
@@ -311,6 +311,7 @@ AC_DEFUN([MT_CHECK_LIBRARY_INTERNAL],
)
else
unset ac_cv_lib_$2_$3
+ LDFLAGS="$LDFLAGS $ADD_PTHREAD_CFLAGS"
AC_CHECK_LIB($2, $3,
[
mt_$1_libs="-l$2"

View File

@ -1,45 +0,0 @@
$OpenBSD: patch-configure_ac,v 1.3 2013/01/27 14:13:30 brad Exp $
--- configure.ac.orig Wed Apr 7 18:38:51 2010
+++ configure.ac Sun Jan 27 08:44:06 2013
@@ -327,6 +327,8 @@ AC_HEADER_STAT
AC_LANG_C
AM_PROG_CC_C_O
+AC_CHECK_FUNCS([arc4random],[],[])
+
AC_CHECK_HEADERS([time.h syslog.h stddef.h unistd.h arpa/inet.h fcntl.h], [],
[AC_MSG_ERROR(required header not found)])
@@ -342,8 +344,13 @@ AC_CHECK_HEADERS([langinfo.h locale.h],[],[AC_MSG_WARN
AC_CHECK_HEADERS([sys/utsname.h])
AC_CHECK_HEADERS([sched.h ctype.h],[],[])
+
+
+LDFLAGS_SAVE=$LDFLAGS
+LDFLAGS=-pthread
AC_CHECK_FUNCS([sched_getparam sched_setparam sched_get_priority_min sched_get_priority_max],[],[])
-
+LDFLAGS=$LDFLAGS_SAVE
+
AC_CHECK_FUNCS([mkdir], [],
[AC_MSG_ERROR(required function not found)])
@@ -692,6 +699,8 @@ if test $DARWIN_OS -eq 1 ; then
AC_MSG_NOTICE([You are running OSX, assuming threadsafe gethostbyname version])
elif test $CYGWIN_OS -eq 1; then
AC_MSG_NOTICE([Your are building under Cygwin, assuming threadsafe gethostbyname implementation])
+elif test $OPENBSD_OS -eq 1; then
+ AC_MSG_NOTICE([Your are building under OpenBSD, assuming threadsafe gethostbyname implementation])
fi
AC_CHECK_FUNCS([gethostbyname_r],[],
@@ -758,7 +767,7 @@ if test "x$PTHREAD_LIB_OPTION_ENABLED" = xyes; then
else
ACX_PTHREAD(,AC_MSG_ERROR(POSIX threads missing))
- if test $FREEBSD_OS -eq 1; then
+ if ((test $FREEBSD_OS -eq 1) || (test $OPENBSD_OS -eq 1)); then
ADD_PTHREAD_CFLAGS="$PTHREAD_CFLAGS $PTHREAD_LIBS"
fi

View File

@ -1,42 +0,0 @@
$OpenBSD: patch-src_hash_dbo_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
two phase name lookup
Index: src/hash/dbo_hash.h
--- src/hash/dbo_hash.h.orig
+++ src/hash/dbo_hash.h
@@ -106,7 +106,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
inline bool remove(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
- if (! search(key, &slot))
+ if (! this->search(key, &slot))
return false;
slot->key = deletedKey;
slot->value->release();
@@ -136,7 +136,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
inline void put(KT key, zmm::Ref<VT> value)
{
struct dbo_hash_slot<KT, VT> *slot;
- search(key, &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,7 +162,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
inline zmm::Ref<VT> get(KT key)
{
struct dbo_hash_slot<KT, VT> *slot;
- bool found = search(key, &slot);
+ bool found = this->search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
@@ -174,7 +174,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
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);
+ bool found = this->search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-src_hash_dbr_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
two phase name lookup
Index: src/hash/dbr_hash.h
--- src/hash/dbr_hash.h.orig
+++ src/hash/dbr_hash.h
@@ -124,7 +124,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
inline bool remove(KT key)
{
struct dbr_hash_slot<KT> *slot;
- if (! search(key, &slot))
+ if (! this->search(key, &slot))
return false;
slot->key = deletedKey;
int array_slot = slot->array_slot;
@@ -134,7 +134,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
return true;
}
data_array[array_slot] = data_array[--this->count];
- if (! search(data_array[array_slot], &slot))
+ 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,7 +146,7 @@ class DBRHash : public DHashBase<KT, struct dbr_hash_s
inline void put(KT key)
{
struct dbr_hash_slot<KT> *slot;
- if (! search(key, &slot))
+ if (! this->search(key, &slot))
{
#ifdef TOMBDEBUG
if (this->count >= realCapacity)

View File

@ -1,42 +0,0 @@
$OpenBSD: patch-src_hash_dso_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
two phase name lookup
Index: src/hash/dso_hash.h
--- src/hash/dso_hash.h.orig
+++ src/hash/dso_hash.h
@@ -100,7 +100,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
inline bool remove(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
- if (! search(key, &slot))
+ if (! this->search(key, &slot))
return false;
slot->key->release();
slot->value->release();
@@ -112,7 +112,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
inline void put(zmm::String key, zmm::Ref<VT> value)
{
struct dso_hash_slot<VT> *slot;
- search(key, &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,7 +141,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
inline zmm::Ref<VT> get(zmm::String key)
{
struct dso_hash_slot<VT> *slot;
- bool found = search(key, &slot);
+ bool found = this->search(key, &slot);
if (found)
return zmm::Ref<VT>(slot->value);
else
@@ -153,7 +153,7 @@ class DSOHash : public DHashBase<zmm::String, struct d
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);
+ bool found = this->search(key, slot);
if (found)
return zmm::Ref<VT>((*slot)->value);
else

View File

@ -1,187 +0,0 @@
$OpenBSD: patch-src_metadata_ffmpeg_handler_cc,v 1.2 2013/01/27 14:13:30 brad Exp $
Update for newer FFmpeg API.
--- src/metadata/ffmpeg_handler.cc.orig Thu Mar 25 10:58:10 2010
+++ src/metadata/ffmpeg_handler.cc Sun Jan 27 07:40:59 2013
@@ -51,16 +51,13 @@
// macro defines included via autoconfig.h
#include <stdint.h>
-//#ifdef FFMPEG_NEEDS_EXTERN_C
extern "C"
{
-//#endif
-#include AVFORMAT_INCLUDE
+#include <libavformat/avformat.h>
+#include <libavutil/avutil.h>
-//#ifdef FFMPEG_NEEDS_EXTERN_C
} // extern "C"
-//#endif
#ifdef HAVE_FFMPEGTHUMBNAILER
#include <libffmpegthumbnailer/videothumbnailerc.h>
@@ -86,51 +83,63 @@ FfmpegHandler::FfmpegHandler() : MetadataHandler()
static void addFfmpegMetadataFields(Ref<CdsItem> item, AVFormatContext *pFormatCtx)
{
-
+ AVDictionaryEntry *e = NULL;
Ref<StringConverter> sc = StringConverter::m2i();
-
- if (strlen(pFormatCtx->title) > 0)
+
+ metadata_fields_t field;
+ String value;
+
+ while ((e = av_dict_get(pFormatCtx->metadata, "", e,AV_DICT_IGNORE_SUFFIX)))
{
- log_debug("Added metadata title: %s\n", pFormatCtx->title);
- item->setMetadata(MT_KEYS[M_TITLE].upnp,
- sc->convert(pFormatCtx->title));
- }
- if (strlen(pFormatCtx->author) > 0)
- {
- log_debug("Added metadata author: %s\n", pFormatCtx->author);
- item->setMetadata(MT_KEYS[M_ARTIST].upnp,
- sc->convert(pFormatCtx->author));
- }
- if (strlen(pFormatCtx->album) > 0)
- {
- log_debug("Added metadata album: %s\n", pFormatCtx->album);
- item->setMetadata(MT_KEYS[M_ALBUM].upnp,
- sc->convert(pFormatCtx->album));
- }
- if (pFormatCtx->year > 0)
- {
- log_debug("Added metadata year: %d\n", pFormatCtx->year);
- item->setMetadata(MT_KEYS[M_DATE].upnp,
- sc->convert(String::from(pFormatCtx->year)));
- }
- if (strlen(pFormatCtx->genre) > 0)
- {
- log_debug("Added metadata genre: %s\n", pFormatCtx->genre);
- item->setMetadata(MT_KEYS[M_GENRE].upnp,
- sc->convert(pFormatCtx->genre));
- }
- if (strlen(pFormatCtx->comment) > 0)
- {
- log_debug("Added metadata comment: %s\n", pFormatCtx->comment);
- item->setMetadata(MT_KEYS[M_DESCRIPTION].upnp,
- sc->convert(pFormatCtx->comment));
- }
- if (pFormatCtx->track > 0)
- {
- log_debug("Added metadata track: %d\n", pFormatCtx->track);
- item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp,
- sc->convert(String::from(pFormatCtx->track)));
- }
+ value = e->value;
+
+ if (strcmp(e->key, "title") == 0)
+ {
+ log_debug("Identified metadata title: %s\n", e->value);
+ field = M_TITLE;
+ }
+ else if (strcmp(e->key, "artist") == 0)
+ {
+ log_debug("Identified metadata artist: %s\n", e->value);
+ field = M_ARTIST;
+ }
+ else if (strcmp(e->key, "album") == 0)
+ {
+ log_debug("Identified metadata album: %s\n", e->value);
+ field = M_ALBUM;
+ }
+ else if (strcmp(e->key, "date") == 0)
+ {
+ if ((value.length() == 4) && (value.toInt() > 0))
+ {
+ value = value + _("-01-01");
+ log_debug("Identified metadata date: %s\n", value.c_str());
+ }
+ /// \toto parse possible ISO8601 timestamp
+ field = M_DATE;
+ }
+ else if (strcmp(e->key, "genre") == 0)
+ {
+ log_debug("Identified metadata genre: %s\n", e->value);
+ field = M_GENRE;
+ }
+ else if (strcmp(e->key, "comment") == 0)
+ {
+ log_debug("Identified metadata comment: %s\n", e->value);
+ field = M_DESCRIPTION;
+ }
+ else if (strcmp(e->key, "track") == 0)
+ {
+ log_debug("Identified metadata track: %d\n", e->value);
+ field = M_TRACKNUMBER;
+ }
+ else
+ {
+ continue;
+ }
+
+ item->setMetadata(MT_KEYS[field].upnp, sc->convert(trim_string(value)));
+ }
}
// ffmpeg library calls
@@ -178,7 +187,7 @@ static void addFfmpegResourceFields(Ref<CdsItem> item,
for(i=0; i<pFormatCtx->nb_streams; i++)
{
AVStream *st = pFormatCtx->streams[i];
- if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO))
+ if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO))
{
if (st->codec->codec_tag > 0)
{
@@ -209,7 +218,7 @@ static void addFfmpegResourceFields(Ref<CdsItem> item,
*y = st->codec->height;
}
}
- if(st->codec->codec_type == CODEC_TYPE_AUDIO)
+ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
{
// Increase number of audiochannels
audioch++;
@@ -251,7 +260,7 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
int x = 0;
int y = 0;
- AVFormatContext *pFormatCtx;
+ AVFormatContext *pFormatCtx = NULL;
// Suppress all log messages
av_log_set_callback(FfmpegNoOutputStub);
@@ -260,14 +269,14 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
av_register_all();
// Open video file
- if (av_open_input_file(&pFormatCtx,
- item->getLocation().c_str(), NULL, 0, NULL) != 0)
+ if (avformat_open_input(&pFormatCtx,
+ item->getLocation().c_str(), NULL, NULL) != 0)
return; // Couldn't open file
// Retrieve stream information
- if (av_find_stream_info(pFormatCtx) < 0)
+ if (avformat_find_stream_info(pFormatCtx, NULL) < 0)
{
- av_close_input_file(pFormatCtx);
+ avformat_close_input(&pFormatCtx);
return; // Couldn't find stream information
}
// Add metadata using ffmpeg library calls
@@ -276,7 +285,7 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
addFfmpegResourceFields(item, pFormatCtx, &x, &y);
// Close the video file
- av_close_input_file(pFormatCtx);
+ avformat_close_input(&pFormatCtx);
}
Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-src_singleton_h,v 1.1 2017/05/19 13:19:59 espie Exp $
pre-declare, not enough to shup up all warnings
Index: src/singleton.h
--- src/singleton.h.orig
+++ src/singleton.h
@@ -58,6 +58,8 @@ class SingletonManager : public zmm::Object (protected
template <class T>
class Singleton : public zmm::Object
{
+protected:
+ static zmm::Ref<Mutex> mutex;
public:
static zmm::Ref<T> getInstance()
{
@@ -87,7 +89,6 @@ class Singleton : public zmm::Object (protected)
virtual void init() { }
virtual void shutdown() { }
- static zmm::Ref<Mutex> mutex;
static zmm::Ref<T> instance;
static bool singletonActive;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_storage_sql_storage_cc,v 1.1 2013/08/16 16:13:44 naddy Exp $
--- src/storage/sql_storage.cc.orig Thu Mar 25 16:28:10 2010
+++ src/storage/sql_storage.cc Fri Aug 16 18:08:26 2013
@@ -2133,7 +2133,7 @@ void SQLStorage::autoscanUpdateLM(Ref<AutoscanDirector
throw _Exception(_("autoscanUpdateLM called with adir with illegal objectID and location"));
}
*/
- log_debug("id: %d; last_modified: %d\n", adir->getStorageID(), adir->getPreviousLMT());
+ log_debug("id: %d; last_modified: %lld\n", adir->getStorageID(), (long long)adir->getPreviousLMT());
Ref<StringBuffer> q(new StringBuffer());
*q << "UPDATE " << TQ(AUTOSCAN_TABLE)
<< " SET " << TQ("last_modified") << '=' << quote(adir->getPreviousLMT())

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-src_storage_sql_storage_h,v 1.1 2013/08/16 16:13:44 naddy Exp $
--- src/storage/sql_storage.h.orig Thu Mar 25 15:58:06 2010
+++ src/storage/sql_storage.h Fri Aug 16 18:04:25 2013
@@ -79,6 +79,7 @@ class SQLStorage : protected Storage (public)
virtual zmm::String quote(unsigned int val) = 0;
virtual zmm::String quote(long val) = 0;
virtual zmm::String quote(unsigned long val) = 0;
+ virtual zmm::String quote(long long val) = 0;
virtual zmm::String quote(bool val) = 0;
virtual zmm::String quote(char val) = 0;
virtual zmm::Ref<SQLResult> select(const char *query, int length) = 0;

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-src_storage_sqlite3_sqlite3_storage_h,v 1.1 2013/08/16 16:13:44 naddy Exp $
--- src/storage/sqlite3/sqlite3_storage.h.orig Thu Mar 25 15:58:06 2010
+++ src/storage/sqlite3/sqlite3_storage.h Fri Aug 16 18:06:02 2013
@@ -158,6 +158,7 @@ class Sqlite3Storage : private SQLStorage (private)
virtual inline zmm::String quote(unsigned int val) { return zmm::String::from(val); }
virtual inline zmm::String quote(long val) { return zmm::String::from(val); }
virtual inline zmm::String quote(unsigned long val) { return zmm::String::from(val); }
+ virtual inline zmm::String quote(long long val) { return zmm::String::from(val); }
virtual inline zmm::String quote(bool val) { return zmm::String(val ? '1' : '0'); }
virtual inline zmm::String quote(char val) { return quote(zmm::String(val)); }
virtual zmm::Ref<SQLResult> select(const char *query, int length);

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-tombupnp_threadutil_src_ThreadPool_c,v 1.4 2013/01/27 14:13:30 brad Exp $
--- tombupnp/threadutil/src/ThreadPool.c.orig Thu Mar 25 10:58:13 2010
+++ tombupnp/threadutil/src/ThreadPool.c Sun Jan 27 08:51:59 2013
@@ -141,7 +141,8 @@ SetPolicyType( PolicyType in )
static int
SetPriority( ThreadPriority priority )
{
-#if defined(HAVE_SCHED_GET_PRIORITY_MIN) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
+ && defined(HAVE_SCHED_GET_PRIORITY_MIN) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
int currentPolicy;
int minPriority = 0;
int maxPriority = 0;
@@ -372,8 +373,8 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff
gettimeofday( &t, NULL );
#if defined(WIN32)
srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ).p );
-#elif defined(__FreeBSD__) || defined (__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
- srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ) );
+#elif defined(HAVE_ARC4RANDOM)
+ srand( arc4random() );
#else
srand( ( unsigned int )(t.tv_usec/1000) + ithread_get_current_thread_id( ) );
#endif

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-tombupnp_upnp_src_genlib_net_http_webserver_c,v 1.1 2017/05/19 13:19:59 espie Exp $
gnu89 inlines
Index: tombupnp/upnp/src/genlib/net/http/webserver.c
--- tombupnp/upnp/src/genlib/net/http/webserver.c.orig
+++ tombupnp/upnp/src/genlib/net/http/webserver.c
@@ -310,7 +310,7 @@ search_extension( IN const char *extension,
* 0 - On Sucess
* UPNP_E_OUTOF_MEMORY - on memory allocation failures
************************************************************************/
-XINLINE int
+int
get_content_type( IN const char *filename,
OUT DOMString * content_type )
{

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-tombupnp_upnp_src_genlib_net_uri_uri_c,v 1.1 2013/01/27 10:06:50 sthen Exp $
Fix double-slash issue with some samsung tv firmware;
http://sourceforge.net/tracker/index.php?func=detail&aid=3532724&group_id=129766&atid=715782
--- tombupnp/upnp/src/genlib/net/uri/uri.c.orig Thu Mar 25 14:58:12 2010
+++ tombupnp/upnp/src/genlib/net/uri/uri.c Sat Jan 26 13:22:12 2013
@@ -1042,7 +1042,8 @@ parse_uri( const char *in,
out->path_type = REL_PATH;
}
- if( ( ( begin_hostport + 1 ) < max ) && ( in[begin_hostport] == '/' )
+ //parse hostport only if scheme was found
+ if( ( begin_hostport > 0 ) && ( ( begin_hostport + 1 ) < max ) && ( in[begin_hostport] == '/' )
&& ( in[begin_hostport + 1] == '/' ) ) {
begin_hostport += 2;
@@ -1059,6 +1060,12 @@ parse_uri( const char *in,
out->hostport.text.size = 0;
out->hostport.text.buff = 0;
begin_path = begin_hostport;
+
+ //remove excessive leading slashes (fix for Samsung Smart TV 2012)
+ while( ( ( begin_path + 1 ) < max ) && ( in[begin_path] == '/' ) && ( in[begin_path + 1] == '/') ) {
+ begin_path++;
+ }
+
}
begin_fragment =

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-tombupnp_upnp_src_uuid_upnp_md5_c,v 1.1 2017/05/19 13:19:59 espie Exp $
XXX real size bug!
Index: tombupnp/upnp/src/uuid/upnp_md5.c
--- tombupnp/upnp/src/uuid/upnp_md5.c.orig
+++ tombupnp/upnp/src/uuid/upnp_md5.c
@@ -137,7 +137,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5

View File

@ -1,4 +0,0 @@
MediaTomb is an open source (GPL) UPnP MediaServer with a nice web
user interface, it allows you to stream your digital media through
your home network and listen to/watch it on a variety of UPnP
compatible devices.

View File

@ -1,114 +0,0 @@
@comment $OpenBSD: PLIST,v 1.2 2013/01/27 10:06:50 sthen Exp $
@newgroup _mediatomb:656
@newuser _mediatomb:656:_mediatomb:daemon:Mediatomb Account:/var/empty:/bin/sh
@extra /var/log/mediatomb
@extraunexec rm -rf /var/db/mediatomb/*
@bin bin/mediatomb
@man man/man1/mediatomb.1
share/examples/mediatomb/
share/examples/mediatomb/config.xml
@mode 770
@owner _mediatomb
@group wheel
@sample ${SYSCONFDIR}/mediatomb/
@sample /var/db/mediatomb/
@mode 660
@sample ${SYSCONFDIR}/mediatomb/config.xml
@mode
@owner
@group
share/mediatomb/
share/mediatomb/js/
share/mediatomb/js/common.js
share/mediatomb/js/import.js
share/mediatomb/js/playlists.js
share/mediatomb/mappings.xml
share/mediatomb/mysql.sql
share/mediatomb/sqlite3.sql
share/mediatomb/web/
share/mediatomb/web/cds.xml
share/mediatomb/web/cm.xml
share/mediatomb/web/disabled.html
share/mediatomb/web/favicon.ico
share/mediatomb/web/icons/
share/mediatomb/web/icons/add_as_autoscan.png
share/mediatomb/web/icons/autoscan_inotify_config_folder_open.png
share/mediatomb/web/icons/autoscan_inotify_folder_open.png
share/mediatomb/web/icons/autoscan_timed_config_folder_open.png
share/mediatomb/web/icons/autoscan_timed_folder_open.png
share/mediatomb/web/icons/blank.gif
share/mediatomb/web/icons/blank.png
share/mediatomb/web/icons/document-new.png
share/mediatomb/web/icons/film.png
share/mediatomb/web/icons/folder_new.png
share/mediatomb/web/icons/folder_open.png
share/mediatomb/web/icons/go-first.png
share/mediatomb/web/icons/go-last.png
share/mediatomb/web/icons/go-next.png
share/mediatomb/web/icons/go-previous.png
share/mediatomb/web/icons/mediatomb.png
share/mediatomb/web/icons/mt-icon120.bmp
share/mediatomb/web/icons/mt-icon120.jpg
share/mediatomb/web/icons/mt-icon120.png
share/mediatomb/web/icons/mt-icon32.bmp
share/mediatomb/web/icons/mt-icon32.jpg
share/mediatomb/web/icons/mt-icon32.png
share/mediatomb/web/icons/mt-icon48.bmp
share/mediatomb/web/icons/mt-icon48.jpg
share/mediatomb/web/icons/mt-icon48.png
share/mediatomb/web/icons/nanotree/
share/mediatomb/web/icons/nanotree/images/
share/mediatomb/web/icons/nanotree/images/autoscan_inotify_config_folder_closed.png
share/mediatomb/web/icons/nanotree/images/autoscan_inotify_config_folder_open.png
share/mediatomb/web/icons/nanotree/images/autoscan_inotify_folder_closed.png
share/mediatomb/web/icons/nanotree/images/autoscan_inotify_folder_open.png
share/mediatomb/web/icons/nanotree/images/autoscan_timed_config_folder_closed.png
share/mediatomb/web/icons/nanotree/images/autoscan_timed_config_folder_open.png
share/mediatomb/web/icons/nanotree/images/autoscan_timed_folder_closed.png
share/mediatomb/web/icons/nanotree/images/autoscan_timed_folder_open.png
share/mediatomb/web/icons/nanotree/images/folder_closed.png
share/mediatomb/web/icons/nanotree/images/folder_open.png
share/mediatomb/web/icons/nanotree/images/lastnode.png
share/mediatomb/web/icons/nanotree/images/line.png
share/mediatomb/web/icons/nanotree/images/minus.png
share/mediatomb/web/icons/nanotree/images/minus_last.png
share/mediatomb/web/icons/nanotree/images/minus_last_no_root.png
share/mediatomb/web/icons/nanotree/images/minus_no_root.png
share/mediatomb/web/icons/nanotree/images/plus.png
share/mediatomb/web/icons/nanotree/images/plus_last.png
share/mediatomb/web/icons/nanotree/images/plus_last_no_root.png
share/mediatomb/web/icons/nanotree/images/plus_no_root.png
share/mediatomb/web/icons/nanotree/images/t.png
share/mediatomb/web/icons/nanotree/images/t_no_root.png
share/mediatomb/web/icons/nanotree/images/white.png
share/mediatomb/web/icons/remove_all.png
share/mediatomb/web/icons/remove_autoscan.png
share/mediatomb/web/icons/remove_this.png
share/mediatomb/web/icons/status.png
share/mediatomb/web/icons/status_loading.png
share/mediatomb/web/icons/status_updates_pending.png
share/mediatomb/web/icons/stock-add.png
share/mediatomb/web/icons/stock_edit.png
share/mediatomb/web/icons/stock_exit.png
share/mediatomb/web/index.html
share/mediatomb/web/js/
share/mediatomb/web/js/auth.js
share/mediatomb/web/js/autoscan.js
share/mediatomb/web/js/icons.js
share/mediatomb/web/js/iepngfix.htc
share/mediatomb/web/js/items.js
share/mediatomb/web/js/md5.js
share/mediatomb/web/js/nanotree.js
share/mediatomb/web/js/prototype.js
share/mediatomb/web/js/tasks.js
share/mediatomb/web/js/tools.js
share/mediatomb/web/js/tree.js
share/mediatomb/web/left.html
share/mediatomb/web/main.css
share/mediatomb/web/mr_reg.xml
share/mediatomb/web/right.html
share/mediatomb/web/std_treelook.css
share/mediatomb/web/top.html
share/mediatomb/web/topleft.html
share/mediatomb/web/topright.html
@rcscript ${RCDIR}/mediatomb

View File

@ -1,10 +0,0 @@
#!/bin/ksh
#
# $OpenBSD: mediatomb.rc,v 1.2 2018/01/11 19:27:04 rpe Exp $
daemon="${TRUEPREFIX}/bin/mediatomb -d"
daemon_flags="-c ${SYSCONFDIR}/mediatomb/config.xml -u _mediatomb -g _mediatomb -l /var/log/mediatomb"
. /etc/rc.d/rc.subr
rc_cmd $1