Tuesday, November 25, 2008

CyberLink for C v2.3 : I have released the new package of the latest source codes as v2.3 today.

From this release, I have merged some standards implementations such as UPnP/AV into the 'std' directory. The UPnP/AV package was called as Cyber Media Gate. I will deprecate the separate package.

For developers for MacOSX, I have released the framework package for MacOSX too as CyberLink for MacOSX.

The following are major changes from v2.2. Please check it :-)
2008-10-31  Satoshi Konno 
* v2.3
* Added UPnP/AV package in std/av as a sample implementation.
* Added the following classes of Objective-C for MacOSX and iPhone
CGUpnpAvContainer
CGUpnpAvContentDirectory
CGUpnpAvContentManager
CGUpnpAvController
CGUpnpAvItem
CGUpnpAvObject
CGUpnpAvRenderer
CGUpnpAvResource
CGUpnpAvRoot
CGUpnpAvServer

2008-09-26 Satoshi Konno
* Fixed the following methods correctly
cg_upnp_device_setmanufacture() -> cg_upnp_device_setmanufacturer()
cg_upnp_device_getmanufacture() -> cg_upnp_device_getmanufacturer()
cg_upnp_device_setmanufactureurl() -> cg_upnp_device_setmanufacturerurl()
cg_upnp_device_getmanufactureurl() -> cg_upnp_device_getmanufacturerurl()
* Fixed cg_net_uri_unescapestring() to compile normally on WIN32 platforms.
* Changed to include in on XCode as default.
* Enabled SO_REUSEPORT in cg_socket_setreuseaddress() on MacOSX and iPhone platforms.
* Disabled signal in cg_thread_stop_with_cond() on MacOSX and iPhone platforms.
* Enabled libxml2 as default using TARGET_OS_IPHONE macro on iPhone and iPhone-Simulator.
* Added cg_xml_node_copy().
* Changed cg_upnp_device_ssdpmessagereceived() to return the response more shortly.
* Fixed cg_net_selectaddr() to get a correct address on iPhone and iPhone-Simulator.

2008-08-21 Satoshi Konno
* Fixed some warnings using GCC v4.0.1.
* Added the following macros.
cg_string_getintvalue()
cg_string_getlongvalue()
cg_xml_node_getintvalue()
cg_xml_node_getlongvalue()
cg_xml_node_getchildnodeintvalue()
cg_xml_node_getchildnodelongvalue()
* Changed the following functions to return an integer value instead of a string.
cg_upnp_icon_getwidth()
cg_upnp_icon_getheight()
cg_upnp_icon_getdepth()

Comments:
There appears to be a bug with resubscribing due to event loss in ccontrolpoint_http_server.c

If the events get out of order or an event is lost (how does this happen with tcp?) an unsubscribe/subscribe is performed and a new SID is assigned.

The bug is that any handler that had been registered with the control point doesn't get alerted to the fact that the SID has changed.

Any thoughts as to the best way to alert the event handler that had been registered with the control point that the SID has changed du to the unsub/sub.?
 
I use SVN to download CLINKC and do a bootstrap. The following error messages show up:
configure.in:39: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:40: error: possibly undefined macro: AM_CONFIG_HEADER
configure.in:62: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.in:101: error: possibly undefined macro: AM_CONDITIONAL

My system is Ubuntu 8.04

After that, I do "configure", then I see following error messages:
./configure: line 1756: syntax error near unexpected token `clinkc,'
./configure: line 1756: `AM_INIT_AUTOMAKE(clinkc, 2.3)'


Do you know why? Do I do something wrong?

thanks,

Henry
 
There appears to be two more bugs when building for WIN32:
1) the use of a mutex versus semaphore for the control point lock - causes events to be delivered out of order in heavy event load scenarios...
2) the ccond implementation is using seconds while WaitForSingleObject expects milliseconds, causing the expiry thread to run 1000 times faster than expected...

Still awaiting ideas on how to fix the stack resubscribing w/o notifying the subscribers (see previous post)...
 
> I use SVN to download CLINKC and do a bootstrap.
> The following error messages show up

Please install automake and libtools to run the boostrap command :-)
 
Hi Steve,

I will check your problem. Please wait for a while :-)
 
As an FYI, here are the WIN32 patches so far:

--- clinkc/src/cybergarage/net/curi.c.orig 2008-10-09 12:38:59.979375000 -0600
+++ clinkc/src/cybergarage/net/curi.c 2008-10-09 12:38:33.463750000 -0600
@@ -399,7 +399,7 @@
long hex;
unsigned char c;
#endif
- int idx = 0
+ int idx = 0;
#if defined(CG_USE_NET_URI_ESCAPESTRING_SKIP)
int tmpIdx = 0;
#endif
--- clinkc/src/cybergarage/net/csocket.c.orig 2008-06-04 16:00:23.000000000 -0600
+++ clinkc/src/cybergarage/net/csocket.c 2008-11-24 17:40:40.234375000 -0700
@@ -325,7 +325,7 @@
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(ITRON)
return (sock->id != INVALID_SOCKET) ? TRUE: FALSE;
#else
- return (0 < sock->id) ? TRUE : FALSE;
+ return (0 < (int)sock->id) ? TRUE : FALSE; /* MinGW: sock->id==unsigned */
#endif
}

--- clinkc/src/cybergarage/util/cmutex.c 2007-10-22 03:25:00.062500000 -0600
+++ clinkc/src/cybergarage/util/cmutex.c 2009-01-28 08:23:25.375000000 -0700
@@ -40,7 +40,7 @@
if ( NULL != mutex )
{
#if defined(WIN32) && !defined(ITRON)
- mutex->mutexID = CreateMutex(NULL, FALSE, NULL);
+ mutex->mutexID = CreateSemaphore(NULL, 1, 1, NULL);
#elif defined(BTRON)
mutex->mutexID = cre_sem(1, SEM_EXCL);
#elif defined(ITRON)
@@ -335,7 +335,7 @@
cg_log_debug_l4("Entering...\n");

#if defined(WIN32) && !defined(ITRON)
- ReleaseMutex(mutex->mutexID);
+ ReleaseSemaphore(mutex->mutexID, 1, NULL);
#elif defined(BTRON)
sig_sem(mutex->mutexID);
#elif defined(ITRON)
--- clinkc/src/cybergarage/util/ccond.c 2007-10-22 03:25:00.062500000 -0600
+++ clinkc/src/cybergarage/util/ccond.c 2009-02-04 16:05:06.734375000 -0700
@@ -98,7 +98,7 @@
BOOL cg_cond_wait(CgCond *cond, CgMutex *mutex, unsigned long timeout)
{
#if defined(WIN32) && !defined(ITRON)
- DWORD timeout_s = (timeout == 0 ? INFINITE : timeout);
+ DWORD timeout_s = (timeout == 0 ? INFINITE : timeout*1000);
cg_mutex_unlock(mutex);
WaitForSingleObject(cond->condID, timeout_s);
cg_mutex_lock(mutex);


Thanks!
Steve
 
I am thinking to modify upnpdump to a command-based control point, Basically, I can use it to select a MediaServer and a song and then select a mediarender and pass a Song URI to it. Then I can issue "Play"/"Stop" to the mediarender.

Is this difficult to do? Can you give me some hints how to do it?

Henry
 
Hi,

> Is this difficult to do?
> Can you give me some hints
> how to do it?

It is very easy to control DRM :-)

The following source code is wrote
using Objective-C to control DRM,
but please check it :-)

http://clinkc.svn.sourceforge.net/viewvc/clinkc/trunk/std/av/wrapper/objc/CyberLink/CGUpnpAvRenderer.m?revision=434&view=markup
 
I read CGUpnpAvRenderer.m and since I know nothing about Objective-C, so I just give a guess. In this filem you implement 3 functions, set transportURI, play and stop and these 3 functions are used to control a mediarenderer from a control point. Is this correct?
What is the easy way to convert Objective-C to a regular C?

Thanks,

Henry
 
We're trying to compile clinkcc on ubuntu 9.04. When we do
>./configure --enable-expat
we get error "CyberLink needs Expat 1.95 or later" although we have installed "libexpat1-dev_2.0.1.4_i386.deb" (and "libexpat1-2.0.1.4_i386.deb")
For example: the expat.h definitely exist in /usr/include but still we get the output lines
>checking expat.h usability... no
>checking expat.h presence... no
>checking for expat.h... no

Can you help us out?
 
How can I use this in an iphone xcode project? It doesn't build:

"_XML_ParserCreate", referenced from:
_cg_xml_parse in cxml_parser_expat.o
"_XML_SetElementHandler", referenced from:
_cg_xml_parse in cxml_parser_expat.o
"_XML_SetCharacterDataHandler", referenced from:
_cg_xml_parse in cxml_parser_expat.o
"_XML_SetUserData", referenced from:
_cg_xml_parse in cxml_parser_expat.o
"_XML_ParserFree", referenced from:
_cg_xml_parse in cxml_parser_expat.o
"_XML_Parse", referenced from:
_cg_xml_parse in cxml_parser_expat.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (6 errors)

Any help appreciated
 
I think that on "subscribe" the service sends notification of the values of eventing state variables to ALL subscribers, not just the new subscriber. Is that true? If so, why?

Thank you.
 
hey.. i have installed the clinkc-2.3 on my fedora.. but i dont see any executable file made.. so how do i run it..?
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?