Exemplo n.º 1
0
static void releaseMediaPlayer(JNIEnv *env, jobject thiz)
{
    libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
    if (mp)
    {
        libvlc_media_player_stop(mp);
        libvlc_media_player_release(mp);
        unsetMediaPlayer(env, thiz);
    }
}
Exemplo n.º 2
0
static void releaseMediaPlayer(JNIEnv *env, jobject thiz)
{
    libvlc_media_list_player_t* p_mlp = getMediaListPlayer(env, thiz);
    if (p_mlp)
    {
        libvlc_media_list_player_stop(p_mlp);
        libvlc_media_list_player_release(p_mlp);
        /* libvlc_media_list_player_release frees the media player, so
         * we don't free it ourselves. */
        unsetMediaPlayer(env, thiz);
        setLong(env, thiz, "mInternalMediaPlayerInstance", 0);
    }
}