Esempio n. 1
0
IjkMediaPlayer *ijkmp_create(void *(*msg_loop)(void*))
{
    IjkMediaPlayer *mp = (IjkMediaPlayer *) av_mallocz(sizeof(IjkMediaPlayer));
    if (!mp)
        goto fail;

    mp->ffplayer = ffp_create();
    if (!mp)
        goto fail;

    mp->ffplayer->vout = SDL_VoutAndroid_CreateForAndroidSurface();
    if (!mp->ffplayer->vout)
        goto fail;

    mp->ffplayer->aout = SDL_AoutAndroid_CreateForAudioTrack();
    if (!mp->ffplayer->vout)
        goto fail;

    mp->msg_loop = msg_loop;

    ijkmp_inc_ref(mp);
    pthread_mutex_init(&mp->mutex, NULL);

    return mp;

fail:
    ijkmp_destroy_p(&mp);
    return NULL;
}
Esempio n. 2
0
KSYMediaPlayer *ksymp_create(int (*msg_loop)(void*))
{
//#ifdef _ARM_
//    LOGW("name=%s", name);
//    android::CallStack stack;
//    stack.update(1, 100);
//    stack.dump("");
//#endif

    KSYMediaPlayer *mp = (KSYMediaPlayer *) av_mallocz(sizeof(KSYMediaPlayer));
    if (!mp)
        goto fail;

    mp->ffplayer = ffp_create();
    if (!mp)
        goto fail;

    mp->msg_loop = msg_loop;

    ksymp_inc_ref(mp);
    pthread_mutex_init(&mp->mutex, NULL);

    return mp;

    fail:
    ksymp_destroy_p(&mp);
    return NULL;
}
Esempio n. 3
0
IjkMediaPlayer *ijkmp_create(int (*msg_loop)(void*))
{
    IjkMediaPlayer *mp = (IjkMediaPlayer *) av_mallocz(sizeof(IjkMediaPlayer));
    if (!mp)
        goto fail;

    mp->ffplayer = ffp_create();
    if (!mp)
        goto fail;

    mp->msg_loop = msg_loop;

    ijkmp_inc_ref(mp);
    pthread_mutex_init(&mp->mutex, NULL);

    return mp;

fail:
    ijkmp_destroy_p(&mp);
    return NULL;
}
Esempio n. 4
0
AirStashMediaPlayer *airstashmp_create(int (*msg_loop)(void*))
{
    AirStashMediaPlayer *mp = (AirStashMediaPlayer *) mallocz(sizeof(AirStashMediaPlayer));
    if (!mp)
        goto fail;

    mp->ffplayer = ffp_create();
    if (!mp->ffplayer)
        goto fail;

    mp->msg_loop = msg_loop;

    airstashmp_inc_ref(mp);
    pthread_mutex_init(&mp->mutex, NULL);

    return mp;

fail:
    airstashmp_destroy_p(&mp);
    return NULL;
}