Ejemplo n.º 1
0
//PP_EXPORT
int32_t PPP_InitializeModule(PP_Module a_module_id,PPB_GetInterface get_browser)
{
    g_get_browser_interface = get_browser;
    GET_INTERFACE(g_ppb_messaging, PPB_Messaging, PPB_MESSAGING_INTERFACE);
    GET_INTERFACE(g_ppb_var, PPB_Var, PPB_VAR_INTERFACE);
    GET_INTERFACE(g_ppb_var_array, PPB_VarArray, PPB_VAR_ARRAY_INTERFACE);
    GET_INTERFACE(g_ppb_var_dictionary, PPB_VarDictionary, PPB_VAR_DICTIONARY_INTERFACE);
    return PP_OK;
}
CCSBackend *
ccsBackendLoaderLoadBackend (CCSBackendLoader *loader,
			     const CCSInterfaceTable *interfaces,
			     CCSContext *context,
			     const char *name)
{
    return (*(GET_INTERFACE (CCSBackendLoaderInterface, loader))->loadBackend) (loader, interfaces, context, name);
}
TAny* CEventCheckerRenderStage::ResolveObjectInterface(TUint aTypeId)
	{
	switch(aTypeId)
		{
	case MWsGraphicsContext::EWsObjectInterfaceId:
		{
		GET_AND_CHECK_BEGINEND_INTERFACE(MWsGraphicsContext, realGc, iGraphicsContextChecker->GraphicsContext());
		iGraphicsContextChecker->SetGraphicsContext(realGc);
		return static_cast<MWsGraphicsContext*>(iGraphicsContextChecker);
		}
	case MWsFader::EWsObjectInterfaceId:
		{
		GET_AND_CHECK_BEGINEND_INTERFACE(MWsFader, realFader, iGraphicsContextChecker->Fader());
		iGraphicsContextChecker->SetFader(realFader);
		return static_cast<MWsFader*>(iGraphicsContextChecker);
		}
	case MWsTextCursor::EWsObjectInterfaceId:
		{
		GET_INTERFACE(MWsTextCursor, realTextCursor);
		iGraphicsContextChecker->SetTextCursor(realTextCursor);
		return static_cast<MWsTextCursor*>(iGraphicsContextChecker);
		}
	case MWsDrawAnnotationObserver::EWsObjectInterfaceId:
		{
		return static_cast<MWsDrawAnnotationObserver*>(iGraphicsContextChecker);
		}
	case MWsScene::EWsObjectInterfaceId:
		{
		GET_INTERFACE(MWsScene, realScene);
		iSceneChecker->SetScene(realScene);
		return static_cast<MWsScene*>(iSceneChecker);
		}
	case MWsWindowTreeObserver::EWsObjectInterfaceId:
		{
		return static_cast<MWsWindowTreeObserver*>(iSceneChecker);
		}
	default:
		return CWsRenderStage::ResolveObjectInterface(aTypeId);
		}
	}
/*
 * Method:    codec_enc_config_default
 */
JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_codec_video_VPX_codec_1enc_1config_1default
    (JNIEnv *env,
     jclass clazz,
     jint iface,
     jlong cfg,
     jint usage)
{
    return vpx_codec_enc_config_default(
                     GET_INTERFACE(iface),
                     (vpx_codec_enc_cfg_t *) (intptr_t) cfg,
                     (int) usage);
}
/*
 * Method:    codec_dec_init
 */
JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_codec_video_VPX_codec_1dec_1init
    (JNIEnv *env,
     jclass clazz,
     jlong context,
     jint iface,
     jlong cfg,
     jlong flags)
{
    return (jint) vpx_codec_dec_init(
                        (vpx_codec_ctx_t *) (intptr_t) context,
                        GET_INTERFACE(iface),
                        (vpx_codec_dec_cfg_t *) (intptr_t) cfg,
                        (vpx_codec_flags_t) flags);
}
/*
 * Method:    codec_peek_stream_info
 */
JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_codec_video_VPX_codec_1peek_1stream_1info
    (JNIEnv *env,
     jclass clazz,
     jint iface,
     jbyteArray buf,
     jint buf_offset,
     jint buf_size,
     jlong si)
{
    vpx_codec_err_t ret;
    jbyte *buf_ptr = (*env)->GetByteArrayElements(env, buf, NULL);

    ret = vpx_codec_peek_stream_info(GET_INTERFACE(iface),
                                     (uint8_t *) (buf_ptr + buf_offset),
                                     buf_size,
                                     (vpx_codec_stream_info_t *) (intptr_t)si);
    (*env)->ReleaseByteArrayElements(env, buf, buf_ptr, JNI_ABORT);
    return ret;
}
void
ccsFreeBackendLoader (CCSBackendLoader *file)
{
    return (*(GET_INTERFACE (CCSBackendLoaderInterface, file))->free) (file);
}