Okay, I've started adding support for SAP but have come up against an issue when creating a new function in the libvlcjni.c file.
Code: Select all
void Java_org_videolan_libvlc_LibVLC_mediaDiscovererInit(JNIEnv *env, jobject thiz, jlong instance)
{
/* Release previous media discoverer, if any */
releaseMediaDiscoverer(env, thiz);
/* Create a media discoverer environment */
libvlc_media_discoverer_t *mp = libvlc_media_discoverer_new_from_name((libvlc_instance_t*)(intptr_t)instance, "sap");
jobject myJavaLibVLC = (*env)->NewGlobalRef(env, thiz);
/* Connect the event manager */
libvlc_event_manager_t *ev = libvlc_media_discoverer_event_manager(mp);
static const libvlc_event_type_t mp_events[] = {
libvlc_MediaDiscovererStarted,
libvlc_MediaDiscovererEnded
};
for(int i = 0; i < (sizeof(mp_events) / sizeof(*mp_events)); i++)
libvlc_event_attach(ev, mp_events[i], vlc_media_discoverer_event_callback, myVm);
/* Keep a pointer to this media discoverer */
setLong(env, thiz, "mInternalMediaDiscovererInstance", (jlong)(intptr_t)mp);
}
When the call to
Code: Select all
libvlc_media_discoverer_new_from_name
is made, the following log messages appear:-
"core services discovery: looking for services_discovery module matching "sap": 0 candidates"
"core services discovery: no services_discovery modules"
"core services discovery: no suitable services discovery module"
Is there someting I should be doing with the libVLC library in use by the Android app in order to add the required services discovery ?
Thanks.