<div dir="ltr">So from java sould work a call of LibVLC.getSpuDelay() , LibVLC.setSpuDelay(1000) to get the subtitle delay and set a delay of 1 second.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 1, 2014 at 3:09 PM, Maria Gheorghe <span dir="ltr"><<a href="mailto:reclamamulta@gmail.com" target="_blank">reclamamulta@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>This 2 functions need to be added to jni/libvlcjni.c  in order VLC for android to have subtitle delay.<br></div>I think this are just ok ,I'm not 100% sure if something else need but I think only this 2.<br>---------------------------------------------------------------------<br>//      ***LibVLC setSpuDelay***<br>//<br>//     Set the subtitle delay. This affects the timing of when the subtitle will<br>//     be displayed. Positive values result in subtitles being displayed later,<br>//     while negative values will result in subtitles being displayed earlier.<br>//    <br>//     The subtitle delay will be reset to zero each time the media changes.<br>//<br>//     param p_mi media player<br>//     param i_delay time (in microseconds) the display of subtitles should be delayed<br>//    version LibVLC 1.2.0 or later<br><br><br>jint Java_org_videolan_vlc_LibVLC_setSpuDelay(JNIEnv *env, jobject thiz, jint delay)<br>{<br>  libvlc_media_player_t *mp = getMediaPlayer(env, thiz);<br>  <br>  if (mp)<br>   return (jint) libvlc_video_set_spu_delay(mp, delay); //return 0 on success, -1 on error<br><br>  return -1;<br>}<br><br><br>//     ***LibVLC getSpuDelay***<br>//<br>//    Get the current subtitle delay. Positive values means subtitles are being<br>//     displayed later, negative values earlier.<br>//<br>//    param p_mi media player<br>//    return time (in microseconds) the display of subtitles is being delayed<br>//    version LibVLC 1.2.0 or later<br>//<br><br>jint Java_org_videolan_vlc_LibVLC_getSpuDelay(JNIEnv *env, jobject thiz)<br>{<br>   libvlc_media_player_t *mp = getMediaPlayer(env, thiz);<br><br>   if (mp)<br>   return (jint) libvlc_video_get_spu_delay(mp);<br><br>   return -1;<br>}<br>--------------------------------------------------------------------------------------------------<br></div>the problem is i dont have a server configured to compile libvlc now and test<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 1, 2014 at 1:02 PM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 01 Oct, Maria Gheorghe wrote :<br>
</span><span>> How can I do this?<br>
<br>
</span>You need to modify the code to expose it.<br>
<div><div><br>
--<br>
Jean-Baptiste Kempf<br>
<a href="http://www.jbkempf.com/" target="_blank">http://www.jbkempf.com/</a> - <a href="tel:%2B33%20672%20704%20734" value="+33672704734" target="_blank">+33 672 704 734</a><br>
Sent from my Electronic Device<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>