Browse Source

minidlna: Update to latest upstream (2016-09-29)

Updated to latest commit upstream as the latest tagged version didn't get
a tarball release at all. Includes various fixes and also support for
never versions of ffmpeg.

Also added a sorting patch for Panasonic TVs.
Source: c8245740c3

Various improvements to package Makefile.
Source/Template: c389dcdc02/multimedia/minidlna/Makefile

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
lilik-openwrt-22.03
Daniel Engberg 8 years ago
parent
commit
ea6598282f
4 changed files with 128 additions and 28 deletions
  1. +10
    -9
      multimedia/minidlna/Makefile
  2. +92
    -0
      multimedia/minidlna/patches/001-group-videos-by-directory-for-panasonic-tvs.patch
  3. +26
    -0
      multimedia/minidlna/patches/002-dont-build-po-files.patch
  4. +0
    -19
      multimedia/minidlna/patches/010-libav-fix.patch

+ 10
- 9
multimedia/minidlna/Makefile View File

@ -8,17 +8,23 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
PKG_VERSION:=1.1.5
PKG_VERSION:=1.1.6+git-8a996b
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/minidlna
PKG_MD5SUM:=1970e553a1eb8a3e7e302e2ce292cbc4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=http://git.code.sf.net/p/minidlna/git
PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=8a996b4b624ef45538a5de10730b8e94c55e7768
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=fddbb7c96b40e335a251b919ff5c674519f266a59b8a43011761ba952c0df1b6
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
PKG_MAINTAINER:=Knyazkov Dmitry <medavedik@gmail.com>
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=0
PKG_BUILD_DEPENDS:=util-linux
@ -45,11 +51,6 @@ define Package/minidlna/conffiles
endef
TARGET_CPPFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/FLAC \
-I$(STAGING_DIR)/usr/include/libexif \
-I$(STAGING_DIR)/usr/include/uuid \
-I$(STAGING_DIR)/usr/include/vorbis \
-I$(ICONV_PREFIX)/include \
-I$(INTL_PREFIX)/include \
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \


+ 92
- 0
multimedia/minidlna/patches/001-group-videos-by-directory-for-panasonic-tvs.patch View File

@ -0,0 +1,92 @@
From c8245740c3a8699cfe7d7e5aa0d427b931018ad5 Mon Sep 17 00:00:00 2001
From: Yusuke Yanbe <y.yanbe@gmail.com>
Date: Mon, 4 Jul 2016 08:20:46 +0900
Subject: [PATCH] Add support for grouping videos by directory for Panasonic
TVs
---
upnpsoap.c | 24 +++++++++++++++++++-----
upnpsoap.h | 5 ++++-
2 files changed, 23 insertions(+), 6 deletions(-)
--- a/upnpsoap.c
+++ b/upnpsoap.c
@@ -1052,6 +1052,15 @@ callback(void *args, int argc, char **ar
add_res(size, duration, bitrate, sampleFrequency, nrAudioChannels,
resolution, dlna_buf, mime, detailID, ext, passed_args);
}
+
+ DPRINTF(E_DEBUG, L_HTTP, "Title: %s - %d Returned / %d childCount\n",
+ title, passed_args->returned, passed_args->childCount);
+
+ ret = strcatf(str, "&lt;pxn:groupTopFlag&gt;%d&lt;/pxn:groupTopFlag&gt;"
+ "&lt;pxn:groupID&gt;%s&lt;/pxn:groupID&gt;"
+ "&lt;pxn:groupTitle&gt;%s&lt;/pxn:groupTitle&gt;"
+ "&lt;pxn:groupMemberNum&gt;%d&lt;/pxn:groupMemberNum&gt;",
+ passed_args->returned == passed_args->childCount, parent, passed_args->parentTitle, passed_args->childCount);
break;
case ESamsungSeriesCDE:
case ELGDevice:
@@ -1314,8 +1323,11 @@ BrowseContentDirectory(struct upnphttp *
if (!where[0])
sqlite3_snprintf(sizeof(where), where, "PARENT_ID = '%q'", ObjectID);
- if (!totalMatches)
+ if (!totalMatches) {
totalMatches = get_child_count(ObjectID, magic);
+ args.childCount = totalMatches;
+ args.parentTitle = sql_get_text_field(db, "SELECT d.TITLE FROM OBJECTS o LEFT JOIN DETAILS d ON (d.ID = o.DETAIL_ID) WHERE OBJECT_ID='%q'", ObjectID);
+ }
ret = 0;
if (SortCriteria && !orderBy)
{
@@ -1354,14 +1366,16 @@ BrowseContentDirectory(struct upnphttp *
SoapError(h, 709, "Unsupported or invalid sort criteria");
goto browse_error;
}
-
sql = sqlite3_mprintf("SELECT %s, %s, %s, " COLUMNS
"from OBJECTS o left join DETAILS d on (d.ID = o.DETAIL_ID)"
- " where %s %s limit %d, %d;",
+ " where %s order by d.date limit %d, %d;",
objectid_sql, parentid_sql, refid_sql,
- where, THISORNUL(orderBy), StartingIndex, RequestedCount);
+ where, StartingIndex, RequestedCount);
DPRINTF(E_DEBUG, L_HTTP, "Browse SQL: %s\n", sql);
ret = sqlite3_exec(db, sql, callback, (void *) &args, &zErrMsg);
+ if (args.parentTitle) {
+ sqlite3_free(args.parentTitle);
+ }
}
if( (ret != SQLITE_OK) && (zErrMsg != NULL) )
{
@@ -1795,7 +1809,7 @@ SearchContentDirectory(struct upnphttp *
(*ContainerID == '*') ? NULL :
sqlite3_mprintf("UNION ALL " SELECT_COLUMNS
"from OBJECTS o left join DETAILS d on (d.ID = o.DETAIL_ID)"
- " where OBJECT_ID = '%q' and (%s) ", ContainerID, where),
+ " where OBJECT_ID = '%q' and (%s) ORDER BY d.date", ContainerID, where),
orderBy, StartingIndex, RequestedCount);
DPRINTF(E_DEBUG, L_HTTP, "Search SQL: %s\n", sql);
ret = sqlite3_exec(db, sql, callback, (void *) &args, &zErrMsg);
--- a/upnpsoap.h
+++ b/upnpsoap.h
@@ -27,7 +27,8 @@
#define CONTENT_DIRECTORY_SCHEMAS \
" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"" \
" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\"" \
- " xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\""
+ " xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"" \
+ " xmlns:pxn=\"urn:schemas-panasonic-com:pxn\""
#define DLNA_NAMESPACE \
" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\""
#define PV_NAMESPACE \
@@ -39,6 +40,8 @@ struct Response
int start;
int returned;
int requested;
+ int childCount;
+ char *parentTitle;
int iface;
uint32_t filter;
uint32_t flags;

+ 26
- 0
multimedia/minidlna/patches/002-dont-build-po-files.patch View File

@ -0,0 +1,26 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
-SUBDIRS=po
+SUBDIRS=
sbin_PROGRAMS = minidlnad
check_PROGRAMS = testupnpdescgen
--- a/configure.ac
+++ b/configure.ac
@@ -633,6 +633,8 @@ case "$target_os" in
esac
-AC_OUTPUT([ po/Makefile.in
-Makefile
-])
+# AC_OUTPUT([ po/Makefile.in
+# Makefile
+# ])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT

+ 0
- 19
multimedia/minidlna/patches/010-libav-fix.patch View File

@ -1,19 +0,0 @@
--- a/libav.h
+++ b/libav.h
@@ -167,7 +167,7 @@
static inline int
lav_is_thumbnail_stream(AVStream *s, uint8_t **data, int *size)
{
-#if LIBAVFORMAT_VERSION_INT >= ((54<<16)+(6<<8))
+/*if LIBAVFORMAT_VERSION_INT >= ((54<<16)+(6<<8))
if (s->disposition & AV_DISPOSITION_ATTACHED_PIC &&
s->codec->codec_id == AV_CODEC_ID_MJPEG)
{
@@ -177,6 +177,6 @@
*size = s->attached_pic.size;
return 1;
}
-#endif
+endif*/
return 0;
}

Loading…
Cancel
Save