OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 ScopedLocalRefFrame local_ref_frame(jni()); | 243 ScopedLocalRefFrame local_ref_frame(jni()); |
244 jmethodID m = GetMethodID( | 244 jmethodID m = GetMethodID( |
245 jni(), *j_observer_class_, "onIceConnectionChange", | 245 jni(), *j_observer_class_, "onIceConnectionChange", |
246 "(Lorg/webrtc/PeerConnection$IceConnectionState;)V"); | 246 "(Lorg/webrtc/PeerConnection$IceConnectionState;)V"); |
247 jobject new_state_enum = JavaEnumFromIndex( | 247 jobject new_state_enum = JavaEnumFromIndex( |
248 jni(), "PeerConnection$IceConnectionState", new_state); | 248 jni(), "PeerConnection$IceConnectionState", new_state); |
249 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); | 249 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); |
250 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 250 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
251 } | 251 } |
252 | 252 |
253 void OnIceFlakinessChange(bool flaky) override { | |
pthatcher1
2015/06/24 23:42:52
We need to think of a better name than "IceFlakine
| |
254 ScopedLocalRefFrame local_ref_frame(jni()); | |
255 jmethodID m = GetMethodID( | |
256 jni(), *j_observer_class_, "onIceFlakinessChange", "(Z)V"); | |
257 jni()->CallVoidMethod(*j_observer_global_, m, flaky); | |
258 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | |
259 } | |
260 | |
253 void OnIceGatheringChange( | 261 void OnIceGatheringChange( |
254 PeerConnectionInterface::IceGatheringState new_state) override { | 262 PeerConnectionInterface::IceGatheringState new_state) override { |
255 ScopedLocalRefFrame local_ref_frame(jni()); | 263 ScopedLocalRefFrame local_ref_frame(jni()); |
256 jmethodID m = GetMethodID( | 264 jmethodID m = GetMethodID( |
257 jni(), *j_observer_class_, "onIceGatheringChange", | 265 jni(), *j_observer_class_, "onIceGatheringChange", |
258 "(Lorg/webrtc/PeerConnection$IceGatheringState;)V"); | 266 "(Lorg/webrtc/PeerConnection$IceGatheringState;)V"); |
259 jobject new_state_enum = JavaEnumFromIndex( | 267 jobject new_state_enum = JavaEnumFromIndex( |
260 jni(), "PeerConnection$IceGatheringState", new_state); | 268 jni(), "PeerConnection$IceGatheringState", new_state); |
261 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); | 269 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); |
262 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 270 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1676 } | 1684 } |
1677 | 1685 |
1678 JOW(void, VideoTrack_nativeRemoveRenderer)( | 1686 JOW(void, VideoTrack_nativeRemoveRenderer)( |
1679 JNIEnv* jni, jclass, | 1687 JNIEnv* jni, jclass, |
1680 jlong j_video_track_pointer, jlong j_renderer_pointer) { | 1688 jlong j_video_track_pointer, jlong j_renderer_pointer) { |
1681 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( | 1689 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( |
1682 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); | 1690 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); |
1683 } | 1691 } |
1684 | 1692 |
1685 } // namespace webrtc_jni | 1693 } // namespace webrtc_jni |
OLD | NEW |