Page 1 of 1

SAP for VLC on Android

Posted: 15 Nov 2013 13:10
by Jonathan Websdale
I'm interested in adding SAP streams to VLC for Android and am aware of the recent addition of the feature in the iOS development. Are there currently plans to add SAP support to the Android client (if so when) or is this work already under way ?

Re: SAP for VLC on Android

Posted: 16 Nov 2013 03:55
by edwardw
Does not exist so far.

Re: SAP for VLC on Android

Posted: 18 Nov 2013 13:25
by Jonathan Websdale
Okay, I understand that it's not currently implemented but need to make this feature available so was wanting to check on the status of any developments around the area of connection to network streams before embarking on attempting to make the necessary additions.

Re: SAP for VLC on Android

Posted: 19 Nov 2013 00:12
by Jean-Baptiste Kempf
It should not be too hard to activate though... A bit time consuming though...

Re: SAP for VLC on Android

Posted: 13 Jan 2014 16:32
by Jonathan Websdale
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.

Re: SAP for VLC on Android

Posted: 13 Jan 2014 17:42
by Jonathan Websdale
Okay, fixed it myself.
Needed to remove 'sap' from the blacklist in the find_modules.sh script. Just recompiled and now correctly opened ports on the appropriate multicast addresses. Next step to try and list the available SAP streams!

Re: SAP for VLC on Android

Posted: 17 Jan 2014 19:15
by Jean-Baptiste Kempf
And share it with us :)