当前位置: 首页>>代码示例>>C++>>正文


C++ JNI_CHECK_GOTO函数代码示例

本文整理汇总了C++中JNI_CHECK_GOTO函数的典型用法代码示例。如果您正苦于以下问题:C++ JNI_CHECK_GOTO函数的具体用法?C++ JNI_CHECK_GOTO怎么用?C++ JNI_CHECK_GOTO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了JNI_CHECK_GOTO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IjkMediaPlayer_setOption

static void
IjkMediaPlayer_setOption(JNIEnv *env, jobject thiz, jint category, jobject name, jobject value)
{
    MPTRACE("%s\n", __func__);
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    const char *c_name = NULL;
    const char *c_value = NULL;
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: setOption: null mp", LABEL_RETURN);

    c_name = (*env)->GetStringUTFChars(env, name, NULL );
    JNI_CHECK_GOTO(c_name, env, "java/lang/OutOfMemoryError", "mpjni: setOption: name.string oom", LABEL_RETURN);

    if (value) {
        c_value = (*env)->GetStringUTFChars(env, value, NULL );
        JNI_CHECK_GOTO(c_name, env, "java/lang/OutOfMemoryError", "mpjni: setOption: name.string oom", LABEL_RETURN);
    }

    ijkmp_set_option(mp, category, c_name, c_value);

LABEL_RETURN:
    if (c_name)
        (*env)->ReleaseStringUTFChars(env, name, c_name);
    if (c_value)
        (*env)->ReleaseStringUTFChars(env, value, c_value);
    ijkmp_dec_ref_p(&mp);
}
开发者ID:nick82233,项目名称:ijkplayer,代码行数:26,代码来源:ijkplayer_jni.c

示例2: IjkMediaPlayer_native_profileBegin

static void
IjkMediaPlayer_native_profileBegin(JNIEnv *env, jclass clazz, jstring libName)
{
    MPTRACE("IjkMediaPlayer_native_profileBegin");

    const char *c_lib_name = NULL;
    static int s_monstartup = 0;

    if (!libName)
        return;

    if (s_monstartup) {
        ALOGW("monstartup already called\b");
        return;
    }

    c_lib_name = (*env)->GetStringUTFChars(env, libName, NULL );
    JNI_CHECK_GOTO(c_lib_name, env, "java/lang/OutOfMemoryError", "mpjni: monstartup: libName.string oom", LABEL_RETURN);

    s_monstartup = 1;
    monstartup(c_lib_name);
    ALOGD("monstartup: %s\n", c_lib_name);

LABEL_RETURN:
    if (c_lib_name)
        (*env)->ReleaseStringUTFChars(env, libName, c_lib_name);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:27,代码来源:ijkplayer_jni.c

示例3: IjkMediaPlayer_pause

static void
IjkMediaPlayer_pause(JNIEnv *env, jobject thiz)
{
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: pause: null mp", LABEL_RETURN);

    ijkmp_pause(mp);

LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:keepcleargas,项目名称:ijkplayer,代码行数:11,代码来源:ijkplayer_jni.c

示例4: AirStashMediaPlayer_stop

static void
AirStashMediaPlayer_stop(JNIEnv *env, jobject thiz)
{
    AirStashMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: stop: null mp", LABEL_RETURN);

    airstashmp_stop(mp);

LABEL_RETURN:
    airstashmp_dec_ref_p(&mp);
}
开发者ID:AirStash,项目名称:AirStashPlayer,代码行数:11,代码来源:player_jni.c

示例5: AirStashMediaPlayer_setVolume

static void
AirStashMediaPlayer_setVolume(JNIEnv *env, jobject thiz, jfloat leftVolume, jfloat rightVolume)
{
    MPTRACE("%s\n", __func__);
    AirStashMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, NULL, "mpjni: setVolume: null mp", LABEL_RETURN);

    airstashmp_android_set_volume(env, mp, leftVolume, rightVolume);

LABEL_RETURN:
    airstashmp_dec_ref_p(&mp);
}
开发者ID:AirStash,项目名称:AirStashPlayer,代码行数:12,代码来源:player_jni.c

示例6: AirStashMediaPlayer_setPropertyFloat

static void
AirStashMediaPlayer_setPropertyFloat(JNIEnv *env, jobject thiz, jint id, jfloat value)
{
    AirStashMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, NULL, "mpjni: setPropertyFloat: null mp", LABEL_RETURN);

    airstashmp_set_property_float(mp, id, value);

LABEL_RETURN:
    airstashmp_dec_ref_p(&mp);
    return;
}
开发者ID:AirStash,项目名称:AirStashPlayer,代码行数:12,代码来源:player_jni.c

示例7: ijkMediaPlayer_setPropertyLong

static void
ijkMediaPlayer_setPropertyLong(JNIEnv *env, jobject thiz, jint id, jlong value)
{
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, NULL, "mpjni: setPropertyLong: null mp", LABEL_RETURN);

    ijkmp_set_property_int64(mp, id, value);

LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
    return;
}
开发者ID:andrewchae,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例8: AirStashMediaPlayer_seekTo

static void
AirStashMediaPlayer_seekTo(JNIEnv *env, jobject thiz, jlong msec)
{
    MPTRACE("%s\n", __func__);
    AirStashMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: seekTo: null mp", LABEL_RETURN);

    airstashmp_seek_to(mp, msec);

LABEL_RETURN:
    airstashmp_dec_ref_p(&mp);
}
开发者ID:AirStash,项目名称:AirStashPlayer,代码行数:12,代码来源:player_jni.c

示例9: IjkMediaPlayer_setOpenSLESEnabled

static void
IjkMediaPlayer_setOpenSLESEnabled(JNIEnv *env, jobject thiz, jboolean enabled)
{
    MPTRACE("%s", __func__);
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: setOpenSLESEnabled: null mp", LABEL_RETURN);

    ijkmp_android_set_opensles_enabled(mp, enabled);

    LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例10: IjkMediaPlayer_setAutoPlayOnPrepared

static void
IjkMediaPlayer_setAutoPlayOnPrepared(JNIEnv *env, jobject thiz, jboolean enabled)
{
    MPTRACE("%s", __func__);
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: setAutoPlayOnPrepared: null mp", LABEL_RETURN);

    ijkmp_set_auto_play_on_prepared(mp, enabled);

LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例11: IjkMediaPlayer_setOverlayFormat

static void
IjkMediaPlayer_setOverlayFormat(JNIEnv *env, jobject thiz, jint chromaFourCC)
{
    MPTRACE("IjkMediaPlayer_setOverlayFormat");
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: setAvCodecOption: null mp", LABEL_RETURN);

    ijkmp_set_overlay_format(mp, chromaFourCC);

    LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例12: IjkMediaPlayer_setFrameDrop

static void
IjkMediaPlayer_setFrameDrop(JNIEnv *env, jobject thiz, jint frameDrop)
{
    MPTRACE("IjkMediaPlayer_setFrameDrop");
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: setFrameDrop: null mp", LABEL_RETURN);

    ijkmp_set_framedrop(mp, frameDrop);

    LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例13: IjkMediaPlayer_seekTo

static void
IjkMediaPlayer_seekTo(JNIEnv *env, jobject thiz, int msec)
{
    MPTRACE("IjkMediaPlayer_seekTo");
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: seekTo: null mp", LABEL_RETURN);

    ijkmp_seek_to(mp, msec);

LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:keepcleargas,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例14: IjkMediaPlayer_setVolume

static void
IjkMediaPlayer_setVolume(JNIEnv *env, jobject thiz, jfloat leftVolume, jfloat rightVolume)
{
    MPTRACE("IjkMediaPlayer_setVolume");
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, NULL, "mpjni: setVolume: null mp", LABEL_RETURN);

    ijkmp_android_set_volume(env, mp, leftVolume, rightVolume);

    LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:xiaonia,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c

示例15: IjkMediaPlayer_start

static void
IjkMediaPlayer_start(JNIEnv *env, jobject thiz)
{
    MPTRACE("%s\n", __func__);
    IjkMediaPlayer *mp = jni_get_media_player(env, thiz);
    JNI_CHECK_GOTO(mp, env, "java/lang/IllegalStateException", "mpjni: start: null mp", LABEL_RETURN);

    ijkmp_start(mp);

LABEL_RETURN:
    ijkmp_dec_ref_p(&mp);
}
开发者ID:nick82233,项目名称:ijkplayer,代码行数:12,代码来源:ijkplayer_jni.c


注:本文中的JNI_CHECK_GOTO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。