[vlc-devel] subtitle delay in android

Maria Gheorghe reclamamulta at gmail.com
Wed Oct 1 14:22:54 CEST 2014


must add to the vlc for android this 2 funtions in LibVlc.java

    public native int getSpuDelay();
    public native int setSpuDelay(int delay);

,so I think all will work ,does anybody has antyserver configured to only
'pastle' the code and get a compiled libvlc.so ?

On Wed, Oct 1, 2014 at 3:16 PM, Maria Gheorghe <reclamamulta at gmail.com>
wrote:

> 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.
>
> On Wed, Oct 1, 2014 at 3:09 PM, Maria Gheorghe <reclamamulta at gmail.com>
> wrote:
>
>> This 2 functions need to be added to jni/libvlcjni.c  in order VLC for
>> android to have subtitle delay.
>> I think this are just ok ,I'm not 100% sure if something else need but I
>> think only this 2.
>> ---------------------------------------------------------------------
>> //      ***LibVLC setSpuDelay***
>> //
>> //     Set the subtitle delay. This affects the timing of when the
>> subtitle will
>> //     be displayed. Positive values result in subtitles being displayed
>> later,
>> //     while negative values will result in subtitles being displayed
>> earlier.
>> //
>> //     The subtitle delay will be reset to zero each time the media
>> changes.
>> //
>> //     param p_mi media player
>> //     param i_delay time (in microseconds) the display of subtitles
>> should be delayed
>> //    version LibVLC 1.2.0 or later
>>
>>
>> jint Java_org_videolan_vlc_LibVLC_setSpuDelay(JNIEnv *env, jobject thiz,
>> jint delay)
>> {
>>   libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
>>
>>   if (mp)
>>    return (jint) libvlc_video_set_spu_delay(mp, delay); //return 0 on
>> success, -1 on error
>>
>>   return -1;
>> }
>>
>>
>> //     ***LibVLC getSpuDelay***
>> //
>> //    Get the current subtitle delay. Positive values means subtitles are
>> being
>> //     displayed later, negative values earlier.
>> //
>> //    param p_mi media player
>> //    return time (in microseconds) the display of subtitles is being
>> delayed
>> //    version LibVLC 1.2.0 or later
>> //
>>
>> jint Java_org_videolan_vlc_LibVLC_getSpuDelay(JNIEnv *env, jobject thiz)
>> {
>>    libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
>>
>>    if (mp)
>>    return (jint) libvlc_video_get_spu_delay(mp);
>>
>>    return -1;
>> }
>>
>> --------------------------------------------------------------------------------------------------
>> the problem is i dont have a server configured to compile libvlc now and
>> test
>>
>> On Wed, Oct 1, 2014 at 1:02 PM, Jean-Baptiste Kempf <jb at videolan.org>
>> wrote:
>>
>>> On 01 Oct, Maria Gheorghe wrote :
>>> > How can I do this?
>>>
>>> You need to modify the code to expose it.
>>>
>>> --
>>> Jean-Baptiste Kempf
>>> http://www.jbkempf.com/ - +33 672 704 734
>>> Sent from my Electronic Device
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141001/318201e3/attachment.html>


More information about the vlc-devel mailing list