Browse Source

libmms: Upgrade to 0.6.4, remove uneeded patch, fix build dependencies, add myself as pkg maintainer

Signed-off-by: Ted Hess <thess@kitschensync.net>
lilik-openwrt-22.03
Ted Hess 11 years ago
parent
commit
fa3a88b23f
2 changed files with 7 additions and 105 deletions
  1. +7
    -4
      libs/libmms/Makefile
  2. +0
    -101
      libs/libmms/patches/00-remove_iconv_dependency.patch

+ 7
- 4
libs/libmms/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2010-2011 OpenWrt.org
# Copyright (C) 2010-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,12 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libmms
PKG_VERSION:=0.6
PKG_RELEASE:=1
PKG_VERSION:=0.6.4
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libmms
PKG_MD5SUM:=650ad04a4c8bd79246390b81b29680b6
PKG_MD5SUM:=d6b665b335a6360e000976e770da7691
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING.LIB
@ -30,6 +31,7 @@ define Package/libmms
DEPENDS:=+glib2
TITLE:=MMS stream protocol library
URL:=http://libmms.sourceforge.net
DEPENDS:=$(ICONV_DEPENDS)
endef
define Package/libmms/description
@ -40,6 +42,7 @@ define Package/libmms/description
endef
TARGET_CFLAGS += $(FPIC)
TARGET_LDFLAGS += $(if $(ICONV_FULL),-liconv)
define Build/Configure
(cd $(PKG_BUILD_DIR); ./autogen.sh );


+ 0
- 101
libs/libmms/patches/00-remove_iconv_dependency.patch View File

@ -1,101 +0,0 @@
diff -burN libmms-0.6.original/src/mms.c libmms-0.6.modified/src/mms.c
--- libmms-0.6.original/src/mms.c 2010-05-31 12:13:04.000000000 +0200
+++ libmms-0.6.modified/src/mms.c 2012-06-25 12:44:06.000000000 +0200
@@ -40,7 +40,6 @@
#include <errno.h>
#include <stdlib.h>
#include <time.h>
-#include <iconv.h>
/********** logging **********/
#define lprintf(...) if (getenv("LIBMMS_DEBUG")) fprintf(stderr, __VA_ARGS__)
@@ -447,17 +446,21 @@
return 1;
}
-static int string_utf16(iconv_t url_conv, char *dest, char *src, int dest_len)
+static int string_utf16(char *dest, char *src, int dest_len)
{
char *ip = src, *op = dest;
size_t ip_len = strlen(src);
- size_t op_len = dest_len - 2; /* reserve 2 bytes for 0 termination */
- if (iconv(url_conv, &ip, &ip_len, &op, &op_len) == (size_t)-1) {
+ if (2 * ip_len + 2 > dest_len) {
lprintf("mms: Error converting uri to unicode: %s\n", strerror(errno));
return 0;
}
+ while (ip_len--) {
+ *op++ = *ip++;
+ *op++ = 0x00;
+ }
+
/* 0 terminate the string */
*op++ = 0;
*op++ = 0;
@@ -1012,7 +1015,6 @@
*/
/* FIXME: got somewhat broken during xine_stream_t->(void*) conversion */
mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth) {
- iconv_t url_conv = (iconv_t)-1;
mms_t *this;
int res;
uint32_t openid;
@@ -1071,12 +1073,6 @@
goto fail;
}
- url_conv = iconv_open("UTF-16LE", "UTF-8");
- if (url_conv == (iconv_t)-1) {
- lprintf("mms: could not get iconv handle to convert url to unicode\n");
- goto fail;
- }
-
/*
* let the negotiations begin...
*/
@@ -1088,7 +1084,7 @@
mms_gen_guid(this->guid);
sprintf(this->str, "NSPlayer/7.0.0.1956; {%s}; Host: %s", this->guid,
this->host);
- res = string_utf16(url_conv, this->scmd_body + command_buffer.pos, this->str,
+ res = string_utf16(this->scmd_body + command_buffer.pos, this->str,
CMD_BODY_LEN - command_buffer.pos);
if(!res)
goto fail;
@@ -1117,7 +1113,7 @@
mms_buffer_put_32 (&command_buffer, 0x00000000);
mms_buffer_put_32 (&command_buffer, 0x00989680);
mms_buffer_put_32 (&command_buffer, 0x00000002);
- res = string_utf16(url_conv, this->scmd_body + command_buffer.pos,
+ res = string_utf16(this->scmd_body + command_buffer.pos,
"\\\\192.168.0.129\\TCP\\1037",
CMD_BODY_LEN - command_buffer.pos);
if(!res)
@@ -1156,7 +1152,7 @@
mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */
mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */
- res = string_utf16(url_conv, this->scmd_body + command_buffer.pos,
+ res = string_utf16(this->scmd_body + command_buffer.pos,
this->uri, CMD_BODY_LEN - command_buffer.pos);
if(!res)
goto fail;
@@ -1266,7 +1262,6 @@
}
}
- iconv_close(url_conv);
lprintf("mms: connect: passed\n");
return this;
@@ -1280,8 +1275,6 @@
gnet_uri_delete(this->guri);
if (this->uri)
free(this->uri);
- if (url_conv != (iconv_t)-1)
- iconv_close(url_conv);
free (this);
return NULL;

Loading…
Cancel
Save