- Timestamp:
- 08/22/10 21:58:42 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/applications/applestreamingclient/src/jnihelpers.cpp
r88 r89 131 131 132 132 bool CallJava(CallBackInfo &ci, Variant ¶meters) { 133 if (ci. pEnv == NULL) {133 if (ci.env == NULL) { 134 134 WARN("No pEnv"); 135 135 return true; 136 136 } 137 if (ci. pInterface== NULL) {137 if (ci.callbackHandler == NULL) { 138 138 WARN("No pInterface"); 139 139 return true; 140 140 } 141 ci.pEnv->PushLocalFrame(128); 142 if (ci.method == NULL) { 143 ci.clazz = ci.pEnv->FindClass("com/rtmpd/VideoCallbacks"); 144 if (ci.clazz != NULL) { 145 ci.method = ci.pEnv->GetMethodID(ci.clazz, "EventAvailable", "(Ljava/lang/Object;)V"); 141 ci.env->PushLocalFrame(128); 142 if (ci.callbackMethod == NULL) { 143 replace(ci.callbackClassName, ".", "/"); 144 ci.callbackClass = ci.env->FindClass(STR(ci.callbackClassName)); 145 if (ci.callbackClass != NULL) { 146 ci.callbackMethod = ci.env->GetMethodID(ci.callbackClass, 147 STR(ci.callbackMethodName), "(Ljava/util/HashMap;)V"); 146 148 } 149 FINEST("********ci resolved:\n%s", STR(ci)); 147 150 } 148 ci.pEnv->CallObjectMethod(ci.pInterface, ci.method, VariantToJObject(parameters, ci.pEnv)); 149 ci.pEnv->PopLocalFrame(NULL); 151 ci.env->CallObjectMethod(ci.callbackHandler, ci.callbackMethod, 152 VariantToJObject(parameters, ci.env)); 153 ci.env->PopLocalFrame(NULL); 150 154 return true; 151 155 }
Note: See TracChangeset
for help on using the changeset viewer.
